{"id":"T:cAlgo.API.AbsoluteStopLossProtection","kind":"record","name":"AbsoluteStopLossProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class AbsoluteStopLossProtection","python":"AbsoluteStopLossProtection","summary":"Represents a stop loss defined at an absolute price level.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var pipSize = position.Symbol.PipSize;\n    var takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));\n    var result = ModifyPosition(position, new AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits);\n    Print(\"Stop loss set at {0}: {1}\", position.EntryPrice - 20 * pipSize, result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    pipSize = position.Symbol.PipSize\n    takeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))\n    result = api.ModifyPosition(position, AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits)\n    api.Print(f\"Stop loss set at {position.EntryPrice - 20 * pipSize}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteStopLossProtection.#ctor(System.Double)","kind":"constructor","name":"AbsoluteStopLossProtection","type":"T:cAlgo.API.AbsoluteStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteStopLossProtection(double Price)","python":"AbsoluteStopLossProtection(Price: float)","summary":"Represents a stop loss defined at an absolute price level.","remarks":null,"parameters":[{"name":"Price","csharpType":"double","pythonType":"float","summary":"The absolute price at which the stop loss is triggered."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var pipSize = position.Symbol.PipSize;\n    var takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));\n    var result = ModifyPosition(position, new AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits);\n    Print(\"Stop loss set at {0}: {1}\", position.EntryPrice - 20 * pipSize, result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    pipSize = position.Symbol.PipSize\n    takeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))\n    result = api.ModifyPosition(position, AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits)\n    api.Print(f\"Stop loss set at {position.EntryPrice - 20 * pipSize}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteStopLossProtection.#ctor(cAlgo.API.AbsoluteStopLossProtection)","kind":"constructor","name":"AbsoluteStopLossProtection","type":"T:cAlgo.API.AbsoluteStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteStopLossProtection(AbsoluteStopLossProtection original)","python":"AbsoluteStopLossProtection(original: AbsoluteStopLossProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteStopLossProtection.Price","kind":"property","name":"Price","type":"T:cAlgo.API.AbsoluteStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Price {get; set;}","python":"absoluteStopLossProtection.Price: float","summary":"The absolute price at which the stop loss is triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AbsoluteTakeProfitLastProtection","kind":"record","name":"AbsoluteTakeProfitLastProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class AbsoluteTakeProfitLastProtection","python":"AbsoluteTakeProfitLastProtection","summary":"Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize;\n    var result = position.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));\n    Print(\"Take profit set at {0}: {1}\", targetPrice, result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize\n    result = position.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))\n    api.Print(f\"Take profit set at {targetPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitLastProtection.#ctor(System.Double)","kind":"constructor","name":"AbsoluteTakeProfitLastProtection","type":"T:cAlgo.API.AbsoluteTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitLastProtection(double Price)","python":"AbsoluteTakeProfitLastProtection(Price: float)","summary":"Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.","remarks":null,"parameters":[{"name":"Price","csharpType":"double","pythonType":"float","summary":"The absolute price at which the remaining volume is closed."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize;\n    var result = position.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));\n    Print(\"Take profit set at {0}: {1}\", targetPrice, result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize\n    result = position.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))\n    api.Print(f\"Take profit set at {targetPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitLastProtection.#ctor(cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitLastProtection","type":"T:cAlgo.API.AbsoluteTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitLastProtection(AbsoluteTakeProfitLastProtection original)","python":"AbsoluteTakeProfitLastProtection(original: AbsoluteTakeProfitLastProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitLastProtection.Price","kind":"property","name":"Price","type":"T:cAlgo.API.AbsoluteTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Price {get; set;}","python":"absoluteTakeProfitLastProtection.Price: float","summary":"The absolute price at which the remaining volume is closed.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AbsoluteTakeProfitProtection","kind":"record","name":"AbsoluteTakeProfitProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class AbsoluteTakeProfitProtection","python":"AbsoluteTakeProfitProtection","summary":"Represents a partial take profit closing a portion of the order volume at an absolute price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var pipSize = position.Symbol.PipSize;\n    var halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down);\n    var firstTakeProfit = new AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize);\n    var takeProfits = new AbsoluteTakeProfitProtections(firstTakeProfit, new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));\n    Print(\"Take profit ladder set: {0}\", position.ModifyTakeProfit(takeProfits).IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    pipSize = position.Symbol.PipSize\n    halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down)\n    firstTakeProfit = AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize)\n    takeProfits = AbsoluteTakeProfitProtections(firstTakeProfit, AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))\n    api.Print(f\"Take profit ladder set: {position.ModifyTakeProfit(takeProfits).IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtection.#ctor(System.Double,System.Double)","kind":"constructor","name":"AbsoluteTakeProfitProtection","type":"T:cAlgo.API.AbsoluteTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection(double Volume, double Price)","python":"AbsoluteTakeProfitProtection(Volume: float, Price: float)","summary":"Represents a partial take profit closing a portion of the order volume at an absolute price.","remarks":null,"parameters":[{"name":"Volume","csharpType":"double","pythonType":"float","summary":"The portion of the order volume to close when the take profit is triggered."},{"name":"Price","csharpType":"double","pythonType":"float","summary":"The absolute price at which the take profit is triggered."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var pipSize = position.Symbol.PipSize;\n    var halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down);\n    var firstTakeProfit = new AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize);\n    var takeProfits = new AbsoluteTakeProfitProtections(firstTakeProfit, new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));\n    Print(\"Take profit ladder set: {0}\", position.ModifyTakeProfit(takeProfits).IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    pipSize = position.Symbol.PipSize\n    halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down)\n    firstTakeProfit = AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize)\n    takeProfits = AbsoluteTakeProfitProtections(firstTakeProfit, AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))\n    api.Print(f\"Take profit ladder set: {position.ModifyTakeProfit(takeProfits).IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtection.#ctor(cAlgo.API.AbsoluteTakeProfitProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtection","type":"T:cAlgo.API.AbsoluteTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection(AbsoluteTakeProfitProtection original)","python":"AbsoluteTakeProfitProtection(original: AbsoluteTakeProfitProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtection.Price","kind":"property","name":"Price","type":"T:cAlgo.API.AbsoluteTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Price {get; set;}","python":"absoluteTakeProfitProtection.Price: float","summary":"The absolute price at which the take profit is triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtection.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.AbsoluteTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Volume {get; set;}","python":"absoluteTakeProfitProtection.Volume: float","summary":"The portion of the order volume to close when the take profit is triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AbsoluteTakeProfitProtections","kind":"record","name":"AbsoluteTakeProfitProtections","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class AbsoluteTakeProfitProtections","python":"AbsoluteTakeProfitProtections","summary":"Represents a ladder of up to four partial take profits at absolute prices, followed by a final take profit that closes any remaining volume.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 20 * Symbol.PipSize),\n    new AbsoluteTakeProfitLastProtection(entryPrice + 40 * Symbol.PipSize));\nvar stopLoss = new AbsoluteStopLossProtection(entryPrice - 20 * Symbol.PipSize);\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 20000, entryPrice, \"myLabel\", stopLoss, takeProfits);\nPrint(\"Limit order with a price based take profit ladder placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(\n    AbsoluteTakeProfitProtection(10000, entryPrice + 20 * api.Symbol.PipSize),\n    AbsoluteTakeProfitLastProtection(entryPrice + 40 * api.Symbol.PipSize))\nstopLoss = AbsoluteStopLossProtection(entryPrice - 20 * api.Symbol.PipSize)\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 20000, entryPrice, \"myLabel\", stopLoss, takeProfits)\napi.Print(f\"Limit order with a price based take profit ladder placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection lastTakeProfit)","python":"AbsoluteTakeProfitProtections(lastTakeProfit: AbsoluteTakeProfitLastProtection)","summary":"Initializes a new instance with only a final take profit.","remarks":null,"parameters":[{"name":"lastTakeProfit","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(entryPrice + 40 * Symbol.PipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, entryPrice, \"myLabel\", new AbsoluteStopLossProtection(entryPrice - 20 * Symbol.PipSize), takeProfits);\nPrint(\"Order placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(entryPrice + 40 * api.Symbol.PipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, entryPrice, \"myLabel\", AbsoluteStopLossProtection(entryPrice - 20 * api.Symbol.PipSize), takeProfits)\napi.Print(f\"Order placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit)","python":"AbsoluteTakeProfitProtections(firstTakeProfit: AbsoluteTakeProfitProtection, lastTakeProfit: AbsoluteTakeProfitLastProtection)","summary":"Initializes a new instance with one partial take profit and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The first partial take profit."},{"name":"lastTakeProfit","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar pipSize = Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(10000, entryPrice + 20 * pipSize), new AbsoluteTakeProfitLastProtection(entryPrice + 40 * pipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 20000, entryPrice, \"myLabel\", new AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits);\nPrint(\"Order placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\npipSize = api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(10000, entryPrice + 20 * pipSize), AbsoluteTakeProfitLastProtection(entryPrice + 40 * pipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 20000, entryPrice, \"myLabel\", AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits)\napi.Print(f\"Order placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit)","python":"AbsoluteTakeProfitProtections(firstTakeProfit: AbsoluteTakeProfitProtection, secondTakeProfit: AbsoluteTakeProfitProtection, lastTakeProfit: AbsoluteTakeProfitLastProtection)","summary":"Initializes a new instance with two partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The second partial take profit."},{"name":"lastTakeProfit","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar pipSize = Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 15 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 30 * pipSize),\n    new AbsoluteTakeProfitLastProtection(entryPrice + 45 * pipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 30000, entryPrice, \"myLabel\", new AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits);\nPrint(\"Order placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\npipSize = api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(\n    AbsoluteTakeProfitProtection(10000, entryPrice + 15 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 30 * pipSize),\n    AbsoluteTakeProfitLastProtection(entryPrice + 45 * pipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 30000, entryPrice, \"myLabel\", AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits)\napi.Print(f\"Order placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitProtection thirdTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit)","python":"AbsoluteTakeProfitProtections(firstTakeProfit: AbsoluteTakeProfitProtection, secondTakeProfit: AbsoluteTakeProfitProtection, thirdTakeProfit: AbsoluteTakeProfitProtection, lastTakeProfit: AbsoluteTakeProfitLastProtection)","summary":"Initializes a new instance with three partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The second partial take profit."},{"name":"thirdTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The third partial take profit."},{"name":"lastTakeProfit","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar pipSize = Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 15 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 25 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 35 * pipSize),\n    new AbsoluteTakeProfitLastProtection(entryPrice + 50 * pipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 40000, entryPrice, \"myLabel\", new AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits);\nPrint(\"Order placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\npipSize = api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(\n    AbsoluteTakeProfitProtection(10000, entryPrice + 15 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 25 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 35 * pipSize),\n    AbsoluteTakeProfitLastProtection(entryPrice + 50 * pipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 40000, entryPrice, \"myLabel\", AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits)\napi.Print(f\"Order placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitProtection,cAlgo.API.AbsoluteTakeProfitLastProtection)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitProtection thirdTakeProfit, AbsoluteTakeProfitProtection fourthTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit)","python":"AbsoluteTakeProfitProtections(firstTakeProfit: AbsoluteTakeProfitProtection, secondTakeProfit: AbsoluteTakeProfitProtection, thirdTakeProfit: AbsoluteTakeProfitProtection, fourthTakeProfit: AbsoluteTakeProfitProtection, lastTakeProfit: AbsoluteTakeProfitLastProtection)","summary":"Initializes a new instance with four partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The second partial take profit."},{"name":"thirdTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The third partial take profit."},{"name":"fourthTakeProfit","csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"The fourth partial take profit."},{"name":"lastTakeProfit","csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var entryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar pipSize = Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 10 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 20 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 30 * pipSize),\n    new AbsoluteTakeProfitProtection(10000, entryPrice + 40 * pipSize),\n    new AbsoluteTakeProfitLastProtection(entryPrice + 60 * pipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 50000, entryPrice, \"myLabel\", new AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits);\nPrint(\"Order placed: {0}\", result.IsSuccessful);","python":"entryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\npipSize = api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(\n    AbsoluteTakeProfitProtection(10000, entryPrice + 10 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 20 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 30 * pipSize),\n    AbsoluteTakeProfitProtection(10000, entryPrice + 40 * pipSize),\n    AbsoluteTakeProfitLastProtection(entryPrice + 60 * pipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 50000, entryPrice, \"myLabel\", AbsoluteStopLossProtection(entryPrice - 20 * pipSize), takeProfits)\napi.Print(f\"Order placed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.AbsoluteTakeProfitProtections.#ctor(cAlgo.API.AbsoluteTakeProfitProtections)","kind":"constructor","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtections original)","python":"AbsoluteTakeProfitProtections(original: AbsoluteTakeProfitProtections)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtections.FirstTakeProfit","kind":"property","name":"FirstTakeProfit","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection FirstTakeProfit {get;}","python":"absoluteTakeProfitProtections.FirstTakeProfit: AbsoluteTakeProfitProtection","summary":"Gets the first partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nvar firstTakeProfit = position?.AbsoluteTakeProfitProtections?.FirstTakeProfit;\nif (firstTakeProfit != null)\n    Print(\"First take profit: {0} units at {1}\", firstTakeProfit.Volume, firstTakeProfit.Price);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.AbsoluteTakeProfitProtections is not None and position.AbsoluteTakeProfitProtections.FirstTakeProfit is not None:\n    firstTakeProfit = position.AbsoluteTakeProfitProtections.FirstTakeProfit\n    api.Print(f\"First take profit: {firstTakeProfit.Volume} units at {firstTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/FirstTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/FirstTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtections.FourthTakeProfit","kind":"property","name":"FourthTakeProfit","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection FourthTakeProfit {get;}","python":"absoluteTakeProfitProtections.FourthTakeProfit: AbsoluteTakeProfitProtection","summary":"Gets the fourth partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nvar fourthTakeProfit = position?.AbsoluteTakeProfitProtections?.FourthTakeProfit;\nif (fourthTakeProfit != null)\n    Print(\"Fourth take profit: {0} units at {1}\", fourthTakeProfit.Volume, fourthTakeProfit.Price);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.AbsoluteTakeProfitProtections is not None and position.AbsoluteTakeProfitProtections.FourthTakeProfit is not None:\n    fourthTakeProfit = position.AbsoluteTakeProfitProtections.FourthTakeProfit\n    api.Print(f\"Fourth take profit: {fourthTakeProfit.Volume} units at {fourthTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/FourthTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/FourthTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtections.LastTakeProfit","kind":"property","name":"LastTakeProfit","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitLastProtection LastTakeProfit {get;}","python":"absoluteTakeProfitProtections.LastTakeProfit: AbsoluteTakeProfitLastProtection","summary":"Gets the final take profit that closes the remaining volume.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitLastProtection","pythonType":"AbsoluteTakeProfitLastProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    if (position.AbsoluteTakeProfitProtections != null)\n        Print(\"Position {0} closes the rest at {1}\", position.Id, position.AbsoluteTakeProfitProtections.LastTakeProfit.Price);\n}","python":"for position in api.Positions:\n    if position.AbsoluteTakeProfitProtections is not None:\n        api.Print(f\"Position {position.Id} closes the rest at {position.AbsoluteTakeProfitProtections.LastTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/LastTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/LastTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtections.SecondTakeProfit","kind":"property","name":"SecondTakeProfit","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection SecondTakeProfit {get;}","python":"absoluteTakeProfitProtections.SecondTakeProfit: AbsoluteTakeProfitProtection","summary":"Gets the second partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nvar secondTakeProfit = position?.AbsoluteTakeProfitProtections?.SecondTakeProfit;\nif (secondTakeProfit != null)\n    Print(\"Second take profit: {0} units at {1}\", secondTakeProfit.Volume, secondTakeProfit.Price);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.AbsoluteTakeProfitProtections is not None and position.AbsoluteTakeProfitProtections.SecondTakeProfit is not None:\n    secondTakeProfit = position.AbsoluteTakeProfitProtections.SecondTakeProfit\n    api.Print(f\"Second take profit: {secondTakeProfit.Volume} units at {secondTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/SecondTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/SecondTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AbsoluteTakeProfitProtections.ThirdTakeProfit","kind":"property","name":"ThirdTakeProfit","type":"T:cAlgo.API.AbsoluteTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public AbsoluteTakeProfitProtection ThirdTakeProfit {get;}","python":"absoluteTakeProfitProtections.ThirdTakeProfit: AbsoluteTakeProfitProtection","summary":"Gets the third partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtection","pythonType":"AbsoluteTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nvar thirdTakeProfit = position?.AbsoluteTakeProfitProtections?.ThirdTakeProfit;\nif (thirdTakeProfit != null)\n    Print(\"Third take profit: {0} units at {1}\", thirdTakeProfit.Volume, thirdTakeProfit.Price);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.AbsoluteTakeProfitProtections is not None and position.AbsoluteTakeProfitProtections.ThirdTakeProfit is not None:\n    thirdTakeProfit = position.AbsoluteTakeProfitProtections.ThirdTakeProfit\n    api.Print(f\"Third take profit: {thirdTakeProfit.Volume} units at {thirdTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/ThirdTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtections/ThirdTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AcceleratorOscillator","kind":"interface","name":"AcceleratorOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AcceleratorOscillator","python":"AcceleratorOscillator","summary":"Identifies possible trend reversals","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var acceleratorOscillator = Indicators.AcceleratorOscillator();\nPrint(\"Accelerator Oscillator: {0}\", acceleratorOscillator.Result.LastValue);","python":"acceleratorOscillator = api.Indicators.AcceleratorOscillator()\napi.Print(f\"Accelerator Oscillator: {acceleratorOscillator.Result.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use an Accelerator Oscillator indicator\n    public partial class AcceleratorOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private AcceleratorOscillator _acceleratorOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _acceleratorOscillator = Indicators.AcceleratorOscillator();\n        }\n\n        protected override void OnBar()\n        {\n            foreach (var position in BotPositions)\n            {\n                if ((position.TradeType == TradeType.Buy && _acceleratorOscillator.Result.Last(1) < _acceleratorOscillator.Result.Last(2))\n                    || (position.TradeType == TradeType.Sell && _acceleratorOscillator.Result.Last(1) > _acceleratorOscillator.Result.Last(2)))\n                {\n                    ClosePosition(position);\n                }\n            }\n\n            if (_acceleratorOscillator.Result.Last(1) > 0 && _acceleratorOscillator.Result.Last(2) <= 0)\n            {\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_acceleratorOscillator.Result.Last(1) < 0 && _acceleratorOscillator.Result.Last(2) >= 0)\n            {\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AcceleratorOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.acceleratorOscillator = api.Indicators.AcceleratorOscillator()\n\n    def on_bar_closed(self):\n        for position in self.get_bot_positions():\n            if (position.TradeType == TradeType.Buy and self.acceleratorOscillator.Result.Last(0) < self.acceleratorOscillator.Result.Last(1)) or (position.TradeType == TradeType.Sell and self.acceleratorOscillator.Result.Last(0) > self.acceleratorOscillator.Result.Last(1)):\n                api.ClosePosition(position)\n\n        if self.acceleratorOscillator.Result.Last(0) > 0 and self.acceleratorOscillator.Result.Last(1) <= 0:\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif (self.acceleratorOscillator.Result.Last(0) < 0 and self.acceleratorOscillator.Result.Last(1) >= 0):\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AcceleratorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AcceleratorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AcceleratorOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.AcceleratorOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"acceleratorOscillator.Result: IndicatorDataSeries","summary":"AcceleratorOscillator calculation result","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var acceleratorOscillator = Indicators.AcceleratorOscillator();\nPrint(\"Last closed bar value: {0}\", acceleratorOscillator.Result.Last(1));","python":"acceleratorOscillator = api.Indicators.AcceleratorOscillator()\napi.Print(f\"Last closed bar value: {acceleratorOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AcceleratorOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AcceleratorOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AccessRights","kind":"enum","name":"AccessRights","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public enum AccessRights","python":"AccessRights","summary":"cBots and Indicators Access Rights.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // The AccessRights key of config.json sets the access rights of a cBot, an indicator or a plugin\n    // The default value is None, which means your indicator/cBot will not access anything outside\n    // like files, network, windows registry, etc\n    // If you try to access any of aforementioned resources you will see an access right error on\n    // cTrader automate logs tab if your indicator/cBot access rights were not enough.\n    // The FullAccess gives you access to everything, it is like executing a .NET standalone app\n    // on a Windows machine.\n    // The AccessRights allows cTrader to notify the user of your indicator/cBot that it will\n    // access which resources on his system, so he can decide to allow it or not\n    public partial class AccessRightSample : Indicator\n    {\n        protected override void Initialize()\n        {\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"class AccessRightSample():\n    def initialize(self):\n        api.Print(f\"Running in {api.RunningMode} mode\")","config":"{\n  \"AccessRights\": \"FullAccess\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AccessRights.None","kind":"enum value","name":"None","type":"T:cAlgo.API.AccessRights","namespace":"cAlgo.API","group":"Application","csharp":"AccessRights.None;","python":"AccessRights.None","summary":"Algorithm doesn’t require any access rights.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AccessRights.FileSystem","kind":"enum value","name":"FileSystem","type":"T:cAlgo.API.AccessRights","namespace":"cAlgo.API","group":"Application","csharp":"AccessRights.FileSystem;","python":"AccessRights.FileSystem","summary":"Access to file system.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"The access right is not supported in .NET 6.0 and higher","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AccessRights.Internet","kind":"enum value","name":"Internet","type":"T:cAlgo.API.AccessRights","namespace":"cAlgo.API","group":"Application","csharp":"AccessRights.Internet;","python":"AccessRights.Internet","summary":"Access to Internet or other networks.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"The access right is not supported in .NET 6.0 and higher","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AccessRights.Registry","kind":"enum value","name":"Registry","type":"T:cAlgo.API.AccessRights","namespace":"cAlgo.API","group":"Application","csharp":"AccessRights.Registry;","python":"AccessRights.Registry","summary":"Access to windows registry.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"The access right is not supported in .NET 6.0 and higher","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AccessRights.FullAccess","kind":"enum value","name":"FullAccess","type":"T:cAlgo.API.AccessRights","namespace":"cAlgo.API","group":"Application","csharp":"AccessRights.FullAccess;","python":"AccessRights.FullAccess","summary":"The unlimited access rights.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AccountSwitchedEventArgs","kind":"class","name":"AccountSwitchedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AccountSwitchedEventArgs","python":"AccountSwitchedEventArgs","summary":"Provides data for the account switched event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Account.Switched += OnAccountSwitched;\n}\n\nprivate void OnAccountSwitched(AccountSwitchedEventArgs args)\n{\n    Print(\"Account switched from {0} to {1}\", args.PreviousAccountNumber, args.CurrentAccountNumber);\n}","python":"def on_start(self):\n    api.Account.Switched += self.on_account_switched\n\ndef on_account_switched(self, args):\n    api.Print(f\"Account switched from {args.PreviousAccountNumber} to {args.CurrentAccountNumber}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AccountSwitchedEventArgs.CurrentAccountNumber","kind":"property","name":"CurrentAccountNumber","type":"T:cAlgo.API.AccountSwitchedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int CurrentAccountNumber {get;}","python":"accountSwitchedEventArgs.CurrentAccountNumber: int","summary":"Returns new account number.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Account.Switched += OnAccountSwitched;\n}\n\nprivate void OnAccountSwitched(AccountSwitchedEventArgs args)\n{\n    Print(\"Now trading on account {0}, balance: {1}\", args.CurrentAccountNumber, Account.Balance);\n}","python":"def on_start(self):\n    api.Account.Switched += self.on_account_switched\n\ndef on_account_switched(self, args):\n    api.Print(f\"Now trading on account {args.CurrentAccountNumber}, balance: {api.Account.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/CurrentAccountNumber/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/CurrentAccountNumber/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AccountSwitchedEventArgs.PreviousAccountNumber","kind":"property","name":"PreviousAccountNumber","type":"T:cAlgo.API.AccountSwitchedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int PreviousAccountNumber {get;}","python":"accountSwitchedEventArgs.PreviousAccountNumber: int","summary":"Returns previous account number.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Account.Switched += OnAccountSwitched;\n}\n\nprivate void OnAccountSwitched(AccountSwitchedEventArgs args)\n{\n    Print(\"Previous account number: {0}\", args.PreviousAccountNumber);\n}","python":"def on_start(self):\n    api.Account.Switched += self.on_account_switched\n\ndef on_account_switched(self, args):\n    api.Print(f\"Previous account number: {args.PreviousAccountNumber}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/PreviousAccountNumber/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/PreviousAccountNumber/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.AccountType","kind":"enum","name":"AccountType","type":null,"namespace":"cAlgo.API.Internals","group":"Account","csharp":"public enum AccountType","python":"AccountType","summary":"Returns current account type","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the AccountType\n    public partial class AccountTypeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var text = string.Format(\"Account Type: {0}\", Account.AccountType);\n\n            Chart.DrawStaticText(\"text\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.DrawStaticText(\"text\", f\"Account Type: {api.Account.AccountType}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Internals.AccountType.Hedged","kind":"enum value","name":"Hedged","type":"T:cAlgo.API.Internals.AccountType","namespace":"cAlgo.API.Internals","group":"Account","csharp":"AccountType.Hedged;","python":"AccountType.Hedged","summary":"Account type that allows hedged positions","remarks":null,"parameters":[],"returns":{"csharpType":"AccountType","pythonType":"AccountType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Internals.AccountType.Netted","kind":"enum value","name":"Netted","type":"T:cAlgo.API.Internals.AccountType","namespace":"cAlgo.API.Internals","group":"Account","csharp":"AccountType.Netted;","python":"AccountType.Netted","summary":"Account type that allows only single net position per symbol","remarks":null,"parameters":[],"returns":{"csharpType":"AccountType","pythonType":"AccountType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/AccountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AccumulationDistribution","kind":"interface","name":"AccumulationDistribution","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AccumulationDistribution","python":"AccumulationDistribution","summary":"Accumulation Distribution indicator is an indicator that can identify if the market is driven by buyers (accumulation) or by sellers (distribution)","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private AccumulationDistribution _accumulationDistribution;\n\nprotected override void OnStart()\n{\n    _accumulationDistribution = Indicators.AccumulationDistribution();\n}\n\nprotected override void OnBar()\n{\n    Print(\"Accumulation Distribution: {0}\", _accumulationDistribution.Result.Last(1));\n}","python":"def on_start(self):\n    self.accumulationDistribution = api.Indicators.AccumulationDistribution()\n\ndef on_bar(self):\n    api.Print(f\"Accumulation Distribution: {self.accumulationDistribution.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AccumulationDistribution.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.AccumulationDistribution","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"accumulationDistribution.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Accumulation Distribution indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var accumulationDistribution = Indicators.AccumulationDistribution();\nPrint(\"Last closed bar value: {0}\", accumulationDistribution.Result.Last(1));","python":"accumulationDistribution = api.Indicators.AccumulationDistribution()\napi.Print(f\"Last closed bar value: {accumulationDistribution.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulationDistribution/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulationDistribution/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AccumulativeSwingIndex","kind":"interface","name":"AccumulativeSwingIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AccumulativeSwingIndex","python":"AccumulativeSwingIndex","summary":"A variation on Wilder's swing index which plots an accumulation of the swing index value of each candlestick or bar.","remarks":"The accumulative swing index is used to gain a longer-term picture than the Wilder's swing index. When the accumulative swing index is positive, the long-term trend is up. When the accumulative swing index is negative, it signals a downwards long-term trend.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    public partial class AccumSwingIndexReferenceExample:Indicator\n    {\n        private AccumulativeSwingIndex _accumulativeSwingIndex;\n\n        protected override void Initialize()\n        {\n            _accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);\n        }\n        public override void Calculate(int index)\n        {\n            // Display Result of Indicator\n            Result[index] = _accumulativeSwingIndex.Result[index];\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.accumulativeSwingIndex = api.Indicators.AccumulativeSwingIndex(api.LimitMove)\n\n    def calculate(self, index):\n        api.Result[index] = self.accumulativeSwingIndex.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"LimitMove\",\n      \"DisplayName\": \"Limit Move\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 12\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use an Accumulative Swing Index indicator\n    public partial class AccumulativeSwingIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private AccumulativeSwingIndex _accumulativeSwingIndex;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(12);\n        }\n\n        protected override void OnBar()\n        {\n            foreach (var position in BotPositions)\n            {\n                if ((position.TradeType == TradeType.Buy && _accumulativeSwingIndex.Result.Last(1) < _accumulativeSwingIndex.Result.Last(2))\n                    || (position.TradeType == TradeType.Sell && _accumulativeSwingIndex.Result.Last(1) > _accumulativeSwingIndex.Result.Last(2)))\n                {\n                    ClosePosition(position);\n                }\n            }\n\n            if (_accumulativeSwingIndex.Result.Last(1) > 0 && _accumulativeSwingIndex.Result.Last(2) <= 0)\n            {\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_accumulativeSwingIndex.Result.Last(1) < 0 && _accumulativeSwingIndex.Result.Last(2) >= 0)\n            {\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AccumulativeSwingIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.accumulativeSwingIndex = api.Indicators.AccumulativeSwingIndex(12)\n\n    def on_bar_closed(self):\n        for position in self.get_bot_positions():\n            if (position.TradeType == TradeType.Buy and self.accumulativeSwingIndex.Result.Last(0) < self.accumulativeSwingIndex.Result.Last(1)) or (position.TradeType == TradeType.Sell and self.accumulativeSwingIndex.Result.Last(0) > self.accumulativeSwingIndex.Result.Last(1)):\n                api.ClosePosition(position)\n\n        if self.accumulativeSwingIndex.Result.Last(0) > 0 and self.accumulativeSwingIndex.Result.Last(1) <= 0:\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif (self.accumulativeSwingIndex.Result.Last(0) < 0 and self.accumulativeSwingIndex.Result.Last(1) >= 0):\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulativeSwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulativeSwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AccumulativeSwingIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.AccumulativeSwingIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"accumulativeSwingIndex.Result: IndicatorDataSeries","summary":"The time series of AccumulativeSwingIndex.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Output Series of AccumulativeSwingIndex.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\n\nprivate AccumulativeSwingIndex _accumulativeSwingIndex;\n\n//...\n\n//...\n\nprotected override void OnStart()\n{\n    _accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);\n}\nprotected override void OnBar()\n{\n    // Print to log\n    Print(\"The Current Accumulative Swing Index is: {0}\", _accumulativeSwingIndex.Result.LastValue);\n}\n\n//...","python":"def on_start(self):\n    self.accumulativeSwingIndex = api.Indicators.AccumulativeSwingIndex(api.LimitMove)\n\ndef on_bar_closed(self):\n    api.Print(f\"The Current Accumulative Swing Index is: {self.accumulativeSwingIndex.Result.LastValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"LimitMove\",\n      \"DisplayName\": \"Limit Move\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 12\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulativeSwingIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AccumulativeSwingIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ActiveFrameChangedEventArgs","kind":"class","name":"ActiveFrameChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ActiveFrameChangedEventArgs","python":"ActiveFrameChangedEventArgs","summary":"Provides data for the active frame changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ActiveFrameChanged += OnActiveFrameChanged;\n}\n\nprivate void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)\n{\n    var oldFrameId = args.OldFrame?.Id ?? \"none\";\n    var newFrameId = args.NewFrame?.Id ?? \"none\";\n    Print(\"Active frame changed from {0} to {1}\", oldFrameId, newFrameId);\n}","python":"def on_start(self):\n    api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed\n\ndef on_active_frame_changed(self, args):\n    old_frame_id = args.OldFrame.Id if args.OldFrame is not None else \"none\"\n    new_frame_id = args.NewFrame.Id if args.NewFrame is not None else \"none\"\n    api.Print(f\"Active frame changed from {old_frame_id} to {new_frame_id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ActiveFrameChangedEventArgs.NewFrame","kind":"property","name":"NewFrame","type":"T:cAlgo.API.ActiveFrameChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame NewFrame {get;}","python":"activeFrameChangedEventArgs.NewFrame: Frame","summary":"Returns the new active frame or null.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ActiveFrameChanged += OnActiveFrameChanged;\n}\n\nprivate void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)\n{\n    if (args.NewFrame != null)\n        Print(\"New active frame: {0}, size: {1} x {2}\", args.NewFrame.Id, args.NewFrame.Width, args.NewFrame.Height);\n}","python":"def on_start(self):\n    api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed\n\ndef on_active_frame_changed(self, args):\n    if args.NewFrame is not None:\n        api.Print(f\"New active frame: {args.NewFrame.Id}, size: {args.NewFrame.Width} x {args.NewFrame.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/NewFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/NewFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ActiveFrameChangedEventArgs.OldFrame","kind":"property","name":"OldFrame","type":"T:cAlgo.API.ActiveFrameChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame OldFrame {get;}","python":"activeFrameChangedEventArgs.OldFrame: Frame","summary":"Returns the old / previous active frame or null.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ActiveFrameChanged += OnActiveFrameChanged;\n}\n\nprivate void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)\n{\n    if (args.OldFrame != null)\n        Print(\"Previous active frame: {0}, index: {1}\", args.OldFrame.Id, args.OldFrame.Index);\n}","python":"def on_start(self):\n    api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed\n\ndef on_active_frame_changed(self, args):\n    if args.OldFrame is not None:\n        api.Print(f\"Previous active frame: {args.OldFrame.Id}, index: {args.OldFrame.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/OldFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ActiveFrameChangedEventArgs/OldFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Internals.Algo","kind":"class","name":"Algo","type":null,"namespace":"cAlgo.API.Internals","group":"General","csharp":"public class Algo","python":"Algo","summary":"The container class for the main cAlgo.API Interfaces.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class AlgoSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Symbol: {0}, TimeFrame: {1}, Server time: {2}\", SymbolName, TimeFrame, Server.Time);\n        Print(\"Open positions: {0}, Pending orders: {1}\", Positions.Count, PendingOrders.Count);\n    }\n}","python":"class AlgoSample():\n    def on_start(self):\n        api.Print(f\"Symbol: {api.SymbolName}, TimeFrame: {api.TimeFrame}, Server time: {api.Server.Time}\")\n        api.Print(f\"Open positions: {api.Positions.Count}, Pending orders: {api.PendingOrders.Count}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.BeginInvokeOnMainThread(System.Action)","kind":"method","name":"BeginInvokeOnMainThread","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void BeginInvokeOnMainThread(Action action)","python":"api.BeginInvokeOnMainThread(action: Action) -> None","summary":"Invokes asynchronously the specified code on the main cBot or Indicator thread.","remarks":null,"parameters":[{"name":"action","csharpType":"Action","pythonType":"Action","summary":"The code to invoke on the main cBot/Indicator thread"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Task.Run(() =>\n{\n    var result = Math.Sqrt(2);\n    BeginInvokeOnMainThread(() => Print(\"Calculated on a background thread: {0}\", result));\n});","python":"api.BeginInvokeOnMainThread(lambda: api.Print(f\"Running on the main thread at {api.Server.Time}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/BeginInvokeOnMainThread/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/BeginInvokeOnMainThread/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.CreateDataSeries","kind":"method","name":"CreateDataSeries","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public IndicatorDataSeries CreateDataSeries()","python":"api.CreateDataSeries() -> IndicatorDataSeries","summary":"Initialization of an IndicatorDataSeries.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private IndicatorDataSeries series;\n\nprotected override void Initialize()\n{\n    series = CreateDataSeries();\n}\npublic override void Calculate(int index)\n{\n    series[index] = (Bars.ClosePrices[index] + Bars.OpenPrices[index]) / 2;\n}","python":"def initialize(self):\n    self.series = api.CreateDataSeries()\n\ndef calculate(self, index):\n    self.series[index] = (api.Bars.ClosePrices[index] + api.Bars.OpenPrices[index]) / 2"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/CreateDataSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/CreateDataSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.OnException(System.Exception)","kind":"method","name":"OnException","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"protected internal void OnException(Exception exception)","python":"api.OnException(exception: Exception) -> None","summary":"Called on each unhandled exception.","remarks":null,"parameters":[{"name":"exception","csharpType":"Exception","pythonType":"Exception","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnException(Exception exception)\n{\n    // Place your exception handling code here\n    Print(exception.Message);\n}","python":"def on_exception(self, exception):\n    api.Print(exception.Message)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/OnException/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/OnException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.OnTimer","kind":"method","name":"OnTimer","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"protected void OnTimer()","python":"api.OnTimer() -> None","summary":"Called when the timer interval has elapsed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(1);//start timer with 1 second interval\n}\n\nprotected override void OnTimer()\n{\n    Chart.DrawStaticText(\"time\", Time.ToString(\"HH:mm:ss\"), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red);\n}","python":"def on_start(self):\n    api.Timer.Start(1)\n\ndef on_timer(self):\n    api.Chart.DrawStaticText(\"time\", str(api.Time), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/OnTimer/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/OnTimer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.Print(System.Object)","kind":"method","name":"Print","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Print(object value)","python":"api.Print(value: object) -> None","summary":"Prints text representation of the specified object to the log.","remarks":null,"parameters":[{"name":"value","csharpType":"object","pythonType":"object","summary":"Object to print."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(Positions.Count);","python":"api.Print(api.Positions.Count)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lines go to ctrader-cli standard output as 'time | level | message'; no Log tab and no instance log file is written."},{"name":"Cloud","support":"Partial","behaviour":"Lines go to the cloud host output as 'level | message' with no timestamp; no instance log file is written."}]}
{"id":"M:cAlgo.API.Internals.Algo.Print(System.Object[])","kind":"method","name":"Print","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Print(object[] parameters)","python":"api.Print(parameters: list[object]) -> None","summary":"Prints a message to the Log","remarks":null,"parameters":[{"name":"parameters","csharpType":"object[]","pythonType":"list[object]","summary":"Parameters to print"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(Account.Balance, \" \", Account.Equity);","python":"api.Print(api.Account.Balance, \" \", api.Account.Equity)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lines go to ctrader-cli standard output as 'time | level | message'; no Log tab and no instance log file is written."},{"name":"Cloud","support":"Partial","behaviour":"Lines go to the cloud host output as 'level | message' with no timestamp; no instance log file is written."}]}
{"id":"M:cAlgo.API.Internals.Algo.Print(System.String,System.Object[])","kind":"method","name":"Print","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Print(string message, object[] parameters)","python":"api.Print(message: str, parameters: list[object]) -> None","summary":"Prints a message to the Log.","remarks":null,"parameters":[{"name":"message","csharpType":"string","pythonType":"str","summary":"Message to print."},{"name":"parameters","csharpType":"object[]","pythonType":"list[object]","summary":"Parameters (optional)"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current Balance is {0}, Equity is {1}.\", Account.Balance, Account.Equity);","python":"api.Print(f\"Current Balance is {api.Account.Balance}, Equity is {api.Account.Equity}.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lines go to ctrader-cli standard output as 'time | level | message'; no Log tab and no instance log file is written."},{"name":"Cloud","support":"Partial","behaviour":"Lines go to the cloud host output as 'level | message' with no timestamp; no instance log file is written."}]}
{"id":"M:cAlgo.API.Internals.Algo.RefreshData","kind":"method","name":"RefreshData","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void RefreshData()","python":"api.RefreshData() -> None","summary":"Updates Bars, Positions, PendingOrders, History, etc. And sends postponed events after Thread sleep call. If you put the main thread on sleep by calling Thread sleep method then you have to call RefreshData after Thread wakes up to send the postponed events while thread was sleeping.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var operations = new List<TradeOperation>();\nfor (var i = 0; i < 5; i++)\n    operations.Add(ExecuteMarketOrderAsync(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin));\nwhile (operations.Any(operation => operation.IsExecuting))\n{\n    System.Threading.Thread.Sleep(100);\n    // Without RefreshData the trade results are not delivered while the thread sleeps\n    RefreshData();\n}\nPrint(\"Open positions: {0}\", Positions.Count);","python":"operations = [api.ExecuteMarketOrderAsync(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin) for i in range(5)]\nwhile any(operation.IsExecuting for operation in operations):\n    api.Sleep(100)\n    # Without RefreshData the trade results are not delivered while the thread sleeps\n    api.RefreshData()\napi.Print(f\"Open positions: {api.Positions.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/RefreshData/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/RefreshData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.Sleep(System.TimeSpan)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Sleep(TimeSpan timespan)","python":"api.Sleep(timespan: TimeSpan) -> None","summary":"Suspends the algorithm until the specified timespan elapses.","remarks":null,"parameters":[{"name":"timespan","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The Timespan during which the algorithm should not react to any events."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Sleep(TimeSpan.FromSeconds(5));\nPrint(\"Resumed at {0}\", Server.Time);","python":"from System import TimeSpan\napi.Sleep(TimeSpan.FromSeconds(5))\napi.Print(f\"Resumed at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.Sleep(System.Int32)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Sleep(int milliseconds)","python":"api.Sleep(milliseconds: int) -> None","summary":"Suspends the algorithm until the specified number of milliseconds elapses.","remarks":null,"parameters":[{"name":"milliseconds","csharpType":"int","pythonType":"int","summary":"The number of milliseconds for which the algorithm should be suspended."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Sleep(500);\nPrint(\"Resumed at {0}\", Server.Time);","python":"api.Sleep(500)\napi.Print(f\"Resumed at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Algo.Sleep(System.DateTime)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public void Sleep(DateTime dateTime)","python":"api.Sleep(dateTime: DateTime) -> None","summary":"Suspends the algorithm until the specified datetime .","remarks":null,"parameters":[{"name":"dateTime","csharpType":"DateTime","pythonType":"DateTime","summary":"The DateTime until the algorithm should be suspended."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wakeUpTime = Server.Time.AddMinutes(1);\nSleep(wakeUpTime);\nPrint(\"Resumed at {0}\", Server.Time);","python":"wakeUpTime = api.Server.Time.AddMinutes(1)\napi.Sleep(wakeUpTime)\napi.Print(f\"Resumed at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.AlgoRegistry","kind":"property","name":"AlgoRegistry","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public AlgoRegistry AlgoRegistry {get;}","python":"api.AlgoRegistry: AlgoRegistry","summary":"Provides access to installed Algorithms.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoRegistry","pythonType":"AlgoRegistry","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Installed algos: {0}\", AlgoRegistry.Count);\nforeach (var indicatorType in AlgoRegistry.Indicators)\n    Print(\"Indicator: {0}\", indicatorType.Name);","python":"api.Print(f\"Installed algos: {api.AlgoRegistry.Count}\")\nfor indicatorType in api.AlgoRegistry.Indicators:\n    api.Print(f\"Indicator: {indicatorType.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/AlgoRegistry/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/AlgoRegistry/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Application","kind":"property","name":"Application","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Application Application {get;}","python":"api.Application: Application","summary":"Represents the application.","remarks":null,"parameters":[],"returns":{"csharpType":"Application","pythonType":"Application","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"cTrader version: {0}, color theme: {1}\", Application.Version, Application.ColorTheme);","python":"api.Print(f\"cTrader version: {api.Application.Version}, color theme: {api.Application.ColorTheme}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Application/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Application/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public double Ask {get;}","python":"api.Ask: float","summary":"Gets the symbol ask price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Ask: {0}, spread: {1}\", Ask, Ask - Bid);","python":"api.Print(f\"Ask: {api.Ask}, spread: {api.Ask - api.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.AssetConverter","kind":"property","name":"AssetConverter","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public IAssetConverter AssetConverter {get;}","python":"api.AssetConverter: IAssetConverter","summary":"Converts an asset to another asset.","remarks":null,"parameters":[],"returns":{"csharpType":"IAssetConverter","pythonType":"IAssetConverter","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var valueInCad = AssetConverter.Convert(100, \"USD\", \"CAD\");\nPrint(\"100 USD is {0} CAD\", valueInCad);","python":"valueInCad = api.AssetConverter.Convert(100, \"USD\", \"CAD\")\napi.Print(f\"100 USD is {valueInCad} CAD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/AssetConverter/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/AssetConverter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Assets","kind":"property","name":"Assets","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Assets Assets {get;}","python":"api.Assets: Assets","summary":"Returns list of all available assets.","remarks":null,"parameters":[],"returns":{"csharpType":"Assets","pythonType":"Assets","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Assets count: {0}\", Assets.Count);\nif (Assets.Exists(\"USD\"))\n    Print(\"USD digits: {0}\", Assets.GetAsset(\"USD\").Digits);","python":"api.Print(f\"Assets count: {api.Assets.Count}\")\nif api.Assets.Exists(\"USD\"):\n    api.Print(f\"USD digits: {api.Assets.GetAsset('USD').Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Assets/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Assets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Bars Bars {get;}","python":"api.Bars: Bars","summary":"The collection of Bar objects.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastBar = Bars.LastBar;\nPrint(\"Bars: {0}, last bar open: {1}, close: {2}\", Bars.Count, lastBar.Open, lastBar.Close);","python":"lastBar = api.Bars.LastBar\napi.Print(f\"Bars: {api.Bars.Count}, last bar open: {lastBar.Open}, close: {lastBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public double Bid {get;}","python":"api.Bid: float","summary":"Gets the symbol bid price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Bid: {0}\", Bid);","python":"api.Print(f\"Bid: {api.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Chart Chart {get;}","python":"api.Chart: Chart","summary":"Represents the chart where cBot or Indicator is launched.","remarks":"Chart can be null for indicators that were run by a plugin.","parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Chart != null)\n    Chart.DrawStaticText(\"info\", SymbolName + \" \" + TimeFrame, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);","python":"if api.Chart is not None:\n    api.Chart.DrawStaticText(\"info\", f\"{api.SymbolName} {api.TimeFrame}\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.ChartIndicators","kind":"property","name":"ChartIndicators","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public ChartIndicators ChartIndicators {get;}","python":"api.ChartIndicators: ChartIndicators","summary":"Gets the ChartIndicators of an algorithm.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIndicators","pythonType":"ChartIndicators","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Indicators on chart: {0}\", ChartIndicators.Count);\nforeach (var indicator in ChartIndicators.Standard)\n    Print(\"{0} ({1})\", indicator.Name, indicator.InstanceId);","python":"api.Print(f\"Indicators on chart: {api.ChartIndicators.Count}\")\nfor indicator in api.ChartIndicators.Standard:\n    api.Print(f\"{indicator.Name} ({indicator.InstanceId})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartIndicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartIndicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.ChartRobots","kind":"property","name":"ChartRobots","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public ChartRobots ChartRobots {get;}","python":"api.ChartRobots: ChartRobots","summary":"Gets the ChartRobots of an algorithm.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRobots","pythonType":"ChartRobots","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"cBots on chart: {0}\", ChartRobots.Count);","python":"api.Print(f\"cBots on chart: {api.ChartRobots.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartRobots/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartRobots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.ChartTemplates","kind":"property","name":"ChartTemplates","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public ChartTemplates ChartTemplates {get;}","python":"api.ChartTemplates: ChartTemplates","summary":"Provides access to Chart Templates.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplates","pythonType":"ChartTemplates","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"Print(\"Default template: {0}\", ChartTemplates.DefaultTemplate.Name);\nif (ChartTemplates.Contains(\"My Template\"))\n    ChartTemplates.Get(\"My Template\").Apply(Chart);","python":"api.Print(f\"Default template: {api.ChartTemplates.DefaultTemplate.Name}\")\nif api.ChartTemplates.Contains(\"My Template\"):\n    api.ChartTemplates.Get(\"My Template\").Apply(api.Chart)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartTemplates/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/ChartTemplates/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Clipboard","kind":"property","name":"Clipboard","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Clipboard Clipboard {get;}","python":"api.Clipboard: Clipboard","summary":"Provides access to system Clipboard.","remarks":null,"parameters":[],"returns":{"csharpType":"Clipboard","pythonType":"Clipboard","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"Clipboard.SetText(Symbol.Bid.ToString());\nPrint(\"Clipboard text: {0}\", Clipboard.GetText());","python":"api.Clipboard.SetText(str(api.Symbol.Bid))\napi.Print(f\"Clipboard text: {api.Clipboard.GetText()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Clipboard/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Clipboard/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Compiler","kind":"property","name":"Compiler","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Compiler Compiler {get;}","python":"api.Compiler: Compiler","summary":"Provides access to algo compiler.","remarks":null,"parameters":[],"returns":{"csharpType":"Compiler","pythonType":"Compiler","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"C:\\Users\\me\\Documents\\cAlgo\\Sources\\Robots\\MyBot\\MyBot.csproj\");\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);","python":"result = api.Compiler.Compile(r\"C:\\Users\\me\\Documents\\cAlgo\\Sources\\Robots\\MyBot\\MyBot.csproj\")\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Compiler/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Compiler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.HistoricalOrders","kind":"property","name":"HistoricalOrders","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public HistoricalOrders HistoricalOrders {get;}","python":"api.HistoricalOrders: HistoricalOrders","summary":"Provides access to historical orders.","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrders","pythonType":"HistoricalOrders","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var lastOrder = HistoricalOrders.FindLast(\"myLabel\", SymbolName);\nif (lastOrder != null)\n    Print(\"Order {0} status: {1}, submitted at {2}\", lastOrder.Id, lastOrder.Status, lastOrder.SubmittedTime);","python":"lastOrder = api.HistoricalOrders.FindLast(\"myLabel\", api.SymbolName)\nif lastOrder is not None:\n    api.Print(f\"Order {lastOrder.Id} status: {lastOrder.Status}, submitted at {lastOrder.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/HistoricalOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/HistoricalOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.History","kind":"property","name":"History","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public History History {get;}","python":"api.History: History","summary":"Represents the collection of all historical trades of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"History","pythonType":"History","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var trade in History)\n{\n    Print(\"Entry time: {0}, Net profit: {1}\", trade.EntryTime, trade.NetProfit);\n}","python":"for trade in api.History:\n    api.Print(f\"Entry time: {trade.EntryTime}, Net profit: {trade.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Http","kind":"property","name":"Http","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Http Http {get;}","python":"api.Http: Http","summary":"Send HTTP requests.","remarks":null,"parameters":[],"returns":{"csharpType":"Http","pythonType":"Http","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://www.example.com\");\nif (response.IsSuccessful)\n    Print(\"Body length: {0}\", response.Body.Length);\nelse\n    Print(\"Request failed with status code {0}\", response.StatusCode);","python":"response = api.Http.Get(\"https://www.example.com\")\nif response.IsSuccessful:\n    api.Print(f\"Body length: {len(response.Body)}\")\nelse:\n    api.Print(f\"Request failed with status code {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Http/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Http/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Indicators","kind":"property","name":"Indicators","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public IIndicatorsAccessor Indicators {get;}","python":"api.Indicators: IIndicatorsAccessor","summary":"Access to the built-in Indicators.","remarks":null,"parameters":[],"returns":{"csharpType":"IIndicatorsAccessor","pythonType":"IIndicatorsAccessor","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\nPrint(\"SMA(20) last value: {0}\", sma.Result.LastValue);","python":"sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\napi.Print(f\"SMA(20) last value: {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Indicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Indicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.InstanceId","kind":"property","name":"InstanceId","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public string InstanceId {get;}","python":"api.InstanceId: str","summary":"Returns unique ID of current running instance.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Instance id: {0}\", InstanceId);","python":"api.Print(f\"Instance id: {api.InstanceId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/InstanceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/InstanceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.InstanceTitle","kind":"property","name":"InstanceTitle","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public string InstanceTitle {get; set;}","python":"api.InstanceTitle: str","summary":"Gets or sets instance title.","remarks":"Set value is only used while instance is running.","parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"InstanceTitle = \"EURUSD scalper\";\nPrint(\"Instance title: {0}\", InstanceTitle);","python":"api.InstanceTitle = \"EURUSD scalper\"\napi.Print(f\"Instance title: {api.InstanceTitle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/InstanceTitle/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/InstanceTitle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Returns an empty string until set; a set value is kept locally only, not validated (no 1-60 length check) and shown nowhere."},{"name":"Cloud","support":"Partial","behaviour":"Returns an empty string until set; a set value is kept locally only, not validated (no 1-60 length check) and shown nowhere."}]}
{"id":"P:cAlgo.API.Internals.Algo.IsBacktesting","kind":"property","name":"IsBacktesting","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public bool IsBacktesting {get;}","python":"api.IsBacktesting: bool","summary":"True if a cBot is in the Backtesting mode, otherwise False.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (IsBacktesting)\n    Print(\"Backtesting, last bar open time: {0}\", Bars.OpenTimes.LastValue);","python":"if api.IsBacktesting:\n    api.Print(f\"Backtesting, last bar open time: {api.Bars.OpenTimes.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/IsBacktesting/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/IsBacktesting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.LocalStorage","kind":"property","name":"LocalStorage","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public LocalStorage LocalStorage {get;}","python":"api.LocalStorage: LocalStorage","summary":"Access the local storage API.","remarks":null,"parameters":[],"returns":{"csharpType":"LocalStorage","pythonType":"LocalStorage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"lastStartTime\", Server.Time.ToString(\"O\"), LocalStorageScope.Instance);\nLocalStorage.Flush(LocalStorageScope.Instance);\nvar lastStartTime = LocalStorage.GetString(\"lastStartTime\", LocalStorageScope.Instance);\nPrint(\"Last start time: {0}\", lastStartTime);","python":"api.LocalStorage.SetString(\"lastStartTime\", api.Server.Time.ToString(\"O\"), LocalStorageScope.Instance)\napi.LocalStorage.Flush(LocalStorageScope.Instance)\nlastStartTime = api.LocalStorage.GetString(\"lastStartTime\", LocalStorageScope.Instance)\napi.Print(f\"Last start time: {lastStartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/LocalStorage/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/LocalStorage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.MarketData","kind":"property","name":"MarketData","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public MarketData MarketData {get;}","python":"api.MarketData: MarketData","summary":"Provides access to the Depth of Market Data.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketData","pythonType":"MarketData","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily, \"EURUSD\");\nPrint(\"EURUSD daily close: {0}\", dailyBars.ClosePrices.LastValue);\nvar marketDepth = MarketData.GetMarketDepth(\"EURUSD\");\nPrint(\"EURUSD depth: {0} bid entries\", marketDepth.BidEntries.Count);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily, \"EURUSD\")\napi.Print(f\"EURUSD daily close: {dailyBars.ClosePrices.LastValue}\")\nmarketDepth = api.MarketData.GetMarketDepth(\"EURUSD\")\napi.Print(f\"EURUSD depth: {marketDepth.BidEntries.Count} bid entries\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.MarketSessions","kind":"property","name":"MarketSessions","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public MarketSession MarketSessions {get;}","python":"api.MarketSessions: MarketSession","summary":"Returns current market sessions.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current market sessions: {0}\", MarketSessions);\nif (MarketSessions.HasFlag(MarketSession.London))\n    Print(\"London session is open\");","python":"api.Print(f\"Current market sessions: {api.MarketSessions}\")\nif api.MarketSessions.HasFlag(MarketSession.London):\n    api.Print(\"London session is open\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketSessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketSessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Messages","kind":"property","name":"Messages","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Messages Messages {get;}","python":"api.Messages: Messages","summary":"Access the messaging API.","remarks":null,"parameters":[],"returns":{"csharpType":"Messages","pythonType":"Messages","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<string>(\"signals\", args => Print(\"Received {0} from {1}\", args.Message, args.SenderInstanceId));\nMessages.Send(\"signals\", \"BUY EURUSD\");","python":"# Not available in Python: Messages.Subscribe needs a generic message type argument\napi.Messages.Send(\"signals\", \"BUY EURUSD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Messages/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Messages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Notifications","kind":"property","name":"Notifications","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public INotifications Notifications {get;}","python":"api.Notifications: INotifications","summary":"Represents the notifications, such as sounds and email.","remarks":null,"parameters":[],"returns":{"csharpType":"INotifications","pythonType":"INotifications","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Notifications.PlaySound(@\"C:\\Windows\\Media\\notify.wav\");\nNotifications.SendEmail(\"from@example.com\", \"to@example.com\", \"EURUSD alert\", \"EURUSD crossed 1.1000\");","python":"api.Notifications.PlaySound(r\"C:\\Windows\\Media\\notify.wav\")\napi.Notifications.SendEmail(\"from@example.com\", \"to@example.com\", \"EURUSD alert\", \"EURUSD crossed 1.1000\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Notifications/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Notifications/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.PendingOrders","kind":"property","name":"PendingOrders","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public PendingOrders PendingOrders {get;}","python":"api.PendingOrders: PendingOrders","summary":"The array of all Pending Orders of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrders","pythonType":"PendingOrders","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if (order.StopLossPips == null)\n        order.ModifyStopLossPips(20);\n}\nPrint(\"Pending orders: {0}\", PendingOrders.Count);","python":"for order in api.PendingOrders:\n    if order.StopLossPips is None:\n        order.ModifyStopLossPips(20)\napi.Print(f\"Pending orders: {api.PendingOrders.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/PendingOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/PendingOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Positions Positions {get;}","python":"api.Positions: Positions","summary":"The list of all open positions of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"Positions","pythonType":"Positions","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    if (position.StopLoss == null)\n        position.ModifyStopLossPips(20);\n}\nvar sellPosition = Positions.Find(\"myLabel\", SymbolName, TradeType.Sell);\nif (sellPosition != null)\n    Print(\"Net profit: {0}\", sellPosition.NetProfit);","python":"for position in api.Positions:\n    if position.StopLoss is None:\n        position.ModifyStopLossPips(20)\nsellPosition = api.Positions.Find(\"myLabel\", api.SymbolName, TradeType.Sell)\nif sellPosition is not None:\n    api.Print(f\"Net profit: {sellPosition.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.PriceAlerts","kind":"property","name":"PriceAlerts","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public PriceAlerts PriceAlerts {get;}","python":"api.PriceAlerts: PriceAlerts","summary":"Provides access to Price Alerts.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlerts","pythonType":"PriceAlerts","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var alert = PriceAlerts.Add(Symbol, Symbol.Bid + 20 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\nPrint(\"Price alert {0} added at {1}, total alerts: {2}\", alert.Id, alert.Price, PriceAlerts.Count);","python":"alert = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 20 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\napi.Print(f\"Price alert {alert.Id} added at {alert.Price}, total alerts: {api.PriceAlerts.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/PriceAlerts/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/PriceAlerts/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.RunningMode","kind":"property","name":"RunningMode","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public RunningMode RunningMode {get;}","python":"api.RunningMode: RunningMode","summary":"Defines if a cBot is running in real time, in the silent backtesting mode, in the visual backtesting mode, or in the optimization mode.","remarks":null,"parameters":[],"returns":{"csharpType":"RunningMode","pythonType":"RunningMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Running mode: {0}\", RunningMode);\nif (RunningMode == RunningMode.Optimization)\n    Print(\"Optimization pass, chart drawings are skipped\");","python":"api.Print(f\"Running mode: {api.RunningMode}\")\nif api.RunningMode == RunningMode.Optimization:\n    api.Print(\"Optimization pass, chart drawings are skipped\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Server","kind":"property","name":"Server","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public IServer Server {get;}","python":"api.Server: IServer","summary":"Server related information.","remarks":null,"parameters":[],"returns":{"csharpType":"IServer","pythonType":"IServer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The server time is: {0}\", Server.Time);","python":"api.Print(f\"The server time is: {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Server/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Server/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Symbol Symbol {get;}","python":"api.Symbol: Symbol","summary":"Represents the current symbol provides access to its properties and certain methods","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"{0} Bid: {1}, Ask: {2}, Spread: {3} pips\", SymbolName, Symbol.Bid, Symbol.Ask, Symbol.Spread / Symbol.PipSize);\nvar volume = Symbol.NormalizeVolumeInUnits(Symbol.QuantityToVolumeInUnits(0.01), RoundingMode.Down);\nExecuteMarketOrder(TradeType.Buy, SymbolName, volume, \"myLabel\");","python":"api.Print(f\"{api.SymbolName} Bid: {api.Symbol.Bid}, Ask: {api.Symbol.Ask}, Spread: {api.Symbol.Spread / api.Symbol.PipSize} pips\")\nvolume = api.Symbol.NormalizeVolumeInUnits(api.Symbol.QuantityToVolumeInUnits(0.01), RoundingMode.Down)\napi.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, volume, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public string SymbolName {get;}","python":"api.SymbolName: str","summary":"Gets or sets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Algo symbol: {0}\", SymbolName);","python":"api.Print(f\"Algo symbol: {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Symbols","kind":"property","name":"Symbols","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Symbols Symbols {get;}","python":"api.Symbols: Symbols","summary":"Gets the symbol names.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbols","pythonType":"Symbols","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Symbols count: {0}\", Symbols.Count);\nif (Symbols.Exists(\"EURUSD\"))\n    Print(\"EURUSD bid: {0}\", Symbols.GetSymbol(\"EURUSD\").Bid);","python":"api.Print(f\"Symbols count: {api.Symbols.Count}\")\nif api.Symbols.Exists(\"EURUSD\"):\n    api.Print(f\"EURUSD bid: {api.Symbols.GetSymbol('EURUSD').Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Symbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Symbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Time","kind":"property","name":"Time","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public DateTime Time {get;}","python":"api.Time: DateTime","summary":"Returns the current server time. The shortcut to the Server.Time property.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The Server Time is: {0}\", Time);","python":"api.Print(f\"The Server Time is: {api.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public TimeFrame TimeFrame {get;}","python":"api.TimeFrame: TimeFrame","summary":"Access to the TimeFrame values.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (TimeFrame == TimeFrame.Daily)\n    Print(\"Running on the daily time frame\");\nelse\n    Print(\"Current time frame: {0}\", TimeFrame);","python":"if api.TimeFrame == TimeFrame.Daily:\n    api.Print(\"Running on the daily time frame\")\nelse:\n    api.Print(f\"Current time frame: {api.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public TimeFrames TimeFrames {get;}","python":"api.TimeFrames: TimeFrames","summary":"Gets collection of available TimeFrames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrames","pythonType":"TimeFrames","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var timeFrame in TimeFrames)\n    Print(\"{0} ({1})\", timeFrame.Name, timeFrame.ShortName);","python":"for timeFrame in api.TimeFrames:\n    api.Print(f\"{timeFrame.Name} ({timeFrame.ShortName})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.TimeInUtc","kind":"property","name":"TimeInUtc","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public DateTime TimeInUtc {get;}","python":"api.TimeInUtc: DateTime","summary":"Returns the current server time in UTC. The shortcut to the Server.TimeInUtc property.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The Server Time in UTC is: {0}\", TimeInUtc);","python":"api.Print(f\"The Server Time in UTC is: {api.TimeInUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeInUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeInUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.TimeZone","kind":"property","name":"TimeZone","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public TimeZoneInfo TimeZone {get;}","python":"api.TimeZone: TimeZoneInfo","summary":"TimeZone of a cBot or an Indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeZoneInfo","pythonType":"TimeZoneInfo","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Algo time zone: {0}, algo time: {1}\", TimeZone.DisplayName, Time);","python":"api.Print(f\"Algo time zone: {api.TimeZone.DisplayName}, algo time: {api.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/TimeZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Timer","kind":"property","name":"Timer","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Timer Timer {get;}","python":"api.Timer: Timer","summary":"Access to the Timer object.","remarks":null,"parameters":[],"returns":{"csharpType":"Timer","pythonType":"Timer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(1);//start timer with 1 second interval\n}\n\nprotected override void OnTimer()\n{\n    Chart.DrawStaticText(\"time\", Time.ToString(\"HH:mm:ss\"), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red);\n}","python":"def on_start(self):\n    api.Timer.Start(1)\n\ndef on_timer(self):\n    api.Chart.DrawStaticText(\"time\", str(api.Time), VerticalAlignment.Center, HorizontalAlignment.Center, Color.Red)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Timer/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Timer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Transactions","kind":"property","name":"Transactions","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Transactions Transactions {get;}","python":"api.Transactions: Transactions","summary":"Access account transactions.","remarks":null,"parameters":[],"returns":{"csharpType":"Transactions","pythonType":"Transactions","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Transactions: {0}\", Transactions.Count);\nforeach (var transaction in Transactions)\n    Print(\"{0} {1} {2}\", transaction.Time, transaction.Type, transaction.Amount);","python":"api.Print(f\"Transactions: {api.Transactions.Count}\")\nfor transaction in api.Transactions:\n    api.Print(f\"{transaction.Time} {transaction.Type} {transaction.Amount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Transactions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Transactions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.Watchlists","kind":"property","name":"Watchlists","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public Watchlists Watchlists {get;}","python":"api.Watchlists: Watchlists","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlists","pythonType":"Watchlists","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var watchlist in Watchlists)\n    Print(\"{0}: {1} symbols\", watchlist.Name, watchlist.SymbolNames.Count);","python":"for watchlist in api.Watchlists:\n    api.Print(f\"{watchlist.Name}: {watchlist.SymbolNames.Count} symbols\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Watchlists/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/Watchlists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Internals.Algo.MarketSessionsChanged","kind":"event","name":"MarketSessionsChanged","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public event Action<MarketSessionChangedEventArgs> MarketSessionsChanged;","python":"api.MarketSessionsChanged += handler  # handler(obj: MarketSessionChangedEventArgs)","summary":"Occurs when market sessions change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<MarketSessionChangedEventArgs>","pythonType":"Callable[[MarketSessionChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MarketSessionsChanged += OnMarketSessionsChanged;\n}\n\nprivate void OnMarketSessionsChanged(MarketSessionChangedEventArgs args)\n{\n    Print(\"Market sessions changed from {0} to {1}\", args.PreviousSessions, args.NewSessions);\n}","python":"def on_start(self):\n    api.MarketSessionsChanged += self.on_market_sessions_changed\n\ndef on_market_sessions_changed(self, args):\n    api.Print(f\"Market sessions changed from {args.PreviousSessions} to {args.NewSessions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketSessionsChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/MarketSessionsChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.ChartObjects","kind":"property","name":"ChartObjects","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public ChartObjects ChartObjects {get;}","python":"api.ChartObjects: ChartObjects","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjects","pythonType":"ChartObjects","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Chart instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Algo.MarketSeries","kind":"property","name":"MarketSeries","type":"T:cAlgo.API.Internals.Algo","namespace":"cAlgo.API.Internals","group":"General","csharp":"public MarketSeries MarketSeries {get;}","python":"api.MarketSeries: MarketSeries","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSeries","pythonType":"MarketSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Algo/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Algo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoInstanceParameter","kind":"interface","name":"AlgoInstanceParameter","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface AlgoInstanceParameter","python":"AlgoInstanceParameter","summary":"The interface representing an indicator / robot instance parameter. Provides properties that allow for accessing various information about an algo instance parameter.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var chartIndicator = Chart.Indicators.Add(\"Simple Moving Average\");\n\n        foreach (var parameter in chartIndicator.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        chartIndicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\n\n        for parameter in chartIndicator.Parameters:\n            print(f\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"public partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var chartRobot = Chart.Robots.Add(\"Sample Break Even\");\n        foreach (var parameter in chartRobot.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        chartRobot = api.Chart.Robots.Add(\"Sample Break Even\")\n\n        for parameter in chartRobot.Parameters:\n            print(f\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameter.DisplayName","kind":"property","name":"DisplayName","type":"T:cAlgo.API.AlgoInstanceParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string DisplayName {get;}","python":"algoInstanceParameter.DisplayName: str","summary":"Gets the display name of a parameter (shown in the 'Parameters' section of an instance).","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nforeach (var parameter in indicator.Parameters)\n    Print(\"Parameter display name: {0}\", parameter.DisplayName);","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nfor parameter in indicator.Parameters:\n    api.Print(f\"Parameter display name: {parameter.DisplayName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/DisplayName/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/DisplayName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameter.Name","kind":"property","name":"Name","type":"T:cAlgo.API.AlgoInstanceParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string Name {get;}","python":"algoInstanceParameter.Name: str","summary":"Gets the name of a parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nforeach (var parameter in indicator.Parameters)\n    Print(\"Parameter name: {0}\", parameter.Name);","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nfor parameter in indicator.Parameters:\n    api.Print(f\"Parameter name: {parameter.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameter.Type","kind":"property","name":"Type","type":"T:cAlgo.API.AlgoInstanceParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType Type {get;}","python":"algoInstanceParameter.Type: AlgoParameterType","summary":"Gets the ALgoParameterType of a parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nforeach (var parameter in indicator.Parameters)\n{\n    if (parameter.Type == AlgoParameterType.Integer)\n        Print(\"{0} is an integer parameter, value: {1}\", parameter.Name, parameter.Value);\n}","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nfor parameter in indicator.Parameters:\n    if parameter.Type == AlgoParameterType.Integer:\n        api.Print(f\"{parameter.Name} is an integer parameter, value: {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameter.Value","kind":"property","name":"Value","type":"T:cAlgo.API.AlgoInstanceParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"object Value {get; set;}","python":"algoInstanceParameter.Value: object","summary":"Gets the value of a parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nvar periods = indicator.Parameters[\"Periods\"];\nif (periods != null)\n{\n    Print(\"Current periods: {0}\", periods.Value);\n    periods.Value = 20;\n}","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nperiods = indicator.Parameters[\"Periods\"]\nif periods is not None:\n    api.Print(f\"Current periods: {periods.Value}\")\n    periods.Value = 20"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameter/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoInstanceParameters","kind":"interface","name":"AlgoInstanceParameters","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface AlgoInstanceParameters","python":"AlgoInstanceParameters","summary":"Represents the collection of all the parameters of an indicator or Robot.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var chartIndicator = Chart.Indicators.Add(\"Simple Moving Average\");\n\n        foreach (var parameter in chartIndicator.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        chartIndicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\n\n        for parameter in chartIndicator.Parameters:\n            print(f\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"public partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var chartRobot = Chart.Robots.Add(\"Sample Break Even\");\n        foreach (var parameter in chartRobot.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        chartRobot = api.Chart.Robots.Add(\"Sample Break Even\")\n\n        for parameter in chartRobot.Parameters:\n            print(f\"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameters.Count","kind":"property","name":"Count","type":"T:cAlgo.API.AlgoInstanceParameters","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"int Count {get;}","python":"algoInstanceParameters.Count: int","summary":"Gets the number of parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nPrint(\"Number of parameters: {0}\", indicator.Parameters.Count);","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\napi.Print(f\"Number of parameters: {indicator.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameters.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.AlgoInstanceParameters","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoInstanceParameter Item {get;}","python":"algoInstanceParameters[index: int] -> AlgoInstanceParameter","summary":"Gets a parameter by it is index.","remarks":"It will return null if index is out of range.","parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Parameter Index"}],"returns":{"csharpType":"AlgoInstanceParameter","pythonType":"AlgoInstanceParameter","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nvar firstParameter = indicator.Parameters[0];\nif (firstParameter != null)\n    Print(\"First parameter: {0} = {1}\", firstParameter.Name, firstParameter.Value);","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nfirstParameter = indicator.Parameters[0]\nif firstParameter is not None:\n    api.Print(f\"First parameter: {firstParameter.Name} = {firstParameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoInstanceParameters.Item(System.String)","kind":"property","name":"Item","type":"T:cAlgo.API.AlgoInstanceParameters","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoInstanceParameter Item {get;}","python":"algoInstanceParameters[name: str] -> AlgoInstanceParameter","summary":"Gets a parameter by it is name.","remarks":"It will return null if parameter not found.","parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Parameter Name"}],"returns":{"csharpType":"AlgoInstanceParameter","pythonType":"AlgoInstanceParameter","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var indicator = Chart.Indicators.Add(\"Simple Moving Average\");\nvar periods = indicator.Parameters[\"Periods\"];\nif (periods != null)\n    Print(\"Periods: {0}\", periods.Value);","python":"indicator = api.Chart.Indicators.Add(\"Simple Moving Average\")\nperiods = indicator.Parameters[\"Periods\"]\nif periods is not None:\n    api.Print(f\"Periods: {periods.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoInstanceParameters/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoKind","kind":"enum","name":"AlgoKind","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public enum AlgoKind","python":"AlgoKind","summary":"Represents the predefined kinds of algorithm types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        foreach (var algo in AlgoRegistry)\n        {\n            Print($\"Name: {algo.Name} | Kind: {algo.AlgoKind}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for algo in api.AlgoRegistry:\n            print(f\"Name: {algo.Name} | Kind: {algo.AlgoKind}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoKind.CustomIndicator","kind":"enum value","name":"CustomIndicator","type":"T:cAlgo.API.AlgoKind","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoKind.CustomIndicator;","python":"AlgoKind.CustomIndicator","summary":"Custom indicator","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoKind.StandardIndicator","kind":"enum value","name":"StandardIndicator","type":"T:cAlgo.API.AlgoKind","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoKind.StandardIndicator;","python":"AlgoKind.StandardIndicator","summary":"Standard / built-in indicator","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoKind.Robot","kind":"enum value","name":"Robot","type":"T:cAlgo.API.AlgoKind","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoKind.Robot;","python":"AlgoKind.Robot","summary":"Robot / cBot","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoKind.Plugin","kind":"enum value","name":"Plugin","type":"T:cAlgo.API.AlgoKind","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoKind.Plugin;","python":"AlgoKind.Plugin","summary":"Plugin","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoParameter","kind":"interface","name":"AlgoParameter","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface AlgoParameter","python":"AlgoParameter","summary":"Represents an algorithm parameter.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is not IndicatorType smaIndicatorType)\n            return;\n\n        foreach (var parameter in smaIndicatorType.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n\n        if indicatorType is None:\n            return\n\n        for parameter in IndicatorType(indicatorType).Parameters:\n            print(f\"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoParameter.DefaultValue","kind":"property","name":"DefaultValue","type":"T:cAlgo.API.AlgoParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"object DefaultValue {get;}","python":"algoParameter.DefaultValue: object","summary":"Gets default value of the parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var robotType in AlgoRegistry.Robots)\n{\n    foreach (var parameter in robotType.Parameters)\n        Print(\"{0}.{1} default value: {2}\", robotType.Name, parameter.Name, parameter.DefaultValue);\n}","python":"for robotType in api.AlgoRegistry.Robots:\n    for parameter in robotType.Parameters:\n        api.Print(f\"{robotType.Name}.{parameter.Name} default value: {parameter.DefaultValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/DefaultValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/DefaultValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoParameter.Name","kind":"property","name":"Name","type":"T:cAlgo.API.AlgoParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string Name {get;}","python":"algoParameter.Name: str","summary":"Gets Parameter name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var robotType in AlgoRegistry.Robots)\n{\n    foreach (var parameter in robotType.Parameters)\n        Print(\"{0} has parameter {1}\", robotType.Name, parameter.Name);\n}","python":"for robotType in api.AlgoRegistry.Robots:\n    for parameter in robotType.Parameters:\n        api.Print(f\"{robotType.Name} has parameter {parameter.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.AlgoParameter.Type","kind":"property","name":"Type","type":"T:cAlgo.API.AlgoParameter","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType Type {get;}","python":"algoParameter.Type: AlgoParameterType","summary":"Gets parameter type.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var robotType in AlgoRegistry.Robots)\n{\n    foreach (var parameter in robotType.Parameters)\n        Print(\"{0}.{1} type: {2}\", robotType.Name, parameter.Name, parameter.Type);\n}","python":"for robotType in api.AlgoRegistry.Robots:\n    for parameter in robotType.Parameters:\n        api.Print(f\"{robotType.Name}.{parameter.Name} type: {parameter.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameter/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoParameterType","kind":"enum","name":"AlgoParameterType","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public enum AlgoParameterType","python":"AlgoParameterType","summary":"Represents the different types of algorithm parameters.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is not IndicatorType smaIndicatorType)\n            return;\n\n        foreach (var parameter in smaIndicatorType.Parameters)\n        {\n            Print($\"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | Type: {parameter.Type}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n\n        if indicatorType is None:\n            return\n\n        for parameter in IndicatorType(indicatorType).Parameters:\n            print(f\"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | Type: {parameter.Type}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Integer","kind":"enum value","name":"Integer","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Integer;","python":"AlgoParameterType.Integer","summary":"Represents a parameter of type int .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Double","kind":"enum value","name":"Double","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Double;","python":"AlgoParameterType.Double","summary":"Represents a parameter of type double .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Boolean","kind":"enum value","name":"Boolean","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Boolean;","python":"AlgoParameterType.Boolean","summary":"Represents a parameter of type bool .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.String","kind":"enum value","name":"String","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.String;","python":"AlgoParameterType.String","summary":"Represents a parameter of type string .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Enum","kind":"enum value","name":"Enum","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Enum;","python":"AlgoParameterType.Enum","summary":"Represents a parameter of type enum .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.DataSeries","kind":"enum value","name":"DataSeries","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.DataSeries;","python":"AlgoParameterType.DataSeries","summary":"Represents a parameter of type DataSeries .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Color","kind":"enum value","name":"Color","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Color;","python":"AlgoParameterType.Color","summary":"Represents a parameter of type Color .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.TimeFrame","kind":"enum value","name":"TimeFrame","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.TimeFrame;","python":"AlgoParameterType.TimeFrame","summary":"Represents a parameter of type TimeFrame .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.Symbol","kind":"enum value","name":"Symbol","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.Symbol;","python":"AlgoParameterType.Symbol","summary":"Represents a parameter of type Symbol .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.DateTime","kind":"enum value","name":"DateTime","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.DateTime;","python":"AlgoParameterType.DateTime","summary":"Represents a parameter of type DateTime .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.DateOnly","kind":"enum value","name":"DateOnly","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.DateOnly;","python":"AlgoParameterType.DateOnly","summary":"Represents a parameter of type DateOnly .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.TimeSpan","kind":"enum value","name":"TimeSpan","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.TimeSpan;","python":"AlgoParameterType.TimeSpan","summary":"Represents a parameter of type TimeSpan .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.MultiEnum","kind":"enum value","name":"MultiEnum","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.MultiEnum;","python":"AlgoParameterType.MultiEnum","summary":"Represents a parameter of type Enum[] .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.MultiSymbol","kind":"enum value","name":"MultiSymbol","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.MultiSymbol;","python":"AlgoParameterType.MultiSymbol","summary":"Represents a parameter of type Symbol[] .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.MultiTimeFrame","kind":"enum value","name":"MultiTimeFrame","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.MultiTimeFrame;","python":"AlgoParameterType.MultiTimeFrame","summary":"Represents a parameter of type TimeFrame[] .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.File","kind":"enum value","name":"File","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.File;","python":"AlgoParameterType.File","summary":"Represents a parameter of type File .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.AlgoParameterType.MultiFile","kind":"enum value","name":"MultiFile","type":"T:cAlgo.API.AlgoParameterType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoParameterType.MultiFile;","python":"AlgoParameterType.MultiFile","summary":"Represents a parameter of type MultiFile .","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoParameterType","pythonType":"AlgoParameterType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoParameterType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.AlgoRegistry","kind":"interface","name":"AlgoRegistry","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface AlgoRegistry","python":"AlgoRegistry","summary":"Provides all installed algorithms data","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is IndicatorType smaIndicatorType)\n            Print($\"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}\");\n\n        if (AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot) is RobotType robotType)\n            Print($\"Name: {robotType.Name} | Parameters #: {robotType.Parameters.Count}\");\n\n        if (AlgoRegistry.Get(\"Sample Test Plugin\", AlgoKind.Plugin) is PluginType pluginType)\n            Print($\"Name: {pluginType.Name} | Parameters #: {pluginType.Parameters.Count}\");\n\n        foreach (var algo in AlgoRegistry)\n        {\n            Print($\"Name: {algo.Name} | Kind: {algo.AlgoKind}\");\n        }\n\n        AlgoRegistry.AlgoTypeChanged += args => Print($\"Algo updated: {args.AlgoTypeName}\");\n        AlgoRegistry.AlgoTypeDeleted += args => Print($\"Algo deleted: {args.AlgoTypeName}\");\n        AlgoRegistry.AlgoTypeInstalled += args => Print($\"Algo installed: {args.AlgoTypeName}\");\n\n        var result = AlgoRegistry.Install(\"path/to-algo-file.algo\");\n\n        if (!result.Succeeded)\n            Print($\"Algo installation failed with error: {result.Error}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n        if indicatorType is not None:\n            smaIndicatorType = IndicatorType(indicatorType)\n            print(f\"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}\")\n\n        robotType = api.AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot)\n        if robotType is not None:\n            breakEventRobotType = RobotType(robotType)\n            print(f\"Name: {breakEventRobotType.Name} | Parameters #: {breakEventRobotType.Parameters.Count}\")\n\n        pluginType = api.AlgoRegistry.Get(\"Sample Test Plugin\", AlgoKind.Plugin)\n        if pluginType is not None:\n            testPluginType = PluginType(pluginType)\n            print(f\"Name: {testPluginType.Name} | Parameters #: {testPluginType.Parameters.Count}\")\n\n        for algo in api.AlgoRegistry:\n            print(f\"Name: {algo.Name} | Kind: {algo.AlgoKind}\")\n\n        api.AlgoRegistry.AlgoTypeChanged += lambda args : print(f\"Algo updated: {args.AlgoTypeName}\")\n        api.AlgoRegistry.AlgoTypeDeleted += lambda args : print(f\"Algo deleted: {args.AlgoTypeName}\")\n        api.AlgoRegistry.AlgoTypeInstalled += lambda args : print(f\"Algo installed: {args.AlgoTypeName}\")\n\n        result = api.AlgoRegistry.Install(\"path/to-algo-file.algo\")\n\n        if result.Succeeded == False:\n            print(f\"Algo installation failed with error: {result.Error}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Exists(System.String)","kind":"method","name":"Exists","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"bool Exists(string name)","python":"api.AlgoRegistry.Exists(name: str) -> bool","summary":"Checks existence of an algorithm.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Algorithm type name"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if exist otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Exists(\"Sample Break Even\"))\n    Print(\"Sample Break Even is installed\");","python":"if api.AlgoRegistry.Exists(\"Sample Break Even\"):\n    api.Print(\"Sample Break Even is installed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Exists/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Exists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Exists(System.String,cAlgo.API.AlgoKind)","kind":"method","name":"Exists","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"bool Exists(string name, AlgoKind algoKind)","python":"api.AlgoRegistry.Exists(name: str, algoKind: AlgoKind) -> bool","summary":"Checks existence of an algorithm.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Algorithm type name"},{"name":"algoKind","csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"Algorithm type kind"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if exist otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var exists = AlgoRegistry.Exists(\"Simple Moving Average\", AlgoKind.StandardIndicator);\nPrint(\"Simple Moving Average is available: {0}\", exists);","python":"exists = api.AlgoRegistry.Exists(\"Simple Moving Average\", AlgoKind.StandardIndicator)\napi.Print(f\"Simple Moving Average is available: {exists}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Exists/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Exists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoType Get(string name)","python":"api.AlgoRegistry.Get(name: str) -> AlgoType","summary":"Returns an algorithm type by it is name.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Algorithm type name"}],"returns":{"csharpType":"AlgoType","pythonType":"AlgoType","summary":"AlgoType","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var algoType = AlgoRegistry.Get(\"Sample Break Even\");\nif (algoType != null)\n    Print(\"{0} is a {1}\", algoType.Name, algoType.AlgoKind);","python":"algoType = api.AlgoRegistry.Get(\"Sample Break Even\")\nif algoType is not None:\n    api.Print(f\"{algoType.Name} is a {algoType.AlgoKind}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Get(System.String,cAlgo.API.AlgoKind)","kind":"method","name":"Get","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoType Get(string name, AlgoKind algoKind)","python":"api.AlgoRegistry.Get(name: str, algoKind: AlgoKind) -> AlgoType","summary":"Returns an algorithm type by it is name and kind.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Algorithm type name"},{"name":"algoKind","csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"Algorithm type kind"}],"returns":{"csharpType":"AlgoType","pythonType":"AlgoType","summary":"AlgoType","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot) is RobotType robotType)\n    Print(\"{0} has {1} parameters\", robotType.Name, robotType.Parameters.Count);","python":"algoType = api.AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot)\nif algoType is not None:\n    robotType = RobotType(algoType)\n    api.Print(f\"{robotType.Name} has {robotType.Parameters.Count} parameters\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.GetCount(cAlgo.API.AlgoKind)","kind":"method","name":"GetCount","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"int GetCount(AlgoKind algoKind)","python":"api.AlgoRegistry.GetCount(algoKind: AlgoKind) -> int","summary":"Returns number of specific kind of installed algorithms.","remarks":null,"parameters":[{"name":"algoKind","csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"Algorithms kind"}],"returns":{"csharpType":"int","pythonType":"int","summary":"Count","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Installed cBots: {0}\", AlgoRegistry.GetCount(AlgoKind.Robot));\nPrint(\"Installed custom indicators: {0}\", AlgoRegistry.GetCount(AlgoKind.CustomIndicator));","python":"api.Print(f\"Installed cBots: {api.AlgoRegistry.GetCount(AlgoKind.Robot)}\")\napi.Print(f\"Installed custom indicators: {api.AlgoRegistry.GetCount(AlgoKind.CustomIndicator)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/GetCount/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/GetCount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Install(System.String)","kind":"method","name":"Install","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationResult Install(string filePath)","python":"api.AlgoRegistry.Install(filePath: str) -> InstallationResult","summary":"Installs an algo file from provided file path.","remarks":null,"parameters":[{"name":"filePath","csharpType":"string","pythonType":"str","summary":"Algo file full file path."}],"returns":{"csharpType":"InstallationResult","pythonType":"InstallationResult","summary":"InstallationResult","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = AlgoRegistry.Install(@\"C:\\Algos\\Sample cBot.algo\");\nif (result.Succeeded)\n    Print(\"Algo installed\");\nelse\n    Print(\"Installation failed: {0}\", result.Error);","python":"result = api.AlgoRegistry.Install(r\"C:\\Algos\\Sample cBot.algo\")\nif result.Succeeded:\n    api.Print(\"Algo installed\")\nelse:\n    api.Print(f\"Installation failed: {result.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Install/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Install/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is installed. Returns a failed InstallationResult with error Forbidden. No exception."}]}
{"id":"M:cAlgo.API.AlgoRegistry.Install(System.Uri)","kind":"method","name":"Install","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationResult Install(Uri uri)","python":"api.AlgoRegistry.Install(uri: Uri) -> InstallationResult","summary":"Installs an algo file from provided URI.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"Algo file URI."}],"returns":{"csharpType":"InstallationResult","pythonType":"InstallationResult","summary":"InstallationResult","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = AlgoRegistry.Install(new Uri(\"https://example.com/algos/SampleBot.algo\"));\nif (!result.Succeeded)\n    Print(\"Installation failed: {0}\", result.Error);","python":"from System import Uri\n\nresult = api.AlgoRegistry.Install(Uri(\"https://example.com/algos/SampleBot.algo\"))\nif not result.Succeeded:\n    api.Print(f\"Installation failed: {result.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Install/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Install/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is installed. Returns a failed InstallationResult with error Forbidden. No exception."}]}
{"id":"M:cAlgo.API.AlgoRegistry.InstallAsync(System.String)","kind":"method","name":"InstallAsync","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationOperation InstallAsync(string filePath)","python":"api.AlgoRegistry.InstallAsync(filePath: str) -> InstallationOperation","summary":"Installs an algo file from provided URI asynchrounsly.","remarks":null,"parameters":[{"name":"filePath","csharpType":"string","pythonType":"str","summary":"Algo file full file path."}],"returns":{"csharpType":"InstallationOperation","pythonType":"InstallationOperation","summary":"InstallationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = AlgoRegistry.InstallAsync(@\"C:\\Algos\\Sample cBot.algo\");\nPrint(\"Installation started, executing: {0}\", operation.IsExecuting);","python":"operation = api.AlgoRegistry.InstallAsync(r\"C:\\Algos\\Sample cBot.algo\")\napi.Print(f\"Installation started, executing: {operation.IsExecuting}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Returned operation never completes. A second InstallAsync call in the same instance throws ArgumentException (duplicate key)."}]}
{"id":"M:cAlgo.API.AlgoRegistry.InstallAsync(System.String,System.Action{cAlgo.API.InstallationResult})","kind":"method","name":"InstallAsync","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationOperation InstallAsync(string filePath, Action<InstallationResult> callback)","python":"api.AlgoRegistry.InstallAsync(filePath: str, callback: Callable[[InstallationResult], None]) -> InstallationOperation","summary":"Installs an algo file from provided URI asynchrounsly.","remarks":null,"parameters":[{"name":"filePath","csharpType":"string","pythonType":"str","summary":"Algo file full file path."},{"name":"callback","csharpType":"Action<InstallationResult>","pythonType":"Callable[[InstallationResult], None]","summary":"Callback that will be invoked with installation result."}],"returns":{"csharpType":"InstallationOperation","pythonType":"InstallationOperation","summary":"InstallationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"AlgoRegistry.InstallAsync(@\"C:\\Algos\\Sample cBot.algo\", result =>\n{\n    if (result.Succeeded)\n        Print(\"Algo installed\");\n    else\n        Print(\"Installation failed: {0}\", result.Error);\n});","python":"api.AlgoRegistry.InstallAsync(r\"C:\\Algos\\Sample cBot.algo\", lambda result: api.Print(f\"Installed: {result.Succeeded} | Error: {result.Error}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Callback is never called and the operation never completes. A second InstallAsync call throws ArgumentException (duplicate key)."}]}
{"id":"M:cAlgo.API.AlgoRegistry.InstallAsync(System.Uri)","kind":"method","name":"InstallAsync","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationOperation InstallAsync(Uri uri)","python":"api.AlgoRegistry.InstallAsync(uri: Uri) -> InstallationOperation","summary":"Installs an algo file from provided URI asynchrounsly.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"Algo file URI."}],"returns":{"csharpType":"InstallationOperation","pythonType":"InstallationOperation","summary":"InstallationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = AlgoRegistry.InstallAsync(new Uri(\"https://example.com/algos/SampleBot.algo\"));\nPrint(\"Download and installation started, executing: {0}\", operation.IsExecuting);","python":"from System import Uri\n\noperation = api.AlgoRegistry.InstallAsync(Uri(\"https://example.com/algos/SampleBot.algo\"))\napi.Print(f\"Download and installation started, executing: {operation.IsExecuting}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Returned operation never completes. A second InstallAsync call in the same instance throws ArgumentException (duplicate key)."}]}
{"id":"M:cAlgo.API.AlgoRegistry.InstallAsync(System.Uri,System.Action{cAlgo.API.InstallationResult})","kind":"method","name":"InstallAsync","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationOperation InstallAsync(Uri uri, Action<InstallationResult> callback)","python":"api.AlgoRegistry.InstallAsync(uri: Uri, callback: Callable[[InstallationResult], None]) -> InstallationOperation","summary":"Installs an algo file from provided URI asynchrounsly.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"Algo file URI."},{"name":"callback","csharpType":"Action<InstallationResult>","pythonType":"Callable[[InstallationResult], None]","summary":"Callback that will be invoked with installation result."}],"returns":{"csharpType":"InstallationOperation","pythonType":"InstallationOperation","summary":"InstallationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var uri = new Uri(\"https://example.com/algos/SampleBot.algo\");\nAlgoRegistry.InstallAsync(uri, result => Print(\"Installed: {0} | Error: {1}\", result.Succeeded, result.Error));","python":"from System import Uri\n\nuri = Uri(\"https://example.com/algos/SampleBot.algo\")\napi.AlgoRegistry.InstallAsync(uri, lambda result: api.Print(f\"Installed: {result.Succeeded} | Error: {result.Error}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/InstallAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Callback is never called and the operation never completes. A second InstallAsync call throws ArgumentException (duplicate key)."}]}
{"id":"P:cAlgo.API.AlgoRegistry.Count","kind":"property","name":"Count","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"int Count {get;}","python":"api.AlgoRegistry.Count: int","summary":"Gets number of installed algorithms.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Installed algos: {0}\", AlgoRegistry.Count);","python":"api.Print(f\"Installed algos: {api.AlgoRegistry.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"P:cAlgo.API.AlgoRegistry.Indicators","kind":"property","name":"Indicators","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<IndicatorType> Indicators {get;}","python":"api.AlgoRegistry.Indicators: IReadonlyList[IndicatorType]","summary":"Gets the list of all installed indicators.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorType>","pythonType":"IReadonlyList[IndicatorType]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n    Print(\"Indicator: {0} | Lines: {1}\", indicatorType.Name, indicatorType.Lines.Count);","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    api.Print(f\"Indicator: {indicatorType.Name} | Lines: {indicatorType.Lines.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Indicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Indicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"P:cAlgo.API.AlgoRegistry.Plugins","kind":"property","name":"Plugins","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<PluginType> Plugins {get;}","python":"api.AlgoRegistry.Plugins: IReadonlyList[PluginType]","summary":"Gets the list of all installed plugins.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<PluginType>","pythonType":"IReadonlyList[PluginType]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var pluginType in AlgoRegistry.Plugins)\n    Print(\"Plugin: {0} | Enabled: {1}\", pluginType.Name, pluginType.IsEnabled);","python":"for pluginType in api.AlgoRegistry.Plugins:\n    api.Print(f\"Plugin: {pluginType.Name} | Enabled: {pluginType.IsEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Plugins/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Plugins/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"P:cAlgo.API.AlgoRegistry.Robots","kind":"property","name":"Robots","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<RobotType> Robots {get;}","python":"api.AlgoRegistry.Robots: IReadonlyList[RobotType]","summary":"Gets the list of all installed robots.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<RobotType>","pythonType":"IReadonlyList[RobotType]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var robotType in AlgoRegistry.Robots)\n    Print(\"cBot: {0} | Parameters: {1}\", robotType.Name, robotType.Parameters.Count);","python":"for robotType in api.AlgoRegistry.Robots:\n    api.Print(f\"cBot: {robotType.Name} | Parameters: {robotType.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Robots/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/Robots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"E:cAlgo.API.AlgoRegistry.AlgoTypeChanged","kind":"event","name":"AlgoTypeChanged","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"event Action<AlgoTypeChangedEventArgs> AlgoTypeChanged;","python":"api.AlgoRegistry.AlgoTypeChanged += handler  # handler(obj: AlgoTypeChangedEventArgs)","summary":"Occurs when an algorithm is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AlgoTypeChangedEventArgs>","pythonType":"Callable[[AlgoTypeChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeChanged += OnAlgoTypeChanged;\n}\n\nprivate void OnAlgoTypeChanged(AlgoTypeChangedEventArgs args)\n{\n    Print(\"Algo changed: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeChanged += self.on_algo_type_changed\n\ndef on_algo_type_changed(self, args):\n    api.Print(f\"Algo changed: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"E:cAlgo.API.AlgoRegistry.AlgoTypeDeleted","kind":"event","name":"AlgoTypeDeleted","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"event Action<AlgoTypeDeletedEventArgs> AlgoTypeDeleted;","python":"api.AlgoRegistry.AlgoTypeDeleted += handler  # handler(obj: AlgoTypeDeletedEventArgs)","summary":"Occurs when an algorithm is deleted.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AlgoTypeDeletedEventArgs>","pythonType":"Callable[[AlgoTypeDeletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeDeleted += OnAlgoTypeDeleted;\n}\n\nprivate void OnAlgoTypeDeleted(AlgoTypeDeletedEventArgs args)\n{\n    Print(\"Algo deleted: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeDeleted += self.on_algo_type_deleted\n\ndef on_algo_type_deleted(self, args):\n    api.Print(f\"Algo deleted: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeDeleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeDeleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"E:cAlgo.API.AlgoRegistry.AlgoTypeInstalled","kind":"event","name":"AlgoTypeInstalled","type":"T:cAlgo.API.AlgoRegistry","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"event Action<AlgoTypeInstalledEventArgs> AlgoTypeInstalled;","python":"api.AlgoRegistry.AlgoTypeInstalled += handler  # handler(obj: AlgoTypeInstalledEventArgs)","summary":"Occurs when a new algorithm is installed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AlgoTypeInstalledEventArgs>","pythonType":"Callable[[AlgoTypeInstalledEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeInstalled += OnAlgoTypeInstalled;\n}\n\nprivate void OnAlgoTypeInstalled(AlgoTypeInstalledEventArgs args)\n{\n    Print(\"Algo installed: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeInstalled += self.on_algo_type_installed\n\ndef on_algo_type_installed(self, args):\n    api.Print(f\"Algo installed: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeInstalled/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoRegistry/AlgoTypeInstalled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Registry is empty: Count 0, Indicators/Robots/Plugins empty, Exists false, Get null. Installed/Deleted/Changed events never raised."}]}
{"id":"T:cAlgo.API.AlgoType","kind":"interface","name":"AlgoType","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface AlgoType","python":"AlgoType","summary":"Base type for representing an algorithm.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        foreach (var algo in AlgoRegistry)\n        {\n            Print($\"Name: {algo.Name} | Kind: {algo.AlgoKind} | ProjectFilePath: {algo.ProjectFilePath}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for algo in api.AlgoRegistry:\n            print(f\"Name: {algo.Name} | Kind: {algo.AlgoKind} | ProjectFilePath: {algo.ProjectFilePath}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry, AlgoRegistry.Get)."}]}
{"id":"P:cAlgo.API.AlgoType.AlgoKind","kind":"property","name":"AlgoKind","type":"T:cAlgo.API.AlgoType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"AlgoKind AlgoKind {get;}","python":"algoType.AlgoKind: AlgoKind","summary":"Gets algorithm kind.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoKind","pythonType":"AlgoKind","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var algoType in AlgoRegistry)\n{\n    if (algoType.AlgoKind == AlgoKind.Robot)\n        Print(\"cBot: {0}\", algoType.Name);\n}","python":"for algoType in api.AlgoRegistry:\n    if algoType.AlgoKind == AlgoKind.Robot:\n        api.Print(f\"cBot: {algoType.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/AlgoKind/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/AlgoKind/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry, AlgoRegistry.Get)."}]}
{"id":"P:cAlgo.API.AlgoType.Name","kind":"property","name":"Name","type":"T:cAlgo.API.AlgoType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string Name {get;}","python":"algoType.Name: str","summary":"Gets algorithm name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var algoType in AlgoRegistry)\n    Print(\"Installed algo: {0}\", algoType.Name);","python":"for algoType in api.AlgoRegistry:\n    api.Print(f\"Installed algo: {algoType.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry, AlgoRegistry.Get)."}]}
{"id":"P:cAlgo.API.AlgoType.ProjectFilePath","kind":"property","name":"ProjectFilePath","type":"T:cAlgo.API.AlgoType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string ProjectFilePath {get;}","python":"algoType.ProjectFilePath: str","summary":"Gets algorithm project file \".csproj\" path if it has source code, otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var algoType in AlgoRegistry)\n{\n    if (algoType.ProjectFilePath != null)\n        Print(\"{0} project: {1}\", algoType.Name, algoType.ProjectFilePath);\n}","python":"for algoType in api.AlgoRegistry:\n    if algoType.ProjectFilePath is not None:\n        api.Print(f\"{algoType.Name} project: {algoType.ProjectFilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/ProjectFilePath/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/AlgoType/ProjectFilePath/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry, AlgoRegistry.Get)."}]}
{"id":"T:cAlgo.API.AlgoTypeChangedEventArgs","kind":"class","name":"AlgoTypeChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AlgoTypeChangedEventArgs : AlgoTypeEventArgs","python":"AlgoTypeChangedEventArgs","summary":"Provides data for Algo type changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeChanged += OnAlgoTypeChanged;\n}\n\nprivate void OnAlgoTypeChanged(AlgoTypeChangedEventArgs args)\n{\n    Print(\"Algo type changed: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeChanged += self.on_algo_type_changed\n\ndef on_algo_type_changed(self, args):\n    api.Print(f\"Algo type changed: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (AlgoRegistry.AlgoTypeChanged)."}]}
{"id":"T:cAlgo.API.AlgoTypeDeletedEventArgs","kind":"class","name":"AlgoTypeDeletedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AlgoTypeDeletedEventArgs : AlgoTypeEventArgs","python":"AlgoTypeDeletedEventArgs","summary":"Provides data for Algo type deleted event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeDeleted += OnAlgoTypeDeleted;\n}\n\nprivate void OnAlgoTypeDeleted(AlgoTypeDeletedEventArgs args)\n{\n    Print(\"Algo type deleted: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeDeleted += self.on_algo_type_deleted\n\ndef on_algo_type_deleted(self, args):\n    api.Print(f\"Algo type deleted: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeDeletedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeDeletedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (AlgoRegistry.AlgoTypeDeleted)."}]}
{"id":"T:cAlgo.API.AlgoTypeEventArgs","kind":"class","name":"AlgoTypeEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class AlgoTypeEventArgs","python":"AlgoTypeEventArgs","summary":"Base structure that provides data for Algo registry events.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeInstalled += OnAlgoTypeEvent;\n    AlgoRegistry.AlgoTypeChanged += OnAlgoTypeEvent;\n    AlgoRegistry.AlgoTypeDeleted += OnAlgoTypeEvent;\n}\n\nprivate void OnAlgoTypeEvent(AlgoTypeEventArgs args)\n{\n    Print(\"{0}: {1}\", args.GetType().Name, args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeInstalled += self.on_algo_type_event\n    api.AlgoRegistry.AlgoTypeChanged += self.on_algo_type_event\n    api.AlgoRegistry.AlgoTypeDeleted += self.on_algo_type_event\n\ndef on_algo_type_event(self, args):\n    api.Print(f\"{type(args).__name__}: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (AlgoRegistry.AlgoTypeChanged, AlgoRegistry.AlgoTypeDeleted, AlgoRegistry.AlgoTypeInstalled)."}]}
{"id":"P:cAlgo.API.AlgoTypeEventArgs.AlgoTypeName","kind":"property","name":"AlgoTypeName","type":"T:cAlgo.API.AlgoTypeEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string AlgoTypeName {get;}","python":"algoTypeEventArgs.AlgoTypeName: str","summary":"Algo Type Name","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeInstalled += OnAlgoTypeInstalled;\n}\n\nprivate void OnAlgoTypeInstalled(AlgoTypeInstalledEventArgs args)\n{\n    Print(\"New algo type available: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeInstalled += self.on_algo_type_installed\n\ndef on_algo_type_installed(self, args):\n    api.Print(f\"New algo type available: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeEventArgs/AlgoTypeName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeEventArgs/AlgoTypeName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (AlgoRegistry.AlgoTypeChanged, AlgoRegistry.AlgoTypeDeleted, AlgoRegistry.AlgoTypeInstalled)."}]}
{"id":"T:cAlgo.API.AlgoTypeInstalledEventArgs","kind":"class","name":"AlgoTypeInstalledEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AlgoTypeInstalledEventArgs : AlgoTypeEventArgs","python":"AlgoTypeInstalledEventArgs","summary":"Provides data for Algo type installed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    AlgoRegistry.AlgoTypeInstalled += OnAlgoTypeInstalled;\n}\n\nprivate void OnAlgoTypeInstalled(AlgoTypeInstalledEventArgs args)\n{\n    Print(\"Algo type installed: {0}\", args.AlgoTypeName);\n}","python":"def on_start(self):\n    api.AlgoRegistry.AlgoTypeInstalled += self.on_algo_type_installed\n\ndef on_algo_type_installed(self, args):\n    api.Print(f\"Algo type installed: {args.AlgoTypeName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeInstalledEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AlgoTypeInstalledEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (AlgoRegistry.AlgoTypeInstalled)."}]}
{"id":"T:cAlgo.API.Indicators.Alligator","kind":"interface","name":"Alligator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Alligator","python":"Alligator","summary":"Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Jaws: {0}, Teeth: {1}, Lips: {2}\", alligator.Jaws.Last(1), alligator.Teeth.Last(1), alligator.Lips.Last(1));","python":"alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Jaws: {alligator.Jaws.Last(1)}, Teeth: {alligator.Teeth.Last(1)}, Lips: {alligator.Lips.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Alligator indicator\n    public partial class AlligatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private Alligator _alligator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\n        }\n\n        protected override void OnBar()\n        {\n            if (_alligator.Lips.Last(1) > _alligator.Teeth.Last(1) && _alligator.Lips.Last(2) <= _alligator.Teeth.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_alligator.Lips.Last(1) < _alligator.Teeth.Last(1) && _alligator.Lips.Last(2) >= _alligator.Teeth.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AlligatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\n\n    def on_bar_closed(self):\n        if self.alligator.Lips.Last(0) > self.alligator.Teeth.Last(0) and self.alligator.Lips.Last(1) <= self.alligator.Teeth.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.alligator.Lips.Last(0) < self.alligator.Teeth.Last(0) and self.alligator.Lips.Last(1) >= self.alligator.Teeth.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Alligator.Jaws","kind":"property","name":"Jaws","type":"T:cAlgo.API.Indicators.Alligator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Jaws {get; set;}","python":"alligator.Jaws: IndicatorDataSeries","summary":"The jaw is the x-period (13) smoothed moving average that is moved into the future by x (18) bars.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Jaws: {0}\", alligator.Jaws.Last(1));","python":"alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Jaws: {alligator.Jaws.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Jaws/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Jaws/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Alligator.Lips","kind":"property","name":"Lips","type":"T:cAlgo.API.Indicators.Alligator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Lips {get; set;}","python":"alligator.Lips: IndicatorDataSeries","summary":"The lips is the x-period (5) smoothed moving average that is moved by x (3) bars into the future","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Lips: {0}\", alligator.Lips.Last(1));","python":"alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Lips: {alligator.Lips.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Lips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Lips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Alligator.Teeth","kind":"property","name":"Teeth","type":"T:cAlgo.API.Indicators.Alligator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Teeth {get; set;}","python":"alligator.Teeth: IndicatorDataSeries","summary":"The teeth is the x-period (8) smoothed moving average that is moved x (5) bars into the future.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Teeth: {0}\", alligator.Teeth.Last(1));","python":"alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Teeth: {alligator.Teeth.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Teeth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Alligator/Teeth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Application","kind":"interface","name":"Application","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public interface Application","python":"Application","summary":"Represents the application.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ApplicationSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Version: {0} | Theme: {1} | Environment: {2}\", Application.Version, Application.ColorTheme, Application.EnvironmentType);\n        Print(\"User time offset: {0} | Language: {1}\", Application.UserTimeOffset, Application.Language.TwoLetterCode);\n\n        Application.ColorThemeChanged += args => Print(\"Color theme changed to {0}\", args.ColorTheme);\n        Application.UserTimeOffsetChanged += args => Print(\"User time offset changed to {0}\", args.UserTimeOffset);\n        Application.LanguageChanged += args => Print(\"Language changed to {0}\", args.Language.CultureName);\n    }\n}","python":"def on_start(self):\n    application = api.Application\n    api.Print(f\"Version: {application.Version} | Theme: {application.ColorTheme} | Environment: {application.EnvironmentType}\")\n    api.Print(f\"User time offset: {application.UserTimeOffset} | Language: {application.Language.TwoLetterCode}\")\n    application.ColorThemeChanged += self.on_color_theme_changed\n    application.UserTimeOffsetChanged += self.on_user_time_offset_changed\n    application.LanguageChanged += self.on_language_changed\n\ndef on_color_theme_changed(self, args):\n    api.Print(f\"Color theme changed to {args.ColorTheme}\")\n\ndef on_user_time_offset_changed(self, args):\n    api.Print(f\"User time offset changed to {args.UserTimeOffset}\")\n\ndef on_language_changed(self, args):\n    api.Print(f\"Language changed to {args.Language.CultureName}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.ColorTheme","kind":"property","name":"ColorTheme","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"ColorTheme ColorTheme {get;}","python":"api.Application.ColorTheme: ColorTheme","summary":"Gets the color theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ColorTheme","pythonType":"ColorTheme","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Application.ColorTheme == ColorTheme.Dark)\n    Print(\"The dark color theme is active\");\nelse\n    Print(\"The light color theme is active\");","python":"if api.Application.ColorTheme == ColorTheme.Dark:\n    api.Print(\"The dark color theme is active\")\nelse:\n    api.Print(\"The light color theme is active\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/ColorTheme/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/ColorTheme/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.Draggables","kind":"property","name":"Draggables","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"ApplicationDraggables Draggables {get;}","python":"api.Application.Draggables: ApplicationDraggables","summary":"Gets application draggables.","remarks":null,"parameters":[],"returns":{"csharpType":"ApplicationDraggables","pythonType":"ApplicationDraggables","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = \"Hello from \" + SymbolName, Margin = 5 };\nPrint(\"Application draggables: {0}\", Application.Draggables.Count);","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from \" + api.SymbolName\ntextBlock.Margin = Thickness(5)\ndraggable.Child = textBlock\napi.Print(f\"Application draggables: {api.Application.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Draggables/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Draggables/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.DrawingColor","kind":"property","name":"DrawingColor","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"Color DrawingColor {get;}","python":"api.Application.DrawingColor: Color","summary":"Gets current drawing color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current drawing color: {0}\", Application.DrawingColor);\nChart.DrawHorizontalLine(\"lastClose\", Bars.LastBar.Close, Application.DrawingColor);","python":"api.Print(f\"Current drawing color: {api.Application.DrawingColor}\")\napi.Chart.DrawHorizontalLine(\"lastClose\", api.Bars.LastBar.Close, api.Application.DrawingColor)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/DrawingColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/DrawingColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.EnvironmentType","kind":"property","name":"EnvironmentType","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"EnvironmentType EnvironmentType {get;}","python":"api.Application.EnvironmentType: EnvironmentType","summary":"Gets the environment type.","remarks":null,"parameters":[],"returns":{"csharpType":"EnvironmentType","pythonType":"EnvironmentType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"if (Application.EnvironmentType == EnvironmentType.Desktop)\n    Print(\"Running inside cTrader Desktop\");\nelse\n    Print(\"Running in {0}\", Application.EnvironmentType);","python":"if api.Application.EnvironmentType == EnvironmentType.Desktop:\n    api.Print(\"Running inside cTrader Desktop\")\nelse:\n    api.Print(f\"Running in {api.Application.EnvironmentType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/EnvironmentType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/EnvironmentType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.Language","kind":"property","name":"Language","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"Language Language {get;}","python":"api.Application.Language: Language","summary":"Gets the current language.","remarks":null,"parameters":[],"returns":{"csharpType":"Language","pythonType":"Language","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var language = Application.Language;\nPrint(\"Language: {0} ({1})\", language.TwoLetterCode, language.CultureName);","python":"language = api.Application.Language\napi.Print(f\"Language: {language.TwoLetterCode} ({language.CultureName})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Language/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Language/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.UserTimeOffset","kind":"property","name":"UserTimeOffset","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"TimeSpan UserTimeOffset {get;}","python":"api.Application.UserTimeOffset: TimeSpan","summary":"Gets user time offset.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var userTime = TimeInUtc.Add(Application.UserTimeOffset);\nPrint(\"User time offset: {0} | User time: {1}\", Application.UserTimeOffset, userTime);","python":"userTime = api.TimeInUtc.Add(api.Application.UserTimeOffset)\napi.Print(f\"User time offset: {api.Application.UserTimeOffset} | User time: {userTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/UserTimeOffset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/UserTimeOffset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Application.Version","kind":"property","name":"Version","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"Version Version {get;}","python":"api.Application.Version: Version","summary":"Gets the version.","remarks":null,"parameters":[],"returns":{"csharpType":"Version","pythonType":"Version","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var version = Application.Version;\nPrint(\"cTrader version: {0} (major {1}, minor {2})\", version, version.Major, version.Minor);","python":"version = api.Application.Version\napi.Print(f\"cTrader version: {version} (major {version.Major}, minor {version.Minor})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Version/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/Version/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Application.ColorThemeChanged","kind":"event","name":"ColorThemeChanged","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"event Action<ColorThemeChangeEventArgs> ColorThemeChanged;","python":"api.Application.ColorThemeChanged += handler  # handler(obj: ColorThemeChangeEventArgs)","summary":"Occurs when color theme has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ColorThemeChangeEventArgs>","pythonType":"Callable[[ColorThemeChangeEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.ColorThemeChanged += OnColorThemeChanged;\n}\n\nprivate void OnColorThemeChanged(ColorThemeChangeEventArgs args)\n{\n    Print(\"Color theme changed to {0}\", args.ColorTheme);\n}","python":"def on_start(self):\n    api.Application.ColorThemeChanged += self.on_color_theme_changed\n\ndef on_color_theme_changed(self, args):\n    api.Print(f\"Color theme changed to {args.ColorTheme}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/ColorThemeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/ColorThemeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Application.DrawingColorChanged","kind":"event","name":"DrawingColorChanged","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"event Action<DrawingColorChangedEventArgs> DrawingColorChanged;","python":"api.Application.DrawingColorChanged += handler  # handler(obj: DrawingColorChangedEventArgs)","summary":"Occurs when DrawingColor has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<DrawingColorChangedEventArgs>","pythonType":"Callable[[DrawingColorChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.DrawingColorChanged += OnDrawingColorChanged;\n}\n\nprivate void OnDrawingColorChanged(DrawingColorChangedEventArgs args)\n{\n    Print(\"Drawing color changed to {0}\", args.DrawingColor);\n}","python":"def on_start(self):\n    api.Application.DrawingColorChanged += self.on_drawing_color_changed\n\ndef on_drawing_color_changed(self, args):\n    api.Print(f\"Drawing color changed to {args.DrawingColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/DrawingColorChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/DrawingColorChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Application.LanguageChanged","kind":"event","name":"LanguageChanged","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"event Action<LanguageChangedEventArgs> LanguageChanged;","python":"api.Application.LanguageChanged += handler  # handler(obj: LanguageChangedEventArgs)","summary":"Occurs when Language has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<LanguageChangedEventArgs>","pythonType":"Callable[[LanguageChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.LanguageChanged += OnLanguageChanged;\n}\n\nprivate void OnLanguageChanged(LanguageChangedEventArgs args)\n{\n    Print(\"Language changed to {0}\", args.Language.CultureName);\n}","python":"def on_start(self):\n    api.Application.LanguageChanged += self.on_language_changed\n\ndef on_language_changed(self, args):\n    api.Print(f\"Language changed to {args.Language.CultureName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/LanguageChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/LanguageChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Application.UserTimeOffsetChanged","kind":"event","name":"UserTimeOffsetChanged","type":"T:cAlgo.API.Application","namespace":"cAlgo.API","group":"Application","csharp":"event Action<UserTimeOffsetChangedEventArgs> UserTimeOffsetChanged;","python":"api.Application.UserTimeOffsetChanged += handler  # handler(obj: UserTimeOffsetChangedEventArgs)","summary":"Occurs when user time offset has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<UserTimeOffsetChangedEventArgs>","pythonType":"Callable[[UserTimeOffsetChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.UserTimeOffsetChanged += OnUserTimeOffsetChanged;\n}\n\nprivate void OnUserTimeOffsetChanged(UserTimeOffsetChangedEventArgs args)\n{\n    Print(\"User time offset changed to {0}\", args.UserTimeOffset);\n}","python":"def on_start(self):\n    api.Application.UserTimeOffsetChanged += self.on_user_time_offset_changed\n\ndef on_user_time_offset_changed(self, args):\n    api.Print(f\"User time offset changed to {args.UserTimeOffset}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Application/UserTimeOffsetChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Application/UserTimeOffsetChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ApplicationDraggable","kind":"interface","name":"ApplicationDraggable","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public interface ApplicationDraggable","python":"ApplicationDraggable","summary":"Represents a draggable box that can host a control and shown over application.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n   private const string Label = \"Draggable\";\n\n   protected override void OnStart()\n   {\n       var openPositionButton = new Button {Text = \"Open Position\"};\n\n       openPositionButton.Click += _ => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, Label);\n\n       var closePositionsButton = new Button {Text = \"Close Position\"};\n\n       closePositionsButton.Click += _ => Positions.Find(Label)?.Close();\n\n       var panel = new StackPanel {Orientation = Orientation.Vertical, BackgroundColor = Color.Red};\n\n       panel.AddChild(openPositionButton);\n       panel.AddChild(closePositionsButton);\n\n       var draggable = Application.Draggables.Add();\n\n       draggable.ShowGrip = true;\n       draggable.Child = panel;\n\n       draggable.LocationChanged += args => Print($\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\");\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nfrom System import Action\n\nclass Test():\n    Label = \"Draggable\"\n    def on_start(self):\n        openPositionButton = Button()\n        openPositionButton.Text = \"Open Position\"\n        openPositionButton.Click += self.open_position\n\n        closePositionsButton = Button()\n        closePositionsButton.Text = \"Close Position\"\n        closePositionsButton.Click += self.close_position\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.BackgroundColor = Color.Red\n\n        panel.AddChild(openPositionButton)\n        panel.AddChild(closePositionsButton)\n\n        draggable = api.Application.Draggables.Add()\n        draggable.ShowGrip = True\n        draggable.Child = panel\n\n        draggable.LocationChanged += lambda args: print(f\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\")\n\n    def open_position(self, args):\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, self.Label)\n\n    def close_position(self, args):\n        position = api.Positions.Find(self.Label)\n\n        if position is not None:\n            position.Close()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.Child","kind":"property","name":"Child","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"ControlBase Child {get; set;}","python":"applicationDraggable.Child: ControlBase","summary":"Get / set the content control inside the draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\nvar button = new Button { Text = \"Buy \" + SymbolName };\nbutton.Click += args => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);\ndraggable.Child = button;","python":"draggable = api.Application.Draggables.Add()\nbutton = Button()\nbutton.Text = \"Buy \" + api.SymbolName\nbutton.Click += lambda args: api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\ndraggable.Child = button"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.Id","kind":"property","name":"Id","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"string Id {get;}","python":"applicationDraggable.Id: str","summary":"Get unique ID of the Draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\nPrint(\"Draggable Id: {0}\", draggable.Id);","python":"draggable = api.Application.Draggables.Add()\napi.Print(f\"Draggable Id: {draggable.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"bool IsVisible {get; set;}","python":"applicationDraggable.IsVisible: bool","summary":"Get / set visibility of draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName };\ndraggable.IsVisible = !draggable.IsVisible;\nPrint(\"Draggable visible: {0}\", draggable.IsVisible);","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.IsVisible = not draggable.IsVisible\napi.Print(f\"Draggable visible: {draggable.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.ShowGrip","kind":"property","name":"ShowGrip","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"bool ShowGrip {get; set;}","python":"applicationDraggable.ShowGrip: bool","summary":"Get / set move grip visibility (default: true).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName };\ndraggable.ShowGrip = false;\nPrint(\"Grip visible: {0}\", draggable.ShowGrip);","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.ShowGrip = False\napi.Print(f\"Grip visible: {draggable.ShowGrip}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/ShowGrip/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/ShowGrip/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.X","kind":"property","name":"X","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"double X {get; set;}","python":"applicationDraggable.X: float","summary":"Get / set X coordinate (default: 0).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName };\ndraggable.X = 200;\nPrint(\"Draggable X: {0}\", draggable.X);","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.X = 200\napi.Print(f\"Draggable X: {draggable.X}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/X/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/X/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ApplicationDraggable.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"double Y {get; set;}","python":"applicationDraggable.Y: float","summary":"Get / set Y coordinate (default: 0).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName };\ndraggable.Y = 150;\nPrint(\"Draggable Y: {0}\", draggable.Y);","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.Y = 150\napi.Print(f\"Draggable Y: {draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"E:cAlgo.API.ApplicationDraggable.LocationChanged","kind":"event","name":"LocationChanged","type":"T:cAlgo.API.ApplicationDraggable","namespace":"cAlgo.API","group":"Application","csharp":"event Action<ApplicationDraggableLocationChangedEventArgs> LocationChanged;","python":"applicationDraggable.LocationChanged += handler  # handler(obj: ApplicationDraggableLocationChangedEventArgs)","summary":"Occurs when the draggable's location is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ApplicationDraggableLocationChangedEventArgs>","pythonType":"Callable[[ApplicationDraggableLocationChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Application.Draggables.Add();\n    draggable.Child = new TextBlock { Text = SymbolName };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ApplicationDraggableLocationChangedEventArgs args)\n{\n    Print(\"Draggable moved to {0}, {1}\", args.Draggable.X, args.Draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Application.Draggables.Add()\n    textBlock = TextBlock()\n    textBlock.Text = api.SymbolName\n    draggable.Child = textBlock\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    api.Print(f\"Draggable moved to {args.Draggable.X}, {args.Draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/LocationChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggable/LocationChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; position changes are not applied and LocationChanged never fires."}]}
{"id":"T:cAlgo.API.ApplicationDraggableLocationChangedEventArgs","kind":"class","name":"ApplicationDraggableLocationChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ApplicationDraggableLocationChangedEventArgs","python":"ApplicationDraggableLocationChangedEventArgs","summary":"Provides data for LocationChanged event of ApplicationDraggable.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Application.Draggables.Add();\n    draggable.Child = new TextBlock { Text = \"Drag me\" };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ApplicationDraggableLocationChangedEventArgs args)\n{\n    Print(\"Draggable {0} moved to X: {1}, Y: {2}\", args.Draggable.Id, args.Draggable.X, args.Draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Application.Draggables.Add()\n    text_block = TextBlock()\n    text_block.Text = \"Drag me\"\n    draggable.Child = text_block\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    api.Print(f\"Draggable {args.Draggable.Id} moved to X: {args.Draggable.X}, Y: {args.Draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ApplicationDraggable.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ApplicationDraggable.LocationChanged)."}]}
{"id":"P:cAlgo.API.ApplicationDraggableLocationChangedEventArgs.Draggable","kind":"property","name":"Draggable","type":"T:cAlgo.API.ApplicationDraggableLocationChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ApplicationDraggable Draggable {get;}","python":"applicationDraggableLocationChangedEventArgs.Draggable: ApplicationDraggable","summary":"Gets the draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"ApplicationDraggable","pythonType":"ApplicationDraggable","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Application.Draggables.Add();\n    draggable.Child = new TextBlock { Text = \"Drag me\" };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ApplicationDraggableLocationChangedEventArgs args)\n{\n    var draggable = args.Draggable;\n    Print(\"Draggable {0} is visible: {1}, location: ({2}, {3})\", draggable.Id, draggable.IsVisible, draggable.X, draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Application.Draggables.Add()\n    text_block = TextBlock()\n    text_block.Text = \"Drag me\"\n    draggable.Child = text_block\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    draggable = args.Draggable\n    api.Print(f\"Draggable {draggable.Id} is visible: {draggable.IsVisible}, location: ({draggable.X}, {draggable.Y})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/Draggable/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/Draggable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ApplicationDraggable.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ApplicationDraggable.LocationChanged)."}]}
{"id":"T:cAlgo.API.ApplicationDraggables","kind":"interface","name":"ApplicationDraggables","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public interface ApplicationDraggables","python":"ApplicationDraggables","summary":"Represents collection of application draggables.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n   private const string Label = \"Draggable\";\n\n   protected override void OnStart()\n   {\n       var openPositionButton = new Button {Text = \"Open Position\"};\n\n       openPositionButton.Click += _ => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, Label);\n\n       var closePositionsButton = new Button {Text = \"Close Position\"};\n\n       closePositionsButton.Click += _ => Positions.Find(Label)?.Close();\n\n       var panel = new StackPanel {Orientation = Orientation.Vertical, BackgroundColor = Color.Red};\n\n       panel.AddChild(openPositionButton);\n       panel.AddChild(closePositionsButton);\n\n       var draggable = Application.Draggables.Add();\n\n       draggable.ShowGrip = true;\n       draggable.Child = panel;\n\n       draggable.LocationChanged += args => Print($\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\");\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nfrom System import Action\n\nclass Test():\n    Label = \"Draggable\"\n    def on_start(self):\n        openPositionButton = Button()\n        openPositionButton.Text = \"Open Position\"\n        openPositionButton.Click += self.open_position\n\n        closePositionsButton = Button()\n        closePositionsButton.Text = \"Close Position\"\n        closePositionsButton.Click += self.close_position\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.BackgroundColor = Color.Red\n\n        panel.AddChild(openPositionButton)\n        panel.AddChild(closePositionsButton)\n\n        draggable = api.Application.Draggables.Add()\n        draggable.ShowGrip = True\n        draggable.Child = panel\n\n        draggable.LocationChanged += lambda args: print(f\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\")\n\n    def open_position(self, args):\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, self.Label)\n\n    def close_position(self, args):\n        position = api.Positions.Find(self.Label)\n\n        if position is not None:\n            position.Close()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."}]}
{"id":"M:cAlgo.API.ApplicationDraggables.Add","kind":"method","name":"Add","type":"T:cAlgo.API.ApplicationDraggables","namespace":"cAlgo.API","group":"Application","csharp":"ApplicationDraggable Add()","python":"applicationDraggables.Add() -> ApplicationDraggable","summary":"Adds a draggable to application.","remarks":null,"parameters":[],"returns":{"csharpType":"ApplicationDraggable","pythonType":"ApplicationDraggable","summary":"Draggable","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\ndraggable.Child = new TextBlock { Text = \"Spread: \" + Symbol.Spread / Symbol.PipSize, Margin = 5 };","python":"draggable = api.Application.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = f\"Spread: {api.Symbol.Spread / api.Symbol.PipSize}\"\ntextBlock.Margin = Thickness(5)\ndraggable.Child = textBlock"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."}]}
{"id":"M:cAlgo.API.ApplicationDraggables.Remove(cAlgo.API.ApplicationDraggable)","kind":"method","name":"Remove","type":"T:cAlgo.API.ApplicationDraggables","namespace":"cAlgo.API","group":"Application","csharp":"void Remove(ApplicationDraggable draggable)","python":"applicationDraggables.Remove(draggable: ApplicationDraggable) -> None","summary":"Removes a draggable from application.","remarks":null,"parameters":[{"name":"draggable","csharpType":"ApplicationDraggable","pythonType":"ApplicationDraggable","summary":"Draggable"}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Application.Draggables.Add();\nApplication.Draggables.Remove(draggable);\nPrint(\"Draggables after removal: {0}\", Application.Draggables.Count);","python":"draggable = api.Application.Draggables.Add()\napi.Application.Draggables.Remove(draggable)\napi.Print(f\"Draggables after removal: {api.Application.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."}]}
{"id":"P:cAlgo.API.ApplicationDraggables.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ApplicationDraggables","namespace":"cAlgo.API","group":"Application","csharp":"int Count {get;}","python":"applicationDraggables.Count: int","summary":"Gets count of draggables.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Application.Draggables.Add();\nPrint(\"Application draggables: {0}\", Application.Draggables.Count);","python":"api.Application.Draggables.Add()\napi.Print(f\"Application draggables: {api.Application.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ApplicationDraggables/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to the application."}]}
{"id":"T:cAlgo.API.Indicators.Aroon","kind":"interface","name":"Aroon","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Aroon","python":"Aroon","summary":"An indicator for identifying trends in a currency pair, as well as for gauging the probability of a trend reversal.","remarks":"The indicator fluctuates between 0 and 100, with values above 80 signalling an upward trend, and values below 20 signalling a downward trend.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Indicators\n{\n    public partial class AroonReferenceExample:Indicator\n    {\n        private Aroon _aroon;\n\n        protected override void Initialize()\n        {\n            _aroon = Indicators.Aroon(Periods);\n        }\n\n        public override void Calculate(int index)\n        {\n            ResultAroonUp[index] = _aroon.Up[index];\n            ResultAroonDown[index] = _aroon.Down[index];\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.aroon = api.Indicators.Aroon(api.Periods)\n\n    def calculate(self, index):\n        api.ResultAroonUp[index] = self.aroon.Up[index]\n        api.ResultAroonDown[index] = self.aroon.Down[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 25\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"ResultAroonUp\",\n      \"DisplayName\": \"Up\"\n    },\n    {\n      \"Name\": \"ResultAroonDown\",\n      \"DisplayName\": \"Down\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use an Aroon indicator\n    public partial class AroonSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private Aroon _aroon;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _aroon = Indicators.Aroon(25);\n        }\n\n        protected override void OnBar()\n        {\n            if (_aroon.Up.Last(1) > _aroon.Down.Last(1) && _aroon.Up.Last(2) < _aroon.Down.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_aroon.Up.Last(1) < _aroon.Down.Last(1) && _aroon.Up.Last(2) > _aroon.Down.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AroonSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.aroon = api.Indicators.Aroon(api.Periods)\n\n    def on_bar_closed(self):\n        if self.aroon.Up.Last(0) > self.aroon.Down.Last(0) and self.aroon.Up.Last(1) < self.aroon.Down.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.aroon.Up.Last(0) < self.aroon.Down.Last(0) and self.aroon.Up.Last(1) > self.aroon.Down.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Aroon.Down","kind":"property","name":"Down","type":"T:cAlgo.API.Indicators.Aroon","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Down {get;}","python":"aroon.Down: IndicatorDataSeries","summary":"Aroon Down","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Aroon Down result.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\n\n//...\n\nprivate Aroon _aroon;\n\n//...\n\nprotected override void OnStart()\n{\n    _aroon = Indicators.Aroon(Periods);\n}\nprotected override void OnBar()\n{\n    Print(\"Current Aroon Down Value is: {0}\", _aroon.Down.LastValue);\n}\n\n//...","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        self.aroon = api.Indicators.Aroon(api.Periods)\n\n    def on_bar(self):\n        api.Print(f\"Current Aroon Down Value is: {self.aroon.Down.LastValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 25\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/Down/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/Down/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Aroon.Up","kind":"property","name":"Up","type":"T:cAlgo.API.Indicators.Aroon","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Up {get;}","python":"aroon.Up: IndicatorDataSeries","summary":"Aroon Up","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Aroon Up result.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\n\n//...\n\nprivate Aroon _aroon;\n\n//...\n\nprotected override void OnStart()\n{\n    _aroon = Indicators.Aroon(Periods);\n}\nprotected override void OnBar()\n{\n    Print(\"Current Aroon Up Value is: {0}\", _aroon.Up.LastValue);\n}\n\n//...","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        self.aroon = api.Indicators.Aroon(api.Periods)\n\n    def on_bar(self):\n        api.Print(f\"Current Aroon Up Value is: {self.aroon.Up.LastValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 25\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/Up/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Aroon/Up/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Asp","kind":"interface","name":"Asp","type":null,"namespace":"cAlgo.API","group":"Asp","csharp":"public interface Asp","python":"Asp","summary":"Represents the active symbol panel.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            var aspTab = Asp.AddTab(\"Test Tab\");\n\n            var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n            var textBlock = new TextBlock {Text = \"Show anything\"};\n\n            panel.AddChild(textBlock);\n\n            var removeTabButton = new Button {Text = \"Remove Tab\"};\n\n            removeTabButton.Click += args => Asp.RemoveTab(aspTab);\n\n            panel.AddChild(removeTabButton);\n\n            aspTab.Child = panel;\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        aspTab = api.Asp.AddTab(\"Test Tab\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        textBlock = TextBlock()\n        textBlock.Text = \"Show anything\"\n\n        panel.AddChild(textBlock)\n\n        removeTabButton = Button()\n        removeTabButton.Text = \"Remove Tab\"\n        removeTabButton.Click += lambda _: api.Asp.RemoveTab(aspTab)\n\n        panel.AddChild(removeTabButton)\n\n        aspTab.Child = panel","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Asp.AddTab(System.String)","kind":"method","name":"AddTab","type":"T:cAlgo.API.Asp","namespace":"cAlgo.API","group":"Asp","csharp":"AspTab AddTab(string title)","python":"api.Asp.AddTab(title: str) -> AspTab","summary":"Adds a new tab to active symbol panel.","remarks":null,"parameters":[{"name":"title","csharpType":"string","pythonType":"str","summary":"Tab title"}],"returns":{"csharpType":"AspTab","pythonType":"AspTab","summary":"ASP Tab","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\ntab.Child = new TextBlock { Text = \"Hello from my plugin\" };\nPrint(\"Added active symbol panel tab {0}\", tab.Id);","python":"tab = api.Asp.AddTab(\"My Tab\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\ntab.Child = textBlock\napi.Print(f\"Added active symbol panel tab {tab.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/AddTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/AddTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Asp.RemoveTab(System.String)","kind":"method","name":"RemoveTab","type":"T:cAlgo.API.Asp","namespace":"cAlgo.API","group":"Asp","csharp":"bool RemoveTab(string id)","python":"api.Asp.RemoveTab(id: str) -> bool","summary":"Removes a tab from active symbol panel.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"Tab Id"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"Temporary Tab\");\nvar isRemoved = Asp.RemoveTab(tab.Id);\nPrint(\"Tab removed: {0}\", isRemoved);","python":"tab = api.Asp.AddTab(\"Temporary Tab\")\nisRemoved = api.Asp.RemoveTab(tab.Id)\napi.Print(f\"Tab removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/RemoveTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/RemoveTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Asp.RemoveTab(cAlgo.API.AspTab)","kind":"method","name":"RemoveTab","type":"T:cAlgo.API.Asp","namespace":"cAlgo.API","group":"Asp","csharp":"bool RemoveTab(AspTab tab)","python":"api.Asp.RemoveTab(tab: AspTab) -> bool","summary":"Removes a tab from active symbol panel.","remarks":null,"parameters":[{"name":"tab","csharpType":"AspTab","pythonType":"AspTab","summary":"Tab"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"Temporary Tab\");\nvar isRemoved = Asp.RemoveTab(tab);\nPrint(\"Tab removed: {0}\", isRemoved);","python":"tab = api.Asp.AddTab(\"Temporary Tab\")\nisRemoved = api.Asp.RemoveTab(tab)\napi.Print(f\"Tab removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/RemoveTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/RemoveTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Asp.SymbolTab","kind":"property","name":"SymbolTab","type":"T:cAlgo.API.Asp","namespace":"cAlgo.API","group":"Asp","csharp":"AspSymbolTab SymbolTab {get;}","python":"api.Asp.SymbolTab: AspSymbolTab","summary":"Symbol tab in active symbol panel.","remarks":null,"parameters":[],"returns":{"csharpType":"AspSymbolTab","pythonType":"AspSymbolTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbolTab = Asp.SymbolTab;\nPrint(\"Active symbol panel symbol: {0}\", symbolTab.Symbol.Name);","python":"symbolTab = api.Asp.SymbolTab\napi.Print(f\"Active symbol panel symbol: {symbolTab.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/SymbolTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/Asp/SymbolTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspBlock","kind":"interface","name":"AspBlock","type":null,"namespace":"cAlgo.API","group":"Asp","csharp":"public interface AspBlock","python":"AspBlock","summary":"Represents an active symbol panel block.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            var aspSymbolTabBlock = Asp.SymbolTab.AddBlock(\"Test Block\");\n\n            var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n            var webView = new WebView() {Height = 250};\n\n            webView.Loaded += args => webView.NavigateAsync(\"https://ctrader.com/\");\n\n            panel.AddChild(webView);\n\n            var removeBlockButton = new Button {Text = \"Remove Block\"};\n\n            removeBlockButton.Click += args => Asp.SymbolTab.RemoveBlock(aspSymbolTabBlock);\n\n            panel.AddChild(removeBlockButton);\n\n            aspSymbolTabBlock.Child = panel;\n\n            aspSymbolTabBlock.Height = 300;\n\n            aspSymbolTabBlock.DetachedWindow.Width = 400;\n            aspSymbolTabBlock.DetachedWindow.Height = 350;\n\n            aspSymbolTabBlock.Detached += args => Print(\"Block detached\");\n            aspSymbolTabBlock.Attached += args => Print(\"Block attached\");\n            aspSymbolTabBlock.Updated += args => Print(\"Block updated\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        aspSymbolTabBlock = api.Asp.SymbolTab.AddBlock(\"Test Block\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        webView = WebView()\n        webView.Height = 250\n        webView.Loaded += lambda _: webView.NavigateAsync(\"https://ctrader.com/\")\n\n        panel.AddChild(webView)\n\n        removeBlockButton = Button()\n        removeBlockButton.Text = \"Remove Block\"\n        removeBlockButton.Click += lambda _: api.Asp.SymbolTab.RemoveBlock(aspSymbolTabBlock)\n\n        panel.AddChild(removeBlockButton)\n\n        aspSymbolTabBlock.Child = panel\n        aspSymbolTabBlock.Height = 300\n        aspSymbolTabBlock.DetachedWindow.Width = 400\n        aspSymbolTabBlock.DetachedWindow.Height = 350\n\n        aspSymbolTabBlock.Detached += lambda _: print(\"Block detached\")\n        aspSymbolTabBlock.Attached += lambda _: print(\"Block attached\")\n        aspSymbolTabBlock.Updated += lambda _: print(\"Block updated\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.Child","kind":"property","name":"Child","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"ControlBase Child {get; set;}","python":"aspBlock.Child: ControlBase","summary":"Get / set content of current block.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.Child = new TextBlock { Text = \"Block content\", Margin = 5 };","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Block content\"\ntextBlock.Margin = Thickness(5)\nblock.Child = textBlock"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.DetachedWindow","kind":"property","name":"DetachedWindow","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"DetachedWindow DetachedWindow {get;}","python":"aspBlock.DetachedWindow: DetachedWindow","summary":"Returns detached window properties.","remarks":null,"parameters":[],"returns":{"csharpType":"DetachedWindow","pythonType":"DetachedWindow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.DetachedWindow.Width = 400;\nblock.DetachedWindow.Height = 350;\nPrint(\"Detached window size: {0}x{1}\", block.DetachedWindow.Width, block.DetachedWindow.Height);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\nblock.DetachedWindow.Width = 400\nblock.DetachedWindow.Height = 350\napi.Print(f\"Detached window size: {block.DetachedWindow.Width}x{block.DetachedWindow.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/DetachedWindow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/DetachedWindow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.Height","kind":"property","name":"Height","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"double Height {get; set;}","python":"aspBlock.Height: float","summary":"Get / set height of current block (default is 200).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.Height = 300;\nPrint(\"Block height: {0}\", block.Height);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\nblock.Height = 300\napi.Print(f\"Block height: {block.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.Id","kind":"property","name":"Id","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"string Id {get;}","python":"aspBlock.Id: str","summary":"Returns unique ID of the current block.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nPrint(\"Block ID: {0}\", block.Id);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\napi.Print(f\"Block ID: {block.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.Index","kind":"property","name":"Index","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"int Index {get; set;}","python":"aspBlock.Index: int","summary":"Get index of current block.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nPrint(\"Block index: {0}\", block.Index);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\napi.Print(f\"Block index: {block.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.IsAttached","kind":"property","name":"IsAttached","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"bool IsAttached {get; set;}","python":"aspBlock.IsAttached: bool","summary":"Get / set block attached / detached state.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.IsDetachable = true;\nblock.IsAttached = false;\nPrint(\"Block is attached: {0}\", block.IsAttached);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\nblock.IsDetachable = True\nblock.IsAttached = False\napi.Print(f\"Block is attached: {block.IsAttached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsAttached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsAttached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.IsDetachable","kind":"property","name":"IsDetachable","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"bool IsDetachable {get; set;}","python":"aspBlock.IsDetachable: bool","summary":"Get / set block detachability, if True user can attach or detach the block.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.IsDetachable = false;\nPrint(\"Block can be detached: {0}\", block.IsDetachable);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\nblock.IsDetachable = False\napi.Print(f\"Block can be detached: {block.IsDetachable}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsDetachable/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsDetachable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.IsExpanded","kind":"property","name":"IsExpanded","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"bool IsExpanded {get; set;}","python":"aspBlock.IsExpanded: bool","summary":"Get expanded state of current block.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nPrint(\"Block is expanded: {0}\", block.IsExpanded);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\napi.Print(f\"Block is expanded: {block.IsExpanded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsExpanded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsExpanded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlock.Title","kind":"property","name":"Title","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"string Title {get;}","python":"aspBlock.Title: str","summary":"Returns title of the current block.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nPrint(\"Block title: {0}\", block.Title);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\napi.Print(f\"Block title: {block.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.AspBlock.Attached","kind":"event","name":"Attached","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"event Action<AspBlockAttachedEventArgs> Attached;","python":"aspBlock.Attached += handler  # handler(obj: AspBlockAttachedEventArgs)","summary":"Occurs when block attached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AspBlockAttachedEventArgs>","pythonType":"Callable[[AspBlockAttachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Attached += OnBlockAttached;\n}\n\nprivate void OnBlockAttached(AspBlockAttachedEventArgs args)\n{\n    Print(\"Block attached: {0}\", args.AspBlock.Title);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.Attached += self.on_block_attached\n\ndef on_block_attached(self, args):\n    api.Print(f\"Block attached: {args.AspBlock.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Attached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Attached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.AspBlock.Detached","kind":"event","name":"Detached","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"event Action<AspBlockDetachedEventArgs> Detached;","python":"aspBlock.Detached += handler  # handler(obj: AspBlockDetachedEventArgs)","summary":"Occurs when block is detached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AspBlockDetachedEventArgs>","pythonType":"Callable[[AspBlockDetachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Detached += OnBlockDetached;\n}\n\nprivate void OnBlockDetached(AspBlockDetachedEventArgs args)\n{\n    Print(\"Block detached: {0}\", args.AspBlock.Title);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.Detached += self.on_block_detached\n\ndef on_block_detached(self, args):\n    api.Print(f\"Block detached: {args.AspBlock.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Detached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Detached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.AspBlock.Updated","kind":"event","name":"Updated","type":"T:cAlgo.API.AspBlock","namespace":"cAlgo.API","group":"Asp","csharp":"event Action<AspBlockUpdatedEventArgs> Updated;","python":"aspBlock.Updated += handler  # handler(obj: AspBlockUpdatedEventArgs)","summary":"Occurs when block is updated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AspBlockUpdatedEventArgs>","pythonType":"Callable[[AspBlockUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Updated += OnBlockUpdated;\n}\n\nprivate void OnBlockUpdated(AspBlockUpdatedEventArgs args)\n{\n    Print(\"Block updated: {0}, height {1}\", args.AspBlock.Title, args.AspBlock.Height);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.Updated += self.on_block_updated\n\ndef on_block_updated(self, args):\n    api.Print(f\"Block updated: {args.AspBlock.Title}, height {args.AspBlock.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Updated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/Updated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspBlockAttachedEventArgs","kind":"class","name":"AspBlockAttachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AspBlockAttachedEventArgs","python":"AspBlockAttachedEventArgs","summary":"Provides data for plugin ASP block attached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Child = new TextBlock { Text = \"Hello from plugin\" };\n    block.Attached += OnBlockAttached;\n}\n\nprivate void OnBlockAttached(AspBlockAttachedEventArgs args)\n{\n    Print(\"Block {0} attached back to the active symbol panel\", args.AspBlock.Title);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    block.Child = text_block\n    block.Attached += self.on_block_attached\n\ndef on_block_attached(self, args):\n    api.Print(f\"Block {args.AspBlock.Title} attached back to the active symbol panel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockAttachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockAttachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlockAttachedEventArgs.AspBlock","kind":"property","name":"AspBlock","type":"T:cAlgo.API.AspBlockAttachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public AspBlock AspBlock {get;}","python":"aspBlockAttachedEventArgs.AspBlock: AspBlock","summary":"Attached block.","remarks":null,"parameters":[],"returns":{"csharpType":"AspBlock","pythonType":"AspBlock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Attached += OnBlockAttached;\n}\n\nprivate void OnBlockAttached(AspBlockAttachedEventArgs args)\n{\n    Print(\"Block {0} attached: {1}, index: {2}\", args.AspBlock.Id, args.AspBlock.IsAttached, args.AspBlock.Index);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.Attached += self.on_block_attached\n\ndef on_block_attached(self, args):\n    api.Print(f\"Block {args.AspBlock.Id} attached: {args.AspBlock.IsAttached}, index: {args.AspBlock.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockAttachedEventArgs/AspBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockAttachedEventArgs/AspBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspBlockDetachedEventArgs","kind":"class","name":"AspBlockDetachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AspBlockDetachedEventArgs","python":"AspBlockDetachedEventArgs","summary":"Provides data for plugin ASP block detached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.IsDetachable = true;\n    block.Child = new TextBlock { Text = \"Hello from plugin\" };\n    block.Detached += OnBlockDetached;\n}\n\nprivate void OnBlockDetached(AspBlockDetachedEventArgs args)\n{\n    Print(\"Block {0} detached from the active symbol panel\", args.AspBlock.Title);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.IsDetachable = True\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    block.Child = text_block\n    block.Detached += self.on_block_detached\n\ndef on_block_detached(self, args):\n    api.Print(f\"Block {args.AspBlock.Title} detached from the active symbol panel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockDetachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockDetachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlockDetachedEventArgs.AspBlock","kind":"property","name":"AspBlock","type":"T:cAlgo.API.AspBlockDetachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public AspBlock AspBlock {get;}","python":"aspBlockDetachedEventArgs.AspBlock: AspBlock","summary":"Detached block.","remarks":null,"parameters":[],"returns":{"csharpType":"AspBlock","pythonType":"AspBlock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.IsDetachable = true;\n    block.Detached += OnBlockDetached;\n}\n\nprivate void OnBlockDetached(AspBlockDetachedEventArgs args)\n{\n    Print(\"Block {0} attached: {1}\", args.AspBlock.Id, args.AspBlock.IsAttached);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.IsDetachable = True\n    block.Detached += self.on_block_detached\n\ndef on_block_detached(self, args):\n    api.Print(f\"Block {args.AspBlock.Id} attached: {args.AspBlock.IsAttached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockDetachedEventArgs/AspBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockDetachedEventArgs/AspBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspBlockUpdatedEventArgs","kind":"class","name":"AspBlockUpdatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AspBlockUpdatedEventArgs","python":"AspBlockUpdatedEventArgs","summary":"Provides data for plugin ASP block updated event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Child = new TextBlock { Text = \"Hello from plugin\" };\n    block.Updated += OnBlockUpdated;\n}\n\nprivate void OnBlockUpdated(AspBlockUpdatedEventArgs args)\n{\n    Print(\"Block {0} updated, expanded: {1}, height: {2}\", args.AspBlock.Title, args.AspBlock.IsExpanded, args.AspBlock.Height);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    block.Child = text_block\n    block.Updated += self.on_block_updated\n\ndef on_block_updated(self, args):\n    api.Print(f\"Block {args.AspBlock.Title} updated, expanded: {args.AspBlock.IsExpanded}, height: {args.AspBlock.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockUpdatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockUpdatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspBlockUpdatedEventArgs.AspBlock","kind":"property","name":"AspBlock","type":"T:cAlgo.API.AspBlockUpdatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public AspBlock AspBlock {get;}","python":"aspBlockUpdatedEventArgs.AspBlock: AspBlock","summary":"Updated block.","remarks":null,"parameters":[],"returns":{"csharpType":"AspBlock","pythonType":"AspBlock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var block = Asp.SymbolTab.AddBlock(\"My Block\");\n    block.Updated += OnBlockUpdated;\n}\n\nprivate void OnBlockUpdated(AspBlockUpdatedEventArgs args)\n{\n    Print(\"Block {0} is expanded: {1}\", args.AspBlock.Id, args.AspBlock.IsExpanded);\n}","python":"def on_start(self):\n    block = api.Asp.SymbolTab.AddBlock(\"My Block\")\n    block.Updated += self.on_block_updated\n\ndef on_block_updated(self, args):\n    api.Print(f\"Block {args.AspBlock.Id} is expanded: {args.AspBlock.IsExpanded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockUpdatedEventArgs/AspBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockUpdatedEventArgs/AspBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspSymbolChangedEventArgs","kind":"class","name":"AspSymbolChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AspSymbolChangedEventArgs","python":"AspSymbolChangedEventArgs","summary":"Provides data for active symbol panel symbol changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Asp.SymbolTab.SymbolChanged += OnAspSymbolChanged;\n}\n\nprivate void OnAspSymbolChanged(AspSymbolChangedEventArgs args)\n{\n    var oldSymbolName = args.OldSymbol?.Name ?? \"none\";\n    Print(\"Active symbol panel symbol changed from {0} to {1}\", oldSymbolName, args.NewSymbol.Name);\n}","python":"def on_start(self):\n    api.Asp.SymbolTab.SymbolChanged += self.on_asp_symbol_changed\n\ndef on_asp_symbol_changed(self, args):\n    old_symbol_name = args.OldSymbol.Name if args.OldSymbol is not None else \"none\"\n    api.Print(f\"Active symbol panel symbol changed from {old_symbol_name} to {args.NewSymbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspSymbolChangedEventArgs.NewSymbol","kind":"property","name":"NewSymbol","type":"T:cAlgo.API.AspSymbolChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Symbol NewSymbol {get;}","python":"aspSymbolChangedEventArgs.NewSymbol: Symbol","summary":"New symbol of active symbol panel.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Asp.SymbolTab.SymbolChanged += OnAspSymbolChanged;\n}\n\nprivate void OnAspSymbolChanged(AspSymbolChangedEventArgs args)\n{\n    Print(\"New symbol: {0}, bid: {1}, ask: {2}\", args.NewSymbol.Name, args.NewSymbol.Bid, args.NewSymbol.Ask);\n}","python":"def on_start(self):\n    api.Asp.SymbolTab.SymbolChanged += self.on_asp_symbol_changed\n\ndef on_asp_symbol_changed(self, args):\n    api.Print(f\"New symbol: {args.NewSymbol.Name}, bid: {args.NewSymbol.Bid}, ask: {args.NewSymbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/NewSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/NewSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspSymbolChangedEventArgs.OldSymbol","kind":"property","name":"OldSymbol","type":"T:cAlgo.API.AspSymbolChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Symbol OldSymbol {get;}","python":"aspSymbolChangedEventArgs.OldSymbol: Symbol","summary":"Old symbol of active symbol panel.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Asp.SymbolTab.SymbolChanged += OnAspSymbolChanged;\n}\n\nprivate void OnAspSymbolChanged(AspSymbolChangedEventArgs args)\n{\n    if (args.OldSymbol != null)\n        Print(\"Previous symbol: {0}, bid: {1}\", args.OldSymbol.Name, args.OldSymbol.Bid);\n}","python":"def on_start(self):\n    api.Asp.SymbolTab.SymbolChanged += self.on_asp_symbol_changed\n\ndef on_asp_symbol_changed(self, args):\n    if args.OldSymbol is not None:\n        api.Print(f\"Previous symbol: {args.OldSymbol.Name}, bid: {args.OldSymbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/OldSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspSymbolChangedEventArgs/OldSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspSymbolTab","kind":"interface","name":"AspSymbolTab","type":null,"namespace":"cAlgo.API","group":"Asp","csharp":"public interface AspSymbolTab","python":"AspSymbolTab","summary":"Active symbol panel tab.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            var aspSymbolTabBlock = Asp.SymbolTab.AddBlock(\"Test Block\");\n\n            var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n            var webView = new WebView() {Height = 250};\n\n            webView.Loaded += args => webView.NavigateAsync(\"https://ctrader.com/\");\n\n            panel.AddChild(webView);\n\n            var removeBlockButton = new Button {Text = \"Remove Block\"};\n\n            removeBlockButton.Click += args => Asp.SymbolTab.RemoveBlock(aspSymbolTabBlock);\n\n            panel.AddChild(removeBlockButton);\n\n            aspSymbolTabBlock.Child = panel;\n\n            aspSymbolTabBlock.Height = 300;\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        aspSymbolTabBlock = api.Asp.SymbolTab.AddBlock(\"Test Block\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        webView = WebView()\n        webView.Height = 250\n        webView.Loaded += lambda _: webView.NavigateAsync(\"https://ctrader.com/\")\n\n        panel.AddChild(webView)\n\n        removeBlockButton = Button()\n        removeBlockButton.Text = \"Remove Block\"\n        removeBlockButton.Click += lambda _: api.Asp.SymbolTab.RemoveBlock(aspSymbolTabBlock)\n\n        panel.AddChild(removeBlockButton)\n\n        aspSymbolTabBlock.Child = panel\n        aspSymbolTabBlock.Height = 300","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            Print($\"Current Active Symbol Panel symbol is: {Asp.SymbolTab.Symbol.Name}\");\n\n            Asp.SymbolTab.SymbolChanged += args => Print($\"Active Symbol Panel symbol changed to: {args.NewSymbol.Name}\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        print(f\"Current Active Symbol Panel symbol is: {api.Asp.SymbolTab.Symbol.Name}\")\n        api.Asp.SymbolTab.SymbolChanged += lambda args: print(f\"Active Symbol Panel symbol changed to: {args.NewSymbol.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.AspSymbolTab.AddBlock(System.String)","kind":"method","name":"AddBlock","type":"T:cAlgo.API.AspSymbolTab","namespace":"cAlgo.API","group":"Asp","csharp":"AspBlock AddBlock(string title)","python":"aspSymbolTab.AddBlock(title: str) -> AspBlock","summary":"Adds a new section block to active symbol panel.","remarks":null,"parameters":[{"name":"title","csharpType":"string","pythonType":"str","summary":"Block title"}],"returns":{"csharpType":"AspBlock","pythonType":"AspBlock","summary":"ASP Block","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.Child = new TextBlock { Text = \"Hello from my plugin\" };\nblock.Height = 150;\nPrint(\"Added block {0}\", block.Id);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\nblock.Child = textBlock\nblock.Height = 150\napi.Print(f\"Added block {block.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/AddBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/AddBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.AspSymbolTab.RemoveBlock(System.String)","kind":"method","name":"RemoveBlock","type":"T:cAlgo.API.AspSymbolTab","namespace":"cAlgo.API","group":"Asp","csharp":"bool RemoveBlock(string id)","python":"aspSymbolTab.RemoveBlock(id: str) -> bool","summary":"Removes a section block from active symbol panel.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"Block Id"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Temporary Block\");\nvar isRemoved = Asp.SymbolTab.RemoveBlock(block.Id);\nPrint(\"Block removed: {0}\", isRemoved);","python":"block = api.Asp.SymbolTab.AddBlock(\"Temporary Block\")\nisRemoved = api.Asp.SymbolTab.RemoveBlock(block.Id)\napi.Print(f\"Block removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/RemoveBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/RemoveBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.AspSymbolTab.RemoveBlock(cAlgo.API.AspBlock)","kind":"method","name":"RemoveBlock","type":"T:cAlgo.API.AspSymbolTab","namespace":"cAlgo.API","group":"Asp","csharp":"bool RemoveBlock(AspBlock block)","python":"aspSymbolTab.RemoveBlock(block: AspBlock) -> bool","summary":"Removes a section block from active symbol panel.","remarks":null,"parameters":[{"name":"block","csharpType":"AspBlock","pythonType":"AspBlock","summary":"Block"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Temporary Block\");\nvar isRemoved = Asp.SymbolTab.RemoveBlock(block);\nPrint(\"Block removed: {0}\", isRemoved);","python":"block = api.Asp.SymbolTab.AddBlock(\"Temporary Block\")\nisRemoved = api.Asp.SymbolTab.RemoveBlock(block)\napi.Print(f\"Block removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/RemoveBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/RemoveBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspSymbolTab.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.AspSymbolTab","namespace":"cAlgo.API","group":"Asp","csharp":"Symbol Symbol {get;}","python":"aspSymbolTab.Symbol: Symbol","summary":"Current symbol of Active symbol panel.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbol = Asp.SymbolTab.Symbol;\nPrint(\"Active symbol panel shows {0}, bid {1}\", symbol.Name, symbol.Bid);","python":"symbol = api.Asp.SymbolTab.Symbol\napi.Print(f\"Active symbol panel shows {symbol.Name}, bid {symbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.AspSymbolTab.SymbolChanged","kind":"event","name":"SymbolChanged","type":"T:cAlgo.API.AspSymbolTab","namespace":"cAlgo.API","group":"Asp","csharp":"event Action<AspSymbolChangedEventArgs> SymbolChanged;","python":"aspSymbolTab.SymbolChanged += handler  # handler(obj: AspSymbolChangedEventArgs)","summary":"Occurs when active symbol panel selected symbol changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AspSymbolChangedEventArgs>","pythonType":"Callable[[AspSymbolChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Asp.SymbolTab.SymbolChanged += OnAspSymbolChanged;\n}\n\nprivate void OnAspSymbolChanged(AspSymbolChangedEventArgs args)\n{\n    Print(\"Active symbol panel symbol changed from {0} to {1}\", args.OldSymbol.Name, args.NewSymbol.Name);\n}","python":"def on_start(self):\n    api.Asp.SymbolTab.SymbolChanged += self.on_asp_symbol_changed\n\ndef on_asp_symbol_changed(self, args):\n    api.Print(f\"Active symbol panel symbol changed from {args.OldSymbol.Name} to {args.NewSymbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/SymbolChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspSymbolTab/SymbolChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspTab","kind":"interface","name":"AspTab","type":null,"namespace":"cAlgo.API","group":"Asp","csharp":"public interface AspTab","python":"AspTab","summary":"Represents an active symbol panel tab.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            var aspTab = Asp.AddTab(\"Test Tab\");\n\n            var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n            var textBlock = new TextBlock {Text = \"Show anything\"};\n\n            panel.AddChild(textBlock);\n\n            var removeTabButton = new Button {Text = \"Remove Tab\"};\n\n            removeTabButton.Click += args => Asp.RemoveTab(aspTab);\n\n            panel.AddChild(removeTabButton);\n\n            aspTab.Child = panel;\n\n            aspTab.IsSelectedChanged += args => Print($\"ASP tab selection changed, IsSelected: {args.AspTab.IsSelected}\");\n\n            aspTab.IsSelected = true;\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        aspTab = api.Asp.AddTab(\"Test Tab\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        textBlock = TextBlock()\n        textBlock.Text = \"Show anything\"\n\n        panel.AddChild(textBlock)\n\n        removeTabButton = Button()\n        removeTabButton.Text = \"Remove Tab\"\n        removeTabButton.Click += lambda _: api.Asp.RemoveTab(aspTab)\n\n        panel.AddChild(removeTabButton)\n\n        aspTab.Child = panel\n        aspTab.IsSelectedChanged += lambda args: print(f\"ASP tab selection changed, IsSelected: {args.AspTab.IsSelected}\")\n        aspTab.IsSelected = True","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTab.Child","kind":"property","name":"Child","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"ControlBase Child {get; set;}","python":"aspTab.Child: ControlBase","summary":"Get / set content of current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\nvar panel = new StackPanel();\npanel.AddChild(new TextBlock { Text = \"Tab content\" });\ntab.Child = panel;","python":"tab = api.Asp.AddTab(\"My Tab\")\npanel = StackPanel()\ntextBlock = TextBlock()\ntextBlock.Text = \"Tab content\"\npanel.AddChild(textBlock)\ntab.Child = panel"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTab.Id","kind":"property","name":"Id","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"string Id {get;}","python":"aspTab.Id: str","summary":"Returns unique ID of the current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\nPrint(\"Tab ID: {0}\", tab.Id);","python":"tab = api.Asp.AddTab(\"My Tab\")\napi.Print(f\"Tab ID: {tab.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTab.Index","kind":"property","name":"Index","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"int Index {get; set;}","python":"aspTab.Index: int","summary":"Get / set index of current tab (Must be greater than zero).","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\ntab.Index = 1;\nPrint(\"Tab index: {0}\", tab.Index);","python":"tab = api.Asp.AddTab(\"My Tab\")\ntab.Index = 1\napi.Print(f\"Tab index: {tab.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTab.IsSelected","kind":"property","name":"IsSelected","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"bool IsSelected {get; set;}","python":"aspTab.IsSelected: bool","summary":"Get / set selected state of current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\ntab.IsSelected = true;\nPrint(\"Tab is selected: {0}\", tab.IsSelected);","python":"tab = api.Asp.AddTab(\"My Tab\")\ntab.IsSelected = True\napi.Print(f\"Tab is selected: {tab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelected/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTab.Title","kind":"property","name":"Title","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"string Title {get;}","python":"aspTab.Title: str","summary":"Returns title of the current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = Asp.AddTab(\"My Tab\");\nPrint(\"Tab title: {0}\", tab.Title);","python":"tab = api.Asp.AddTab(\"My Tab\")\napi.Print(f\"Tab title: {tab.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.AspTab.IsSelectedChanged","kind":"event","name":"IsSelectedChanged","type":"T:cAlgo.API.AspTab","namespace":"cAlgo.API","group":"Asp","csharp":"event Action<AspTabIsSelectedChangedEventArgs> IsSelectedChanged;","python":"aspTab.IsSelectedChanged += handler  # handler(obj: AspTabIsSelectedChangedEventArgs)","summary":"Occurs after tab IsSelected value change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AspTabIsSelectedChangedEventArgs>","pythonType":"Callable[[AspTabIsSelectedChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = Asp.AddTab(\"My Tab\");\n    tab.IsSelectedChanged += OnTabIsSelectedChanged;\n}\n\nprivate void OnTabIsSelectedChanged(AspTabIsSelectedChangedEventArgs args)\n{\n    Print(\"Tab {0} is selected: {1}\", args.AspTab.Title, args.AspTab.IsSelected);\n}","python":"def on_start(self):\n    tab = api.Asp.AddTab(\"My Tab\")\n    tab.IsSelectedChanged += self.on_tab_is_selected_changed\n\ndef on_tab_is_selected_changed(self, args):\n    api.Print(f\"Tab {args.AspTab.Title} is selected: {args.AspTab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelectedChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelectedChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.AspTabIsSelectedChangedEventArgs","kind":"class","name":"AspTabIsSelectedChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class AspTabIsSelectedChangedEventArgs","python":"AspTabIsSelectedChangedEventArgs","summary":"Provides data for plugin ASP tab IsSelectedChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = Asp.AddTab(\"My Tab\");\n    tab.Child = new TextBlock { Text = \"Hello from plugin\" };\n    tab.IsSelectedChanged += OnTabIsSelectedChanged;\n}\n\nprivate void OnTabIsSelectedChanged(AspTabIsSelectedChangedEventArgs args)\n{\n    Print(\"Tab {0} is selected: {1}\", args.AspTab.Title, args.AspTab.IsSelected);\n}","python":"def on_start(self):\n    tab = api.Asp.AddTab(\"My Tab\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    tab.Child = text_block\n    tab.IsSelectedChanged += self.on_tab_is_selected_changed\n\ndef on_tab_is_selected_changed(self, args):\n    api.Print(f\"Tab {args.AspTab.Title} is selected: {args.AspTab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspTabIsSelectedChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspTabIsSelectedChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.AspTabIsSelectedChangedEventArgs.AspTab","kind":"property","name":"AspTab","type":"T:cAlgo.API.AspTabIsSelectedChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public AspTab AspTab {get;}","python":"aspTabIsSelectedChangedEventArgs.AspTab: AspTab","summary":"ASP tab.","remarks":null,"parameters":[],"returns":{"csharpType":"AspTab","pythonType":"AspTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = Asp.AddTab(\"My Tab\");\n    tab.IsSelectedChanged += OnTabIsSelectedChanged;\n}\n\nprivate void OnTabIsSelectedChanged(AspTabIsSelectedChangedEventArgs args)\n{\n    if (args.AspTab.IsSelected)\n        Print(\"Tab {0} at index {1} was selected\", args.AspTab.Id, args.AspTab.Index);\n}","python":"def on_start(self):\n    tab = api.Asp.AddTab(\"My Tab\")\n    tab.IsSelectedChanged += self.on_tab_is_selected_changed\n\ndef on_tab_is_selected_changed(self, args):\n    if args.AspTab.IsSelected:\n        api.Print(f\"Tab {args.AspTab.Id} at index {args.AspTab.Index} was selected\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspTabIsSelectedChangedEventArgs/AspTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/AspTabIsSelectedChangedEventArgs/AspTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Asset","kind":"interface","name":"Asset","type":null,"namespace":"cAlgo.API","group":"Assets","csharp":"public interface Asset","python":"Asset","summary":"The asset represents a currency.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var assetName in Assets)\n{\n    var asset = Assets.GetAsset(assetName);\n    Print(\"Asset Name: {0} | Asset Digits: {1}\", asset.Name, asset.Digits);\n}","python":"for assetName in api.Assets:\n    asset = api.Assets.GetAsset(assetName)\n    api.Print(f\"Asset Name: {asset.Name} | Asset Digits: {asset.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Asset.Convert(cAlgo.API.Asset,System.Double)","kind":"method","name":"Convert","type":"T:cAlgo.API.Asset","namespace":"cAlgo.API","group":"Assets","csharp":"double Convert(Asset to, double value)","python":"asset.Convert(to: Asset, value: float) -> float","summary":"Converts value to another asset.","remarks":null,"parameters":[{"name":"to","csharpType":"Asset","pythonType":"Asset","summary":"Target asset"},{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from current Asset"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cad = Assets.GetAsset(\"CAD\");\nif (cad == null)\n{\n    Print(\"Asset CAD not found\");\n    return;\n}\n\nvar balanceInCad = Account.Asset.Convert(cad, Account.Balance);\nPrint(\"Balance in CAD: {0}\", balanceInCad);","python":"cad = api.Assets.GetAsset(\"CAD\")\nif cad is None:\n    api.Print(\"Asset CAD not found\")\nelse:\n    balanceInCad = api.Account.Asset.Convert(cad, api.Account.Balance)\n    api.Print(f\"Balance in CAD: {balanceInCad}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Asset.Convert(System.String,System.Double)","kind":"method","name":"Convert","type":"T:cAlgo.API.Asset","namespace":"cAlgo.API","group":"Assets","csharp":"double Convert(string to, double value)","python":"asset.Convert(to: str, value: float) -> float","summary":"Converts value to another asset.","remarks":null,"parameters":[{"name":"to","csharpType":"string","pythonType":"str","summary":"Target asset"},{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from current Asset"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (!Assets.Exists(\"CAD\"))\n{\n    Print(\"Asset CAD not found\");\n    return;\n}\n\nvar balanceInCad = Account.Asset.Convert(\"CAD\", Account.Balance);\nPrint(\"Balance in CAD: {0}\", balanceInCad);","python":"if not api.Assets.Exists(\"CAD\"):\n    api.Print(\"Asset CAD not found\")\nelse:\n    balanceInCad = api.Account.Asset.Convert(\"CAD\", api.Account.Balance)\n    api.Print(f\"Balance in CAD: {balanceInCad}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Asset.Digits","kind":"property","name":"Digits","type":"T:cAlgo.API.Asset","namespace":"cAlgo.API","group":"Assets","csharp":"int Digits {get;}","python":"asset.Digits: int","summary":"Number of asset digits","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var asset = Account.Asset;\nPrint(\"Balance: {0}\", Math.Round(Account.Balance, asset.Digits));","python":"asset = api.Account.Asset\napi.Print(f\"Balance: {round(api.Account.Balance, asset.Digits)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Digits/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Digits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Asset.Name","kind":"property","name":"Name","type":"T:cAlgo.API.Asset","namespace":"cAlgo.API","group":"Assets","csharp":"string Name {get;}","python":"asset.Name: str","summary":"The asset Name","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Account deposit asset: {0}\", Account.Asset.Name);","python":"api.Print(f\"Account deposit asset: {api.Account.Asset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Asset/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Assets","kind":"interface","name":"Assets","type":null,"namespace":"cAlgo.API","group":"Assets","csharp":"public interface Assets","python":"Assets","summary":"Represents the list of all the assets with the asset names as string values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var assetName in Assets)\n{\n    var asset = Assets.GetAsset(assetName);\n    Print(\"Asset Name: {0} | Asset Digits: {1} | Is Deposit Asset: {2}\", asset.Name, asset.Digits, asset.Name == Account.Asset.Name);\n}","python":"for assetName in api.Assets:\n    asset = api.Assets.GetAsset(assetName)\n    api.Print(f\"Asset Name: {asset.Name} | Asset Digits: {asset.Digits} | Is Deposit Asset: {asset.Name == api.Account.Asset.Name}\")"},{"csharp":"var eur = Assets.GetAsset(\"EUR\");\nvar usd = Assets.GetAsset(\"USD\");\nif (eur != null && usd != null)\n    Print(\"1 EUR is {0} USD\", eur.Convert(usd, 1));","python":"eur = api.Assets.GetAsset(\"EUR\")\nusd = api.Assets.GetAsset(\"USD\")\nif eur is not None and usd is not None:\n    api.Print(f\"1 EUR is {eur.Convert(usd, 1)} USD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Assets.Exists(System.String)","kind":"method","name":"Exists","type":"T:cAlgo.API.Assets","namespace":"cAlgo.API","group":"Assets","csharp":"bool Exists(string assetName)","python":"api.Assets.Exists(assetName: str) -> bool","summary":"Defines if the specific asset exists.","remarks":null,"parameters":[{"name":"assetName","csharpType":"string","pythonType":"str","summary":"Name of the asset you want to check"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Assets.Exists(\"BTC\"))\n    Print(\"1 BTC = {0} {1}\", Assets.GetAsset(\"BTC\").Convert(Account.Asset, 1), Account.Asset.Name);\nelse\n    Print(\"BTC is not available\");","python":"if api.Assets.Exists(\"BTC\"):\n    api.Print(f\"1 BTC = {api.Assets.GetAsset('BTC').Convert(api.Account.Asset, 1)} {api.Account.Asset.Name}\")\nelse:\n    api.Print(\"BTC is not available\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Exists/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Exists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Assets.GetAsset(System.String)","kind":"method","name":"GetAsset","type":"T:cAlgo.API.Assets","namespace":"cAlgo.API","group":"Assets","csharp":"Asset GetAsset(string assetName)","python":"api.Assets.GetAsset(assetName: str) -> Asset","summary":"Gets the asset.","remarks":null,"parameters":[{"name":"assetName","csharpType":"string","pythonType":"str","summary":"Name of the asset you want to get"}],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"Asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gold = Assets.GetAsset(\"XAU\");\nif (gold != null)\n    Print(\"{0} has {1} digits\", gold.Name, gold.Digits);","python":"gold = api.Assets.GetAsset(\"XAU\")\nif gold is not None:\n    api.Print(f\"{gold.Name} has {gold.Digits} digits\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/GetAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/GetAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Assets.GetAssets(System.String[])","kind":"method","name":"GetAssets","type":"T:cAlgo.API.Assets","namespace":"cAlgo.API","group":"Assets","csharp":"Asset[] GetAssets(string[] assetNames)","python":"api.Assets.GetAssets(assetNames: list[str]) -> list[Asset]","summary":"Get multiple assets on a single call.","remarks":null,"parameters":[{"name":"assetNames","csharpType":"string[]","pythonType":"list[str]","summary":"Names of the assets you want to get"}],"returns":{"csharpType":"Asset[]","pythonType":"list[Asset]","summary":"Asset[]","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var asset in Assets.GetAssets(\"EUR\", \"USD\", \"JPY\"))\n    Print(\"100 {0} = {1} {2}\", asset.Name, asset.Convert(Account.Asset, 100), Account.Asset.Name);","python":"for asset in api.Assets.GetAssets(\"EUR\", \"USD\", \"JPY\"):\n    api.Print(f\"100 {asset.Name} = {asset.Convert(api.Account.Asset, 100)} {api.Account.Asset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/GetAssets/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/GetAssets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Assets.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Assets","namespace":"cAlgo.API","group":"Assets","csharp":"int Count {get;}","python":"api.Assets.Count: int","summary":"Gets the total number of the assets.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Available assets: {0}\", Assets.Count);","python":"api.Print(f\"Available assets: {api.Assets.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Assets.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Assets","namespace":"cAlgo.API","group":"Assets","csharp":"string Item {get;}","python":"api.Assets[index: int] -> str","summary":"Gets the desired asset.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Asset index"}],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Assets.Count > 0)\n    Print(\"First asset name: {0}\", Assets[0]);","python":"if api.Assets.Count > 0:\n    api.Print(f\"First asset name: {api.Assets[0]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Assets/Assets/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating","kind":"interface","name":"AverageDirectionalMovementIndexRating","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AverageDirectionalMovementIndexRating","python":"AverageDirectionalMovementIndexRating","summary":"The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX). It's calculated by taking the average of the current ADX and the ADX from one time period before.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nPrint(\"ADXR: {0}, +DI: {1}, -DI: {2}\", adxr.ADXR.Last(1), adxr.DIPlus.Last(1), adxr.DIMinus.Last(1));","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\napi.Print(f\"ADXR: {adxr.ADXR.Last(1)}, +DI: {adxr.DIPlus.Last(1)}, -DI: {adxr.DIMinus.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Average Directional Movement Index Rating indicator\n    public partial class AverageDirectionalMovementIndexRatingSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private AverageDirectionalMovementIndexRating _averageDirectionalMovementIndexRating;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _averageDirectionalMovementIndexRating = Indicators.AverageDirectionalMovementIndexRating(20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_averageDirectionalMovementIndexRating.ADXR.Last(1) < 25) return;\n\n            if (_averageDirectionalMovementIndexRating.DIPlus.Last(1) > _averageDirectionalMovementIndexRating.DIMinus.Last(1) && _averageDirectionalMovementIndexRating.DIPlus.Last(2) <= _averageDirectionalMovementIndexRating.DIMinus.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_averageDirectionalMovementIndexRating.DIPlus.Last(1) < _averageDirectionalMovementIndexRating.DIMinus.Last(1) && _averageDirectionalMovementIndexRating.DIPlus.Last(2) >= _averageDirectionalMovementIndexRating.DIMinus.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AverageDirectionalMovementIndexRatingSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.averageDirectionalMovementIndexRating = api.Indicators.AverageDirectionalMovementIndexRating(20)\n\n    def on_bar_closed(self):\n        if self.averageDirectionalMovementIndexRating.ADXR.Last(0) < 25:\n            return\n\n        if self.averageDirectionalMovementIndexRating.DIPlus.Last(0) > self.averageDirectionalMovementIndexRating.DIMinus.Last(0) and self.averageDirectionalMovementIndexRating.DIPlus.Last(1) <= self.averageDirectionalMovementIndexRating.DIMinus.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.averageDirectionalMovementIndexRating.DIPlus.Last(0) < self.averageDirectionalMovementIndexRating.DIMinus.Last(0) and self.averageDirectionalMovementIndexRating.DIPlus.Last(1) >= self.averageDirectionalMovementIndexRating.DIMinus.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating.ADX","kind":"property","name":"ADX","type":"T:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries ADX {get; set;}","python":"averageDirectionalMovementIndexRating.ADX: IndicatorDataSeries","summary":"The Average Directional Movement Index (ADX) indicates whether the market is trending or ranging.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nif (adxr.ADX.Last(1) > 25)\n    Print(\"The market is trending, ADX: {0}\", adxr.ADX.Last(1));","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\nif adxr.ADX.Last(1) > 25:\n    api.Print(f\"The market is trending, ADX: {adxr.ADX.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/ADX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/ADX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating.ADXR","kind":"property","name":"ADXR","type":"T:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries ADXR {get; set;}","python":"averageDirectionalMovementIndexRating.ADXR: IndicatorDataSeries","summary":"The rating of Average Directional Movement Index (ADX)","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nPrint(\"ADXR: {0}\", adxr.ADXR.Last(1));","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\napi.Print(f\"ADXR: {adxr.ADXR.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/ADXR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/ADXR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating.DIMinus","kind":"property","name":"DIMinus","type":"T:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DIMinus {get; set;}","python":"averageDirectionalMovementIndexRating.DIMinus: IndicatorDataSeries","summary":"The Positive Direction Indicator (+DI) indicates upward trend movement.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nif (adxr.DIMinus.Last(1) > adxr.DIPlus.Last(1))\n    Print(\"-DI is above +DI: {0}\", adxr.DIMinus.Last(1));","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\nif adxr.DIMinus.Last(1) > adxr.DIPlus.Last(1):\n    api.Print(f\"-DI is above +DI: {adxr.DIMinus.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/DIMinus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/DIMinus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating.DIPlus","kind":"property","name":"DIPlus","type":"T:cAlgo.API.Indicators.AverageDirectionalMovementIndexRating","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DIPlus {get; set;}","python":"averageDirectionalMovementIndexRating.DIPlus: IndicatorDataSeries","summary":"The Negative Direction Indicator (-DI) indicates downward trend movement.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nif (adxr.DIPlus.Last(1) > adxr.DIMinus.Last(1))\n    Print(\"+DI is above -DI: {0}\", adxr.DIPlus.Last(1));","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\nif adxr.DIPlus.Last(1) > adxr.DIMinus.Last(1):\n    api.Print(f\"+DI is above -DI: {adxr.DIPlus.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/DIPlus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageDirectionalMovementIndexRating/DIPlus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AverageTrueRange","kind":"interface","name":"AverageTrueRange","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AverageTrueRange","python":"AverageTrueRange","summary":"Average true range. An indicator providing the degree of price volatility.","remarks":"Average true range is a volatility indicator originally developed by J. Welles Wilder. The indicator provides the degree of price volatility. The average true range is an N-day (exponential) moving average of the true range values. Wilder recommended a 14-period smoothing.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private AverageTrueRange averageTrueRange;\n\nprotected override void OnStart()\n{\n    averageTrueRange = Indicators.AverageTrueRange(Periods, MAType);\n}\n\nprotected override void OnTick()\n{\n    // if the 14 day Average True Range is higher than 0.002\n    if(averageTrueRange.Result.LastValue >= ATRValue)\n    {\n        // Do Something\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.averageTrueRange = api.Indicators.AverageTrueRange(api.Periods, api.MAType)\n\n    def on_tick(self):\n        if self.averageTrueRange.Result.LastValue >= api.ATRValue:\n            # Do Something\n            api.Print(\"Average True Range is above the threshold\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    },\n    {\n      \"Name\": \"ATRValue\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.002\n    },\n    {\n      \"Name\": \"MAType\",\n      \"DisplayName\": \"MA Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Exponential\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing System;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use an Average True Range indicator\n    public partial class AverageTrueRangeSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private AverageTrueRange _averageTrueRange;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _averageTrueRange = Indicators.AverageTrueRange(14, MovingAverageType.Exponential);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1) && Bars.ClosePrices.Last(2) < Bars.OpenPrices.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteOrder(TradeType.Buy);\n            }\n            else if (Bars.ClosePrices.Last(1) < Bars.OpenPrices.Last(1) && Bars.ClosePrices.Last(2) > Bars.OpenPrices.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteOrder(TradeType.Sell);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n\n        private void ExecuteOrder(TradeType tradeType)\n        {\n            var atrInPips = _averageTrueRange.Result.Last(1) * (Symbol.TickSize / Symbol.PipSize * Math.Pow(10, Symbol.Digits));\n\n            var stopLossInPips = atrInPips * 2;\n            var takeProfitInPips = stopLossInPips * 2;\n\n            ExecuteMarketOrder(tradeType, SymbolName, _volumeInUnits, Label, stopLossInPips, takeProfitInPips);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AverageTrueRangeSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.averageTrueRange = api.Indicators.AverageTrueRange(14, MovingAverageType.Exponential)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > api.Bars.OpenPrices.Last(0) and api.Bars.ClosePrices.Last(1) < api.Bars.OpenPrices.Last(1):\n            self.close_positions(TradeType.Sell)\n            self.execute_order(TradeType.Buy)\n        elif api.Bars.ClosePrices.Last(0) < api.Bars.OpenPrices.Last(0) and api.Bars.ClosePrices.Last(1) > api.Bars.OpenPrices.Last(1):\n            self.close_positions(TradeType.Buy)\n            self.execute_order(TradeType.Sell)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)\n\n    def execute_order(self, tradeType):\n        atrInPips = self.averageTrueRange.Result.Last(0) * (api.Symbol.TickSize / api.Symbol.PipSize * pow(10, api.Symbol.Digits))\n\n        stopLossInPips = atrInPips * 2\n        takeProfitInPips = stopLossInPips * 2\n\n        api.ExecuteMarketOrder(tradeType, api.SymbolName, self.volumeInUnits, api.Label, stopLossInPips, takeProfitInPips)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageTrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageTrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AverageTrueRange.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.AverageTrueRange","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"averageTrueRange.Result: IndicatorDataSeries","summary":"The resulting data series of Average True Range Indicator instance","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var averageTrueRange = Indicators.AverageTrueRange(14, MovingAverageType.Exponential);\nvar atrInPips = averageTrueRange.Result.Last(1) / Symbol.PipSize;\nPrint(\"ATR of the last closed bar: {0} pips\", atrInPips);","python":"averageTrueRange = api.Indicators.AverageTrueRange(14, MovingAverageType.Exponential)\natrInPips = averageTrueRange.Result.Last(1) / api.Symbol.PipSize\napi.Print(f\"ATR of the last closed bar: {atrInPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageTrueRange/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AverageTrueRange/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.AwesomeOscillator","kind":"interface","name":"AwesomeOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface AwesomeOscillator","python":"AwesomeOscillator","summary":"Displays the market momentum as a histogram.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var awesomeOscillator = Indicators.AwesomeOscillator();\nPrint(\"Awesome Oscillator: {0}\", awesomeOscillator.Result.LastValue);","python":"awesomeOscillator = api.Indicators.AwesomeOscillator()\napi.Print(f\"Awesome Oscillator: {awesomeOscillator.Result.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use an Awesome Oscillator indicator\n    public partial class AwesomeOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private AwesomeOscillator _awesomeOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _awesomeOscillator = Indicators.AwesomeOscillator();\n        }\n\n        protected override void OnBar()\n        {\n            foreach (var position in BotPositions)\n            {\n                if ((position.TradeType == TradeType.Buy && _awesomeOscillator.Result.Last(1) < _awesomeOscillator.Result.Last(2))\n                    || (position.TradeType == TradeType.Sell && _awesomeOscillator.Result.Last(1) > _awesomeOscillator.Result.Last(2)))\n                {\n                    ClosePosition(position);\n                }\n            }\n\n            if (_awesomeOscillator.Result.Last(1) > 0 && _awesomeOscillator.Result.Last(2) <= 0)\n            {\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_awesomeOscillator.Result.Last(1) < 0 && _awesomeOscillator.Result.Last(2) >= 0)\n            {\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass AwesomeOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.awesomeOscillator = api.Indicators.AwesomeOscillator()\n\n    def on_bar_closed(self):\n        for position in self.get_bot_positions():\n            if (position.TradeType == TradeType.Buy and self.awesomeOscillator.Result.Last(0) < self.awesomeOscillator.Result.Last(1)) or (position.TradeType == TradeType.Sell and self.awesomeOscillator.Result.Last(0) > self.awesomeOscillator.Result.Last(1)):\n                api.ClosePosition(position)\n\n        if self.awesomeOscillator.Result.Last(0) > 0 and self.awesomeOscillator.Result.Last(1) <= 0:\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.awesomeOscillator.Result.Last(0) < 0 and self.awesomeOscillator.Result.Last(1) >= 0:\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AwesomeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AwesomeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.AwesomeOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.AwesomeOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"awesomeOscillator.Result: IndicatorDataSeries","summary":"Gets the Awesome Oscillator calculation result.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var awesomeOscillator = Indicators.AwesomeOscillator();\nPrint(\"Last closed bar value: {0}\", awesomeOscillator.Result.Last(1));","python":"awesomeOscillator = api.Indicators.AwesomeOscillator()\napi.Print(f\"Last closed bar value: {awesomeOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/AwesomeOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/AwesomeOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Backtesting","kind":"interface","name":"Backtesting","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public interface Backtesting","python":"Backtesting","summary":"Provides methods and events to manage and monitor backtesting processes.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        private BacktestingProcess _backtestingProcess;\n\n        protected override void OnStart()\n        {\n            if (AlgoRegistry.Get(RobotName, AlgoKind.Robot) is not RobotType robotType)\n            {\n                Print($\"Robot type {RobotName} not found\");\n                return;\n            }\n\n            var backtestingSettings = new BacktestingSettings\n            {\n                StartTimeUtc = StartTime,\n                EndTimeUtc = EndTime,\n                Balance = AccountBalance,\n                DataMode = DataMode,\n                DataFile = DataFilePath,\n                Commission = Commission,\n                CommissionType = CommissionType,\n                ApplyCommissionAutomatically = ApplyCommissionAutomatically,\n                SpreadPips = SpreadPips,\n                PreciseConversion = true\n            };\n\n            _backtestingProcess = Backtesting.Start(robotType, Symbol.Name, TimeFrame, backtestingSettings);\n\n            _backtestingProcess.ProgressChanged += args => Print($\"Bakctesting progress changed: {args.Progress}\");\n            _backtestingProcess.Completed += args => Print($\"Bakctesting completed: {args.JsonReport}\");\n\n            if (_backtestingProcess.IsCompleted)\n                Print($\"Backtesting completed, error: {_backtestingProcess.BacktestingError}\");\n        }\n\n        protected override void OnStop()\n        {\n            _backtestingProcess?.Terminate();\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(api.RobotName, AlgoKind.Robot)\n        if algoType is None:\n            print(f\"Robot type {api.RobotName} not found\")\n            return\n\n        robotType = RobotType(algoType)\n\n        backtestingSettings = BacktestingSettings()\n        backtestingSettings.StartTimeUtc = api.StartTime\n        backtestingSettings.EndTimeUtc = api.EndTime\n        backtestingSettings.Balance = api.AccountBalance\n        backtestingSettings.DataMode = api.DataMode\n        backtestingSettings.DataFile = api.DataFilePath\n        backtestingSettings.Commission = api.Commission\n        backtestingSettings.CommissionType = api.CommissionType\n        backtestingSettings.ApplyCommissionAutomatically = api.ApplyCommissionAutomatically\n        backtestingSettings.SpreadPips = api.SpreadPips\n        backtestingSettings.PreciseConversion = True\n\n        self.backtestingProcess = api.Backtesting.Start(robotType, api.Symbol.Name, api.TimeFrame, backtestingSettings)\n        self.backtestingProcess.ProgressChanged += lambda args: print(f\"Bakctesting progress changed: {args.Progress}\")\n        self.backtestingProcess.Completed += lambda args: print(f\"Bakctesting completed: {args.JsonReport}\")\n\n        if self.backtestingProcess.IsCompleted:\n            print(f\"Backtesting completed, error: {self.backtestingProcess.BacktestingError}\")\n\n    def on_stop(self):\n        if hasattr(self, \"backtestingProcess\") and self.backtestingProcess is not None:\n            self.backtestingProcess.Terminate()","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"RobotName\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample Breakout\"\n    },\n    {\n      \"Name\": \"Symbol\",\n      \"Type\": \"Symbol\",\n      \"DefaultValue\": \"EURUSD\"\n    },\n    {\n      \"Name\": \"TimeFrame\",\n      \"Type\": \"TimeFrame\",\n      \"DefaultValue\": \"Daily\"\n    },\n    {\n      \"Name\": \"StartTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2023-09-01T06:30:00\"\n    },\n    {\n      \"Name\": \"EndTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2025-09-01T06:30:00\"\n    },\n    {\n      \"Name\": \"AccountBalance\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10000\n    },\n    {\n      \"Name\": \"DataMode\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.BacktestingDataMode\",\n      \"DefaultValue\": \"M1\"\n    },\n    {\n      \"Name\": \"DataFilePath\",\n      \"Type\": \"String\"\n    },\n    {\n      \"Name\": \"Commission\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 50\n    },\n    {\n      \"Name\": \"CommissionType\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.SymbolCommissionType\",\n      \"DefaultValue\": \"UsdPerOneLot\"\n    },\n    {\n      \"Name\": \"ApplyCommissionAutomatically\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": false\n    },\n    {\n      \"Name\": \"SpreadPips\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 1\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Backtesting.Start(cAlgo.API.RobotType,System.String,cAlgo.API.TimeFrame,cAlgo.API.BacktestingSettings,System.Object[])","kind":"method","name":"Start","type":"T:cAlgo.API.Backtesting","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingProcess Start(RobotType robotType, string symbolName, TimeFrame timeFrame, BacktestingSettings settings, object[] parameterValues)","python":"api.Backtesting.Start(robotType: RobotType, symbolName: str, timeFrame: TimeFrame, settings: BacktestingSettings, parameterValues: list[object]) -> BacktestingProcess","summary":"Starts the backtesting process.","remarks":null,"parameters":[{"name":"robotType","csharpType":"RobotType","pythonType":"RobotType","summary":"The type of a robot to use for backtesting"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name for which backtesting is performed"},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame for the backtesting"},{"name":"settings","csharpType":"BacktestingSettings","pythonType":"BacktestingSettings","summary":"The settings to configure the backtesting process"},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"Additional parameters for the robot"}],"returns":{"csharpType":"BacktestingProcess","pythonType":"BacktestingProcess","summary":"The backtesting process instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings\n{\n    StartTimeUtc = new DateTime(2025, 1, 1),\n    EndTimeUtc = new DateTime(2025, 2, 1),\n    Balance = 10000,\n    DataMode = BacktestingDataMode.M1\n};\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, 20, 50);\nprocess.Completed += args => Print(\"Backtesting completed, error: {0}\", args.Process.BacktestingError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nsettings.DataMode = BacktestingDataMode.M1\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, 20, 50)\nprocess.Completed += lambda args: api.Print(f\"Backtesting completed, error: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Backtesting.DataSources","kind":"property","name":"DataSources","type":"T:cAlgo.API.Backtesting","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataSources DataSources {get;}","python":"api.Backtesting.DataSources: BacktestingDataSources","summary":"Provides access to backtesting data sources.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSources","pythonType":"BacktestingDataSources","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var dataSource in Backtesting.DataSources)\n    Print(\"Backtesting data source: {0}\", dataSource.Name);","python":"for dataSource in api.Backtesting.DataSources:\n    api.Print(f\"Backtesting data source: {dataSource.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/DataSources/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/DataSources/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Backtesting.Completed","kind":"event","name":"Completed","type":"T:cAlgo.API.Backtesting","namespace":"cAlgo.API","group":"Backtesting","csharp":"event Action<BacktestingCompletedEventArgs> Completed;","python":"api.Backtesting.Completed += handler  # handler(obj: BacktestingCompletedEventArgs)","summary":"Occurs when the backtesting process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingCompletedEventArgs>","pythonType":"Callable[[BacktestingCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    Print(\"Backtesting completed, error: {0}\", args.Process.BacktestingError);\n    if (args.JsonReport != null)\n        Print(\"JSON report length: {0}\", args.JsonReport.Length);\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    api.Print(f\"Backtesting completed, error: {args.Process.BacktestingError}\")\n    if args.JsonReport is not None:\n        api.Print(f\"JSON report length: {len(args.JsonReport)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/Completed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/Completed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Backtesting.ProgressChanged","kind":"event","name":"ProgressChanged","type":"T:cAlgo.API.Backtesting","namespace":"cAlgo.API","group":"Backtesting","csharp":"event Action<BacktestingProgressChangedEventArgs> ProgressChanged;","python":"api.Backtesting.ProgressChanged += handler  # handler(obj: BacktestingProgressChangedEventArgs)","summary":"Occurs when the backtesting progress changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingProgressChangedEventArgs>","pythonType":"Callable[[BacktestingProgressChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.ProgressChanged += OnBacktestingProgressChanged;\n}\n\nprivate void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)\n{\n    Print(\"Backtesting progress: {0:F1}% ({1})\", args.Progress, args.Operation);\n}","python":"def on_start(self):\n    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed\n\ndef on_backtesting_progress_changed(self, args):\n    api.Print(f\"Backtesting progress: {args.Progress:.1f}% ({args.Operation})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/ProgressChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/Backtesting/ProgressChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingBar","kind":"struct","name":"BacktestingBar","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public sealed struct BacktestingBar : ValueType","python":"BacktestingBar","summary":"Represents an OHLCV bar.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var lastBar = MarketData.GetBars(TimeFrame.Minute, \"EURUSD\").LastBar;\nvar bar = new BacktestingBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, (long)lastBar.TickVolume);\nPrint(\"Backtesting bar {0}: O={1} H={2} L={3} C={4} V={5}\", bar.Time, bar.Open, bar.High, bar.Low, bar.Close, bar.Volume);","python":"lastBar = api.MarketData.GetBars(TimeFrame.Minute, \"EURUSD\").LastBar\nbar = BacktestingBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, int(lastBar.TickVolume))\napi.Print(f\"Backtesting bar {bar.Time}: O={bar.Open} H={bar.High} L={bar.Low} C={bar.Close} V={bar.Volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingBar.#ctor(System.DateTime,System.Double,System.Double,System.Double,System.Double,System.Int64)","kind":"constructor","name":"BacktestingBar","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingBar(DateTime Time, double Open, double High, double Low, double Close, long Volume)","python":"BacktestingBar(Time: DateTime, Open: float, High: float, Low: float, Close: float, Volume: int)","summary":"Represents an OHLCV bar.","remarks":null,"parameters":[{"name":"Time","csharpType":"DateTime","pythonType":"DateTime","summary":"Open Time"},{"name":"Open","csharpType":"double","pythonType":"float","summary":"Open Price"},{"name":"High","csharpType":"double","pythonType":"float","summary":"High Price"},{"name":"Low","csharpType":"double","pythonType":"float","summary":"Low Price"},{"name":"Close","csharpType":"double","pythonType":"float","summary":"Close Price"},{"name":"Volume","csharpType":"long","pythonType":"int","summary":"Volume Amount"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var lastBar = MarketData.GetBars(TimeFrame.Minute, \"EURUSD\").LastBar;\nvar bar = new BacktestingBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, (long)lastBar.TickVolume);\nPrint(\"Backtesting bar {0}: O={1} H={2} L={3} C={4} V={5}\", bar.Time, bar.Open, bar.High, bar.Low, bar.Close, bar.Volume);","python":"lastBar = api.MarketData.GetBars(TimeFrame.Minute, \"EURUSD\").LastBar\nbar = BacktestingBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, int(lastBar.TickVolume))\napi.Print(f\"Backtesting bar {bar.Time}: O={bar.Open} H={bar.High} L={bar.Low} C={bar.Close} V={bar.Volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.Close","kind":"property","name":"Close","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public double Close {get; set;}","python":"backtestingBar.Close: float","summary":"Close Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.High","kind":"property","name":"High","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public double High {get; set;}","python":"backtestingBar.High: float","summary":"High Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/High/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/High/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.Low","kind":"property","name":"Low","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public double Low {get; set;}","python":"backtestingBar.Low: float","summary":"Low Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Low/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Low/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.Open","kind":"property","name":"Open","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public double Open {get; set;}","python":"backtestingBar.Open: float","summary":"Open Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Open/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Open/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.Time","kind":"property","name":"Time","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public DateTime Time {get; set;}","python":"backtestingBar.Time: DateTime","summary":"Open Time","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingBar.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.BacktestingBar","namespace":"cAlgo.API","group":"DataSource","csharp":"public long Volume {get; set;}","python":"backtestingBar.Volume: int","summary":"Volume Amount","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBar/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingBarsData","kind":"class","name":"BacktestingBarsData","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public class BacktestingBarsData","python":"BacktestingBarsData","summary":"Represents a collection of backtesting bars data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var bars = MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name);\n    var data = bars.Where(bar => bar.OpenTime >= request.StartTime && bar.OpenTime <= request.EndTime)\n        .Select(bar => new BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume));\n    request.Complete(new BacktestingBarsData(data));\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    bars = api.MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name)\n    data = [BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in bars if bar.OpenTime >= request.StartTime and bar.OpenTime <= request.EndTime]\n    request.Complete(BacktestingBarsData(Array[BacktestingBar](data)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBarsData/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBarsData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingBarsData.#ctor(System.Collections.Generic.IEnumerable{cAlgo.API.BacktestingBar})","kind":"constructor","name":"BacktestingBarsData","type":"T:cAlgo.API.BacktestingBarsData","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingBarsData(IEnumerable<BacktestingBar> data)","python":"BacktestingBarsData(data: Iterable[BacktestingBar])","summary":"Creates a new instance of BacktestingBarsData with passed data.","remarks":null,"parameters":[{"name":"data","csharpType":"IEnumerable<BacktestingBar>","pythonType":"Iterable[BacktestingBar]","summary":"Bars data"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bars = new List<BacktestingBar>\n{\n    new BacktestingBar(new DateTime(2025, 1, 2, 0, 0, 0, DateTimeKind.Utc), 1.0350, 1.0365, 1.0342, 1.0360, 1200),\n    new BacktestingBar(new DateTime(2025, 1, 2, 0, 1, 0, DateTimeKind.Utc), 1.0360, 1.0371, 1.0355, 1.0368, 950)\n};\nvar barsData = new BacktestingBarsData(bars);","python":"from System import Array, DateTime, DateTimeKind\nbars = [\n    BacktestingBar(DateTime(2025, 1, 2, 0, 0, 0, DateTimeKind.Utc), 1.0350, 1.0365, 1.0342, 1.0360, 1200),\n    BacktestingBar(DateTime(2025, 1, 2, 0, 1, 0, DateTimeKind.Utc), 1.0360, 1.0371, 1.0355, 1.0368, 950)\n]\nbarsData = BacktestingBarsData(Array[BacktestingBar](bars))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBarsData/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingBarsData/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingCompletedEventArgs","kind":"class","name":"BacktestingCompletedEventArgs","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public class BacktestingCompletedEventArgs","python":"BacktestingCompletedEventArgs","summary":"Provides data for the backtesting completed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    Print(\"Backtesting completed with error {0}, has HTML report: {1}\", args.Process.BacktestingError, args.HtmlReport != null);\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    api.Print(f\"Backtesting completed with error {args.Process.BacktestingError}, has HTML report: {args.HtmlReport is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingCompletedEventArgs.HtmlReport","kind":"property","name":"HtmlReport","type":"T:cAlgo.API.BacktestingCompletedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public string HtmlReport {get;}","python":"backtestingCompletedEventArgs.HtmlReport: str","summary":"Gets the HTML report of the backtesting results.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    if (args.HtmlReport == null)\n        return;\n    var customFrame = ChartManager.AddCustomFrame(\"Backtesting Report\");\n    var webView = new WebView();\n    webView.Loaded += _ => webView.NavigateToStringAsync(args.HtmlReport);\n    customFrame.Child = webView;\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    if args.HtmlReport is not None:\n        api.Print(f\"HTML report length: {len(args.HtmlReport)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/HtmlReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/HtmlReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingCompletedEventArgs.JsonReport","kind":"property","name":"JsonReport","type":"T:cAlgo.API.BacktestingCompletedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public string JsonReport {get;}","python":"backtestingCompletedEventArgs.JsonReport: str","summary":"Gets the JSON report of the backtesting results.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    if (args.JsonReport != null)\n        Print(\"JSON report: {0}\", args.JsonReport);\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    if args.JsonReport is not None:\n        api.Print(f\"JSON report: {args.JsonReport}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/JsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/JsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingCompletedEventArgs.Process","kind":"property","name":"Process","type":"T:cAlgo.API.BacktestingCompletedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public BacktestingProcess Process {get;}","python":"backtestingCompletedEventArgs.Process: BacktestingProcess","summary":"Gets the backtesting process that has completed.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingProcess","pythonType":"BacktestingProcess","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    Print(\"Process completed: {0}, error: {1}\", args.Process.IsCompleted, args.Process.BacktestingError);\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    api.Print(f\"Process completed: {args.Process.IsCompleted}, error: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/Process/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/Process/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingData","kind":"interface","name":"BacktestingData","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public interface BacktestingData","python":"BacktestingData","summary":"Base type for backtesting data used for backtesting data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    BacktestingData data = request.DataType == BacktestingDataSourceDataType.Tick\n        ? new BacktestingTickData(new[] { new BacktestingTick(request.StartTime, 1.0850, 1.0852) })\n        : new BacktestingBarsData(new[] { new BacktestingBar(request.StartTime, 1.0850, 1.0860, 1.0845, 1.0855, 100) });\n    request.Complete(data);\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    if request.DataType == BacktestingDataSourceDataType.Tick:\n        data = BacktestingTickData(Array[BacktestingTick]([BacktestingTick(request.StartTime, 1.0850, 1.0852)]))\n    else:\n        data = BacktestingBarsData(Array[BacktestingBar]([BacktestingBar(request.StartTime, 1.0850, 1.0860, 1.0845, 1.0855, 100)]))\n    request.Complete(data)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingData/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataMode","kind":"enum","name":"BacktestingDataMode","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public enum BacktestingDataMode","python":"BacktestingDataMode","summary":"Specifies the data mode used for backtesting.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings\n{\n    StartTimeUtc = new DateTime(2025, 1, 1),\n    EndTimeUtc = new DateTime(2025, 1, 15),\n    Balance = 10000,\n    DataMode = BacktestingDataMode.Ticks\n};\nPrint(\"Backtesting data mode: {0}\", settings.DataMode);","python":"settings = BacktestingSettings()\nsettings.Balance = 10000\nsettings.DataMode = BacktestingDataMode.Ticks\napi.Print(f\"Backtesting data mode: {settings.DataMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataMode.Ticks","kind":"enum value","name":"Ticks","type":"T:cAlgo.API.BacktestingDataMode","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataMode.Ticks;","python":"BacktestingDataMode.Ticks","summary":"Tick data mode.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataMode.M1","kind":"enum value","name":"M1","type":"T:cAlgo.API.BacktestingDataMode","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataMode.M1;","python":"BacktestingDataMode.M1","summary":"One-minute data mode.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataMode.M1Csv","kind":"enum value","name":"M1Csv","type":"T:cAlgo.API.BacktestingDataMode","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataMode.M1Csv;","python":"BacktestingDataMode.M1Csv","summary":"One-minute CSV data mode.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataMode.OpenPrices","kind":"enum value","name":"OpenPrices","type":"T:cAlgo.API.BacktestingDataMode","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataMode.OpenPrices;","python":"BacktestingDataMode.OpenPrices","summary":"Open prices data mode.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataMode.TickCsv","kind":"enum value","name":"TickCsv","type":"T:cAlgo.API.BacktestingDataMode","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingDataMode.TickCsv;","python":"BacktestingDataMode.TickCsv","summary":"Tick data from a CSV file.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingDataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataRequest","kind":"interface","name":"BacktestingDataRequest","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public interface BacktestingDataRequest","python":"BacktestingDataRequest","summary":"Represents a backtesting data request for a backtesting data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    Print(\"{0} data requested for {1} from {2} to {3}\", request.DataType, request.PriceDataSourceId.Symbol.Name, request.StartTime, request.EndTime);\n    if (request.DataType != BacktestingDataSourceDataType.Tick)\n    {\n        request.Fail(\"Only tick data is provided by this data source\");\n        return;\n    }\n    var ticks = MarketData.GetTicks(request.PriceDataSourceId.Symbol.Name);\n    var data = ticks.Where(tick => tick.Time >= request.StartTime && tick.Time <= request.EndTime)\n        .Select(tick => new BacktestingTick(tick.Time, tick.Bid, tick.Ask));\n    request.Complete(new BacktestingTickData(data));\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    api.Print(f\"{request.DataType} data requested for {request.PriceDataSourceId.Symbol.Name} from {request.StartTime} to {request.EndTime}\")\n    if request.DataType != BacktestingDataSourceDataType.Tick:\n        request.Fail(\"Only tick data is provided by this data source\")\n        return\n    ticks = api.MarketData.GetTicks(request.PriceDataSourceId.Symbol.Name)\n    data = [BacktestingTick(tick.Time, tick.Bid, tick.Ask) for tick in ticks if tick.Time >= request.StartTime and tick.Time <= request.EndTime]\n    request.Complete(BacktestingTickData(Array[BacktestingTick](data)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataRequest.Complete(cAlgo.API.BacktestingData)","kind":"method","name":"Complete","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"void Complete(BacktestingData data)","python":"backtestingDataRequest.Complete(data: BacktestingData) -> None","summary":"Completes current request.","remarks":null,"parameters":[{"name":"data","csharpType":"BacktestingData","pythonType":"BacktestingData","summary":"Data."}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var bars = MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name);\n    var data = bars.Where(bar => bar.OpenTime >= request.StartTime && bar.OpenTime <= request.EndTime)\n        .Select(bar => new BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume));\n    request.Complete(new BacktestingBarsData(data));\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    bars = api.MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name)\n    data = [BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in bars if bar.OpenTime >= request.StartTime and bar.OpenTime <= request.EndTime]\n    request.Complete(BacktestingBarsData(Array[BacktestingBar](data)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Complete/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Complete/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataRequest.Fail(System.String)","kind":"method","name":"Fail","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"void Fail(string errorMessage)","python":"backtestingDataRequest.Fail(errorMessage: str) -> None","summary":"Notifies current request failure if something went wrong.","remarks":null,"parameters":[{"name":"errorMessage","csharpType":"string","pythonType":"str","summary":"Error message."}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    if (request.PriceDataSourceId.Symbol.Name != \"EURUSD\")\n    {\n        request.Fail($\"Symbol {request.PriceDataSourceId.Symbol.Name} is not supported\");\n        return;\n    }\n    request.Complete(new BacktestingBarsData(Array.Empty<BacktestingBar>()));\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    if request.PriceDataSourceId.Symbol.Name != \"EURUSD\":\n        request.Fail(f\"Symbol {request.PriceDataSourceId.Symbol.Name} is not supported\")\n        return\n    request.Complete(BacktestingBarsData(Array[BacktestingBar]([])))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Fail/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Fail/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequest.DataType","kind":"property","name":"DataType","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataSourceDataType DataType {get;}","python":"backtestingDataRequest.DataType: BacktestingDataSourceDataType","summary":"Gets request data type.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    if (request.DataType == BacktestingDataSourceDataType.Tick)\n        Print(\"Tick data requested\");\n    else\n        Print(\"Bar data requested: {0}\", request.DataType);\n}","python":"def on_data_requested(self, request):\n    if request.DataType == BacktestingDataSourceDataType.Tick:\n        api.Print(\"Tick data requested\")\n    else:\n        api.Print(f\"Bar data requested: {request.DataType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/DataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/DataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequest.EndTime","kind":"property","name":"EndTime","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"DateTime EndTime {get;}","python":"backtestingDataRequest.EndTime: DateTime","summary":"Gets request end time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var period = request.EndTime - request.StartTime;\n    Print(\"Data requested until {0:u}, period: {1} days\", request.EndTime, period.TotalDays);\n}","python":"def on_data_requested(self, request):\n    period = request.EndTime - request.StartTime\n    api.Print(f\"Data requested until {request.EndTime}, period: {period.TotalDays} days\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/EndTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/EndTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequest.PriceDataSourceId","kind":"property","name":"PriceDataSourceId","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"PriceDataSourceId PriceDataSourceId {get;}","python":"backtestingDataRequest.PriceDataSourceId: PriceDataSourceId","summary":"Gets request price data source Id (Symbol and TimeFrame).","remarks":null,"parameters":[],"returns":{"csharpType":"PriceDataSourceId","pythonType":"PriceDataSourceId","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var symbol = request.PriceDataSourceId.Symbol;\n    var timeFrame = request.PriceDataSourceId.TimeFrame;\n    Print(\"Data requested for {0} {1}\", symbol.Name, timeFrame);\n}","python":"def on_data_requested(self, request):\n    symbol = request.PriceDataSourceId.Symbol\n    timeFrame = request.PriceDataSourceId.TimeFrame\n    api.Print(f\"Data requested for {symbol.Name} {timeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/PriceDataSourceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/PriceDataSourceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequest.StartTime","kind":"property","name":"StartTime","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"DateTime StartTime {get;}","python":"backtestingDataRequest.StartTime: DateTime","summary":"Gets request start time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    Print(\"Data requested starting from {0:u}\", request.StartTime);\n}","python":"def on_data_requested(self, request):\n    api.Print(f\"Data requested starting from {request.StartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/StartTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/StartTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequest.Status","kind":"property","name":"Status","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataRequestStatus Status {get;}","python":"backtestingDataRequest.Status: BacktestingDataRequestStatus","summary":"Gets current status of request.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequestStatus","pythonType":"BacktestingDataRequestStatus","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    request.Fail(\"No data available\");\n    Print(\"Request status: {0}\", request.Status);\n}","python":"def on_data_requested(self, request):\n    request.Fail(\"No data available\")\n    api.Print(f\"Request status: {request.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Status/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/Status/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.BacktestingDataRequest.StatusChanged","kind":"event","name":"StatusChanged","type":"T:cAlgo.API.BacktestingDataRequest","namespace":"cAlgo.API","group":"DataSource","csharp":"event Action<BacktestingDataRequestStatusChangedEventArgs> StatusChanged;","python":"backtestingDataRequest.StatusChanged += handler  # handler(obj: BacktestingDataRequestStatusChangedEventArgs)","summary":"Occurs when request status is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingDataRequestStatusChangedEventArgs>","pythonType":"Callable[[BacktestingDataRequestStatusChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    request.StatusChanged += OnRequestStatusChanged;\n}\n\nprivate void OnRequestStatusChanged(BacktestingDataRequestStatusChangedEventArgs args)\n{\n    Print(\"Request for {0} status changed to {1}\", args.DataRequest.PriceDataSourceId.Symbol.Name, args.DataRequest.Status);\n}","python":"def on_data_requested(self, request):\n    request.StatusChanged += self.on_request_status_changed\n\ndef on_request_status_changed(self, args):\n    api.Print(f\"Request for {args.DataRequest.PriceDataSourceId.Symbol.Name} status changed to {args.DataRequest.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/StatusChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequest/StatusChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataRequestStatus","kind":"enum","name":"BacktestingDataRequestStatus","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public enum BacktestingDataRequestStatus","python":"BacktestingDataRequestStatus","summary":"Specifies the different status of a backtesting data request.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    request.StatusChanged += args =>\n    {\n        if (args.DataRequest.Status == BacktestingDataRequestStatus.Cancelled)\n            Print(\"Data request for {0} was cancelled\", args.DataRequest.PriceDataSourceId.Symbol.Name);\n    };\n}","python":"def on_data_requested(self, request):\n    request.StatusChanged += self.on_request_status_changed\n\ndef on_request_status_changed(self, args):\n    if args.DataRequest.Status == BacktestingDataRequestStatus.Cancelled:\n        api.Print(f\"Data request for {args.DataRequest.PriceDataSourceId.Symbol.Name} was cancelled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataRequestStatus.InProgress","kind":"enum value","name":"InProgress","type":"T:cAlgo.API.BacktestingDataRequestStatus","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataRequestStatus.InProgress;","python":"BacktestingDataRequestStatus.InProgress","summary":"Request is in progress.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequestStatus","pythonType":"BacktestingDataRequestStatus","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataRequestStatus.Failed","kind":"enum value","name":"Failed","type":"T:cAlgo.API.BacktestingDataRequestStatus","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataRequestStatus.Failed;","python":"BacktestingDataRequestStatus.Failed","summary":"Request is failed by plugin.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequestStatus","pythonType":"BacktestingDataRequestStatus","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataRequestStatus.Completed","kind":"enum value","name":"Completed","type":"T:cAlgo.API.BacktestingDataRequestStatus","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataRequestStatus.Completed;","python":"BacktestingDataRequestStatus.Completed","summary":"Request is completed by plugin.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequestStatus","pythonType":"BacktestingDataRequestStatus","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataRequestStatus.Cancelled","kind":"enum value","name":"Cancelled","type":"T:cAlgo.API.BacktestingDataRequestStatus","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataRequestStatus.Cancelled;","python":"BacktestingDataRequestStatus.Cancelled","summary":"Request is cancelled.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequestStatus","pythonType":"BacktestingDataRequestStatus","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataRequestStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataRequestStatusChangedEventArgs","kind":"class","name":"BacktestingDataRequestStatusChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class BacktestingDataRequestStatusChangedEventArgs","python":"BacktestingDataRequestStatusChangedEventArgs","summary":"Provides data for the backtesting data request status changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.M1OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n    Backtesting.DataSources.Add(\"My Data Source\", options);\n}\n\nprivate BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    return new BacktestingMinMaxTime(Server.Time.AddYears(-1), Server.Time);\n}\n\nprivate void OnDataRequested(BacktestingDataRequest request)\n{\n    request.StatusChanged += OnDataRequestStatusChanged;\n    request.Fail(\"No data available for the requested period\");\n}\n\nprivate void OnDataRequestStatusChanged(BacktestingDataRequestStatusChangedEventArgs args)\n{\n    Print(\"Data request {0} status changed to {1}\", args.DataRequest.PriceDataSourceId, args.DataRequest.Status);\n}","python":"from System import Action, Func\n\ndef on_start(self):\n    options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.M1OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n    api.Backtesting.DataSources.Add(\"My Data Source\", options)\n\ndef on_min_max_time_requested(self, args):\n    return BacktestingMinMaxTime(api.Server.Time.AddYears(-1), api.Server.Time)\n\ndef on_data_requested(self, request):\n    request.StatusChanged += self.on_data_request_status_changed\n    request.Fail(\"No data available for the requested period\")\n\ndef on_data_request_status_changed(self, args):\n    api.Print(f\"Data request {args.DataRequest.PriceDataSourceId} status changed to {args.DataRequest.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BacktestingDataRequestStatusChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BacktestingDataRequestStatusChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataRequestStatusChangedEventArgs.DataRequest","kind":"property","name":"DataRequest","type":"T:cAlgo.API.BacktestingDataRequestStatusChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public BacktestingDataRequest DataRequest {get;}","python":"backtestingDataRequestStatusChangedEventArgs.DataRequest: BacktestingDataRequest","summary":"Gets data request.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataRequest","pythonType":"BacktestingDataRequest","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.M1OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n    Backtesting.DataSources.Add(\"My Data Source\", options);\n}\n\nprivate BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    return new BacktestingMinMaxTime(Server.Time.AddYears(-1), Server.Time);\n}\n\nprivate void OnDataRequested(BacktestingDataRequest request)\n{\n    request.StatusChanged += OnDataRequestStatusChanged;\n}\n\nprivate void OnDataRequestStatusChanged(BacktestingDataRequestStatusChangedEventArgs args)\n{\n    var request = args.DataRequest;\n    Print(\"{0} request from {1} to {2} is now {3}\", request.DataType, request.StartTime, request.EndTime, request.Status);\n}","python":"from System import Action, Func\n\ndef on_start(self):\n    options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.M1OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n    api.Backtesting.DataSources.Add(\"My Data Source\", options)\n\ndef on_min_max_time_requested(self, args):\n    return BacktestingMinMaxTime(api.Server.Time.AddYears(-1), api.Server.Time)\n\ndef on_data_requested(self, request):\n    request.StatusChanged += self.on_data_request_status_changed\n\ndef on_data_request_status_changed(self, args):\n    request = args.DataRequest\n    api.Print(f\"{request.DataType} request from {request.StartTime} to {request.EndTime} is now {request.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BacktestingDataRequestStatusChangedEventArgs/DataRequest/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BacktestingDataRequestStatusChangedEventArgs/DataRequest/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataSource","kind":"interface","name":"BacktestingDataSource","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public interface BacktestingDataSource","python":"BacktestingDataSource","summary":"Represents a backtesting data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var dataSource in Backtesting.DataSources)\n    Print(\"Data source {0}, only own custom time frames: {1}\", dataSource.Name, dataSource.SupportOnlyOwnCustomTimeFrames);","python":"for dataSource in api.Backtesting.DataSources:\n    api.Print(f\"Data source {dataSource.Name}, only own custom time frames: {dataSource.SupportOnlyOwnCustomTimeFrames}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSource.ClearCache","kind":"method","name":"ClearCache","type":"T:cAlgo.API.BacktestingDataSource","namespace":"cAlgo.API","group":"DataSource","csharp":"bool ClearCache()","python":"backtestingDataSource.ClearCache() -> bool","summary":"Clears cached price data of current data source if not being used.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise False.","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var dataSource in Backtesting.DataSources)\n    Print(\"Cache of {0} cleared: {1}\", dataSource.Name, dataSource.ClearCache());","python":"for dataSource in api.Backtesting.DataSources:\n    api.Print(f\"Cache of {dataSource.Name} cleared: {dataSource.ClearCache()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/ClearCache/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/ClearCache/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSource.Name","kind":"property","name":"Name","type":"T:cAlgo.API.BacktestingDataSource","namespace":"cAlgo.API","group":"DataSource","csharp":"string Name {get;}","python":"backtestingDataSource.Name: str","summary":"Gets unique name of backtesting data source.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var dataSource in Backtesting.DataSources)\n    Print(\"Data source name: {0}\", dataSource.Name);","python":"for dataSource in api.Backtesting.DataSources:\n    api.Print(f\"Data source name: {dataSource.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSource.SupportOnlyOwnCustomTimeFrames","kind":"property","name":"SupportOnlyOwnCustomTimeFrames","type":"T:cAlgo.API.BacktestingDataSource","namespace":"cAlgo.API","group":"DataSource","csharp":"bool SupportOnlyOwnCustomTimeFrames {get; set;}","python":"backtestingDataSource.SupportOnlyOwnCustomTimeFrames: bool","summary":"Gets / sets if current backtesting data source can be used only for owner plugin custom TimeFrames or for both owner plugin custom TimeFrames and built-in TimeFrames. If True current source will only appear if backtesting TimeFrame is owner plugin created custom TimeFrame.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var dataSource = Backtesting.DataSources.FirstOrDefault(source => source.Name == \"My Data\");\nif (dataSource != null)\n    dataSource.SupportOnlyOwnCustomTimeFrames = true;","python":"for dataSource in api.Backtesting.DataSources:\n    if dataSource.Name == \"My Data\":\n        dataSource.SupportOnlyOwnCustomTimeFrames = True"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/SupportOnlyOwnCustomTimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSource/SupportOnlyOwnCustomTimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataSourceDataType","kind":"enum","name":"BacktestingDataSourceDataType","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public enum BacktestingDataSourceDataType","python":"BacktestingDataSourceDataType","summary":"Specifies the different data types for backtesting data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var supportedDataTypes = BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices;\nPrint(\"Supports ticks: {0}\", supportedDataTypes.HasFlag(BacktestingDataSourceDataType.Tick));","python":"supportedDataTypes = BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices\napi.Print(f\"Supports ticks: {supportedDataTypes.HasFlag(BacktestingDataSourceDataType.Tick)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataSourceDataType.Tick","kind":"enum value","name":"Tick","type":"T:cAlgo.API.BacktestingDataSourceDataType","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataSourceDataType.Tick;","python":"BacktestingDataSourceDataType.Tick","summary":"Tick data type.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataSourceDataType.M1OpenPrices","kind":"enum value","name":"M1OpenPrices","type":"T:cAlgo.API.BacktestingDataSourceDataType","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataSourceDataType.M1OpenPrices;","python":"BacktestingDataSourceDataType.M1OpenPrices","summary":"Minute OHLCV open prices.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingDataSourceDataType.OpenPrices","kind":"enum value","name":"OpenPrices","type":"T:cAlgo.API.BacktestingDataSourceDataType","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataSourceDataType.OpenPrices;","python":"BacktestingDataSourceDataType.OpenPrices","summary":"TimeFrame OHLCV open prices.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceDataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs","kind":"class","name":"BacktestingDataSourceMinMaxTimeArgs","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public class BacktestingDataSourceMinMaxTimeArgs","python":"BacktestingDataSourceMinMaxTimeArgs","summary":"Provides data for the backtesting data source min / max time handler.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    Print(\"Min/max time requested for {0} {1}, data type {2}\", args.PriceDataSourceId.Symbol.Name, args.PriceDataSourceId.TimeFrame, args.DataType);\n    return new BacktestingMinMaxTime(Server.Time.AddYears(-1), Server.Time);\n}","python":"def on_min_max_time_requested(self, args):\n    api.Print(f\"Min/max time requested for {args.PriceDataSourceId.Symbol.Name} {args.PriceDataSourceId.TimeFrame}, data type {args.DataType}\")\n    return BacktestingMinMaxTime(api.Server.Time.AddYears(-1), api.Server.Time)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs.DataType","kind":"property","name":"DataType","type":"T:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingDataSourceDataType DataType {get;}","python":"backtestingDataSourceMinMaxTimeArgs.DataType: BacktestingDataSourceDataType","summary":"Gets data type for the min / max time request.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    var days = args.DataType == BacktestingDataSourceDataType.Tick ? 30 : 365;\n    return new BacktestingMinMaxTime(Server.Time.AddDays(-days), Server.Time);\n}","python":"def on_min_max_time_requested(self, args):\n    days = 30 if args.DataType == BacktestingDataSourceDataType.Tick else 365\n    return BacktestingMinMaxTime(api.Server.Time.AddDays(-days), api.Server.Time)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/DataType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/DataType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs.PriceDataSourceId","kind":"property","name":"PriceDataSourceId","type":"T:cAlgo.API.BacktestingDataSourceMinMaxTimeArgs","namespace":"cAlgo.API","group":"DataSource","csharp":"public PriceDataSourceId PriceDataSourceId {get;}","python":"backtestingDataSourceMinMaxTimeArgs.PriceDataSourceId: PriceDataSourceId","summary":"Gets price data source Id for the min / max time request.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceDataSourceId","pythonType":"PriceDataSourceId","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    var bars = MarketData.GetBars(args.PriceDataSourceId.TimeFrame, args.PriceDataSourceId.Symbol.Name);\n    return new BacktestingMinMaxTime(bars[0].OpenTime, bars.LastBar.OpenTime);\n}","python":"def on_min_max_time_requested(self, args):\n    bars = api.MarketData.GetBars(args.PriceDataSourceId.TimeFrame, args.PriceDataSourceId.Symbol.Name)\n    return BacktestingMinMaxTime(bars[0].OpenTime, bars.LastBar.OpenTime)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/PriceDataSourceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceMinMaxTimeArgs/PriceDataSourceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataSourceOptions","kind":"record","name":"BacktestingDataSourceOptions","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public class BacktestingDataSourceOptions","python":"BacktestingDataSourceOptions","summary":"Represents options of a backtesting data source, used for creating new data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n    Backtesting.DataSources.Add(\"My Data\", options);\n    Print(\"Supported data types: {0}\", options.SupportedDataTypes);\n}\n\nprivate BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args) => new(Server.Time.AddMonths(-6), Server.Time);\n\nprivate void OnDataRequested(BacktestingDataRequest request) => request.Fail(\"Data is not available yet\");","python":"from System import Action, Func\n\ndef on_start(self):\n    options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n    api.Backtesting.DataSources.Add(\"My Data\", options)\n    api.Print(f\"Supported data types: {options.SupportedDataTypes}\")\n\ndef on_min_max_time_requested(self, args):\n    return BacktestingMinMaxTime(api.Server.Time.AddMonths(-6), api.Server.Time)\n\ndef on_data_requested(self, request):\n    request.Fail(\"Data is not available yet\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSourceOptions.#ctor(cAlgo.API.BacktestingDataSourceDataType,System.Func{cAlgo.API.BacktestingDataSourceMinMaxTimeArgs,cAlgo.API.BacktestingMinMaxTime},System.Action{cAlgo.API.BacktestingDataRequest})","kind":"constructor","name":"BacktestingDataSourceOptions","type":"T:cAlgo.API.BacktestingDataSourceOptions","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingDataSourceOptions(BacktestingDataSourceDataType SupportedDataTypes, Func<BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime> MinMaxTimeHandler, Action<BacktestingDataRequest> DataRequestHandler)","python":"BacktestingDataSourceOptions(SupportedDataTypes: BacktestingDataSourceDataType, MinMaxTimeHandler: Callable[[BacktestingDataSourceMinMaxTimeArgs], BacktestingMinMaxTime], DataRequestHandler: Callable[[BacktestingDataRequest], None])","summary":"Represents options of a backtesting data source, used for creating new data source.","remarks":null,"parameters":[{"name":"SupportedDataTypes","csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"Supported data types (ex: BacktestingDataSourceDateType.Tick | BacktestingDataSourceDateType.M1OpenPrices)"},{"name":"MinMaxTimeHandler","csharpType":"Func<BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime>","pythonType":"Callable[[BacktestingDataSourceMinMaxTimeArgs], BacktestingMinMaxTime]","summary":"Handler function for getting minimum and maximum time."},{"name":"DataRequestHandler","csharpType":"Action<BacktestingDataRequest>","pythonType":"Callable[[BacktestingDataRequest], None]","summary":"Handler function for handling data requests."}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n    Backtesting.DataSources.Add(\"My Data\", options);\n    Print(\"Supported data types: {0}\", options.SupportedDataTypes);\n}\n\nprivate BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args) => new(Server.Time.AddMonths(-6), Server.Time);\n\nprivate void OnDataRequested(BacktestingDataRequest request) => request.Fail(\"Data is not available yet\");","python":"from System import Action, Func\n\ndef on_start(self):\n    options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n    api.Backtesting.DataSources.Add(\"My Data\", options)\n    api.Print(f\"Supported data types: {options.SupportedDataTypes}\")\n\ndef on_min_max_time_requested(self, args):\n    return BacktestingMinMaxTime(api.Server.Time.AddMonths(-6), api.Server.Time)\n\ndef on_data_requested(self, request):\n    request.Fail(\"Data is not available yet\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSourceOptions.#ctor(cAlgo.API.BacktestingDataSourceOptions)","kind":"constructor","name":"BacktestingDataSourceOptions","type":"T:cAlgo.API.BacktestingDataSourceOptions","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingDataSourceOptions(BacktestingDataSourceOptions original)","python":"BacktestingDataSourceOptions(original: BacktestingDataSourceOptions)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"BacktestingDataSourceOptions","pythonType":"BacktestingDataSourceOptions","summary":""}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSourceOptions.DataRequestHandler","kind":"property","name":"DataRequestHandler","type":"T:cAlgo.API.BacktestingDataSourceOptions","namespace":"cAlgo.API","group":"DataSource","csharp":"public Action<BacktestingDataRequest> DataRequestHandler {get; set;}","python":"backtestingDataSourceOptions.DataRequestHandler: Callable[[BacktestingDataRequest], None]","summary":"Handler function for handling data requests.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingDataRequest>","pythonType":"Callable[[BacktestingDataRequest], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/DataRequestHandler/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/DataRequestHandler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSourceOptions.MinMaxTimeHandler","kind":"property","name":"MinMaxTimeHandler","type":"T:cAlgo.API.BacktestingDataSourceOptions","namespace":"cAlgo.API","group":"DataSource","csharp":"public Func<BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime> MinMaxTimeHandler {get; set;}","python":"backtestingDataSourceOptions.MinMaxTimeHandler: Callable[[BacktestingDataSourceMinMaxTimeArgs], BacktestingMinMaxTime]","summary":"Handler function for getting minimum and maximum time.","remarks":null,"parameters":[],"returns":{"csharpType":"Func<BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime>","pythonType":"Callable[[BacktestingDataSourceMinMaxTimeArgs], BacktestingMinMaxTime]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/MinMaxTimeHandler/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/MinMaxTimeHandler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingDataSourceOptions.SupportedDataTypes","kind":"property","name":"SupportedDataTypes","type":"T:cAlgo.API.BacktestingDataSourceOptions","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingDataSourceDataType SupportedDataTypes {get; set;}","python":"backtestingDataSourceOptions.SupportedDataTypes: BacktestingDataSourceDataType","summary":"Supported data types (ex: BacktestingDataSourceDateType.Tick | BacktestingDataSourceDateType.M1OpenPrices)","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataSourceDataType","pythonType":"BacktestingDataSourceDataType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/SupportedDataTypes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSourceOptions/SupportedDataTypes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingDataSources","kind":"interface","name":"BacktestingDataSources","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public interface BacktestingDataSources","python":"BacktestingDataSources","summary":"Provides access to backtesting data sources.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing cAlgo.API.Internals;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class CustomDataSourceTest : Plugin\n{\n    private BacktestingDataSource _dataSource;\n\n    protected override void OnStart()\n    {\n        var addCustomDataSource = new Button { Text = \"Add Custom Data Source\" };\n\n        addCustomDataSource.Click += OnAddCustomDataSourceClick;\n\n        var removeCustomDataSource = new Button { Text = \"Remove Custom Data Source\" };\n\n        removeCustomDataSource.Click += OnRemoveCustomDataSourceClick;\n\n        var panel = new StackPanel();\n\n        panel.AddChild(addCustomDataSource);\n        panel.AddChild(removeCustomDataSource);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"Custom Data Source Test\");\n\n        aspBlock.Child = panel;\n    }\n\n    private void OnRemoveCustomDataSourceClick(ButtonClickEventArgs obj)\n    {\n        Backtesting.DataSources.Remove(_dataSource);\n    }\n\n    private void OnAddCustomDataSourceClick(ButtonClickEventArgs obj)\n    {\n        var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices | BacktestingDataSourceDataType.OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n\n        _dataSource = Backtesting.DataSources.Add(\"Test\", options);\n    }\n\n    private void OnDataRequested(BacktestingDataRequest request)\n    {\n        request.StatusChanged += OnRequestStatusChanged;\n        Print($\"Data Request from {request.StartTime} to {request.EndTime}\");\n\n        switch (request.DataType)\n        {\n            case BacktestingDataSourceDataType.Tick:\n                var ticks = GetAllTicksTill(request.PriceDataSourceId.Symbol.Name, request.EndTime);\n                var tickData = ticks.Where(b => b.Time >= request.StartTime && b.Time <= request.EndTime).Select(t => new BacktestingTick(t.Time, t.Bid, t.Ask)).ToArray();\n                Print($\"Sending {tickData.Length} ticks.\");\n\n                request.Complete(new BacktestingTickData(tickData));\n                break;\n            case BacktestingDataSourceDataType.M1OpenPrices:\n                var minuteBars = GetAllBars(TimeFrame.Minute, request.PriceDataSourceId.Symbol.Name);\n                var minuteData = minuteBars\n                    .Where(b => b.OpenTime >= request.StartTime && b.OpenTime <= request.EndTime).Select(t =>\n                        new BacktestingBar(t.OpenTime, t.Open, t.High, t.Low, t.Close, (long)t.TickVolume)).ToArray();\n\n                Print($\"Sending {minuteData.Length} minute bars.\");\n\n                request.Complete(new BacktestingBarsData(minuteData));\n                break;\n            case BacktestingDataSourceDataType.OpenPrices:\n                var bars = GetAllBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name);\n                var barsData = bars\n                    .Where(b => b.OpenTime >= request.StartTime && b.OpenTime <= request.EndTime).Select(t =>\n                        new BacktestingBar(t.OpenTime, t.Open, t.High, t.Low, t.Close, (long)t.TickVolume)).ToArray();\n\n                Print($\"Sending {barsData.Length} bars.\");\n\n                request.Complete(new BacktestingBarsData(barsData));\n                break;\n            default:\n                request.Fail($\"Data type '{request.DataType}' not supported.\");\n                break;\n        }\n    }\n\n    private void OnRequestStatusChanged(BacktestingDataRequestStatusChangedEventArgs args)\n    {\n        Print($\"Request '{args.DataRequest.PriceDataSourceId}' status changed: {args.DataRequest.Status}\");\n    }\n\n    private Bars GetAllBars(TimeFrame timeFrame, string symbolName)\n    {\n        var bars = MarketData.GetBars(timeFrame, symbolName);\n\n        while (bars.LoadMoreHistory() > 0)\n        {\n        }\n\n        Print($\"Bars loaded, count: {bars.Count}\");\n\n        return bars;\n    }\n\n    private Ticks GetAllTicksTill(string symbolName, DateTime tillTime)\n    {\n        var ticks = MarketData.GetTicks(symbolName);\n\n        while (ticks.LoadMoreHistory() > 0 && ticks[0].Time >= tillTime)\n        {\n        }\n\n        Print($\"Ticks loaded, count: {ticks.Count}\");\n\n        return ticks;\n    }\n\n    private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n    {\n        return new BacktestingMinMaxTime(Server.Time.AddYears(-2), Server.Time);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, Func, Array\n\nclass Test():\n    def on_start(self):\n        self.dataSource = None\n        addCustomDataSource = Button()\n        addCustomDataSource.Text = \"Add Custom Data Source\"\n        addCustomDataSource.Click += self.on_add_custom_data_source_click\n\n        removeCustomDataSource = Button()\n        removeCustomDataSource.Text = \"Remove Custom Data Source\"\n        removeCustomDataSource.Click += self.on_remove_custom_data_source_click\n\n        panel = StackPanel()\n        panel.AddChild(addCustomDataSource)\n        panel.AddChild(removeCustomDataSource)\n\n        aspBlock = api.Asp.SymbolTab.AddBlock(\"Custom Data Source Test\")\n        aspBlock.Child = panel\n\n    def on_add_custom_data_source_click(self, args):\n        options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices | BacktestingDataSourceDataType.OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n        self.dataSource = api.Backtesting.DataSources.Add(\"Test\", options)\n\n    def on_remove_custom_data_source_click(self, args):\n        if self.dataSource is not None:\n            api.Backtesting.DataSources.Remove(self.dataSource)\n\n    def on_min_max_time_requested(self, args):\n        return BacktestingMinMaxTime(api.Server.Time.AddYears(-2), api.Server.Time)\n\n    def on_data_requested(self, request):\n        request.StatusChanged += self.on_request_status_changed\n\n        print(f\"Data Request from {request.StartTime} to {request.EndTime}\")\n\n        match request.DataType:\n            case BacktestingDataSourceDataType.Tick:\n                ticks = self.get_all_ticks(request.PriceDataSourceId.Symbol.Name, request.EndTime)\n                tickData = self.to_array([BacktestingTick(t.Time, t.Bid, t.Ask) for t in ticks if t.Time >= request.StartTime and t.Time <= request.EndTime], BacktestingTick)\n                print(f\"Sending {len(tickData)} ticks.\")\n                request.Complete(BacktestingTickData(tickData))\n            case BacktestingDataSourceDataType.M1OpenPrices:\n                minuteBars = self.get_all_bars(TimeFrame.Minute, request.PriceDataSourceId.Symbol.Name)\n                minuteData = self.to_array([BacktestingBar(b.OpenTime, b.Open, b.High, b.Low, b.Close, b.TickVolume) for b in minuteBars if b.OpenTime >= request.StartTime and b.OpenTime <= request.EndTime], BacktestingBar)\n                print(f\"Sending {len(minuteData)} minute bars.\")\n                request.Complete(BacktestingBarsData(minuteData))\n            case BacktestingDataSourceDataType.OpenPrices:\n                bars = self.get_all_bars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name)\n                barsData = self.to_array([BacktestingBar(b.OpenTime, b.Open, b.High, b.Low, b.Close, b.TickVolume) for b in bars if b.OpenTime >= request.StartTime and b.OpenTime <= request.EndTime], BacktestingBar)\n\n                print(f\"Sending {len(barsData)} bars.\")\n\n                request.Complete(BacktestingBarsData(barsData))\n            case _:\n                request.Fail(f\"Data type '{request.DataType}' not supported.\")\n\n    def on_request_status_changed(self, args):\n        print(f\"Request '{args.DataRequest.PriceDataSourceId}' status changed: {args.DataRequest.Status}\")\n\n    def get_all_ticks(self, symbolName, tillTime):\n        ticks = api.MarketData.GetTicks(symbolName)\n\n        while ticks.LastTick.Time < tillTime and ticks.LoadMoreHistory() > 0:\n            pass\n\n        print(f\"Ticks loaded, count: {ticks.Count}\")\n        return ticks\n\n    def get_all_bars(self, timeFrame, symbolName):\n        bars = api.MarketData.GetBars(timeFrame, symbolName)\n        while bars.LoadMoreHistory() > 0:\n            pass\n\n        print(f\"Bars loaded, count: {bars.Count}\")\n        return bars\n\n    def to_array(self, iterable, itemType):\n        length = len(iterable)\n        array = Array[itemType](length)\n        for i in range(length):\n            array[i] = iterable[i]\n\n        return array","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Reflection;\nusing cAlgo.API;\nusing cAlgo.API.Internals;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class CustomDataSourceCSVTest : Plugin\n{\n    private BacktestingDataSource _dataSource;\n    private TextBox _symbolNameTextBox;\n    private ComboBox _timeFrameCombobox;\n    private string _selectedFilePath;\n\n    private readonly Dictionary<DataId, Data> _addedData = new();\n    private readonly Dictionary<DataId, Dictionary<DateOnly, List<BacktestingTick>>> _cachedTickData = new();\n    private readonly Dictionary<DataId, List<BacktestingBar>> _cachedBarData = new();\n\n    private StackPanel _panel;\n    private Button _selectFileButton;\n\n    private CustomTimeFrame _customTimeFrame;\n\n    protected override void OnStart()\n    {\n        LoadFromLocalStorage();\n\n        var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.Tick | BacktestingDataSourceDataType.M1OpenPrices | BacktestingDataSourceDataType.OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n\n        _dataSource = Backtesting.DataSources.Add(\"CSV\", options);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"Custom Data Source CSV Test\");\n\n        aspBlock.Child = GetAddDataPanel();\n        aspBlock.Height = 400;\n    }\n\n    private Panel GetAddDataPanel()\n    {\n        _panel = new StackPanel() { Orientation = Orientation.Vertical, Margin = 3 };\n\n        _symbolNameTextBox = new TextBox() { Text = \"Enter Symbol Name\", Margin = 3 };\n\n        _panel.AddChild(_symbolNameTextBox);\n\n        _timeFrameCombobox = new ComboBox() { Margin = 3, Padding = 2 };\n\n        foreach (var timeFrame in GetTimeFrames())\n        {\n            _timeFrameCombobox.AddItem(timeFrame.Name);\n        }\n\n        _timeFrameCombobox.SelectedItem = TimeFrame.Minute.Name;\n\n        _panel.AddChild(_timeFrameCombobox);\n\n        _selectFileButton = new Button() { Text = \"Select File\", Margin = 3 };\n\n        _selectFileButton.Click += OnSelectFileButtonClicked;\n\n        _panel.AddChild(_selectFileButton);\n\n        var addButton = new Button() { Text = \"Add Data\", Margin = 3 };\n\n        addButton.Click += OnAddClick;\n\n        _panel.AddChild(addButton);\n\n        var showDataButton = new Button() { Text = \"Show Data\", Margin = 3 };\n\n        showDataButton.Click += OnShowDataClick;\n\n        _panel.AddChild(showDataButton);\n\n        var removeAllDataButton = new Button() { Text = \"Remove All Data\", Margin = 3 };\n\n        removeAllDataButton.Click += OnRemoveAllDataClick;\n\n        _panel.AddChild(removeAllDataButton);\n\n        var clearCacheButton = new Button() { Text = \"Clear Cache\", Margin = 3 };\n\n        clearCacheButton.Click += OnClearCacheClick;\n\n        _panel.AddChild(clearCacheButton);\n\n        var addCustomTimeFrameButton = new Button() { Text = \"Add Custom Time Frame\", Margin = 3 };\n\n        addCustomTimeFrameButton.Click += OnAddCustomTimeFrameClick;\n\n        _panel.AddChild(addCustomTimeFrameButton);\n\n        var removeCustomTimeFrameButton = new Button() { Text = \"Remove Custom Time Frame\", Margin = 3 };\n\n        removeCustomTimeFrameButton.Click += OnRemoveCustomTimeFrameClick;\n\n        _panel.AddChild(removeCustomTimeFrameButton);\n\n        return _panel;\n    }\n\n    private void OnRemoveCustomTimeFrameClick(ButtonClickEventArgs obj)\n    {\n        if (TimeFrameManager.Custom.Remove(_customTimeFrame))\n        {\n            Print($\"Custom time frame removed.\");\n            return;\n        }\n\n        Print($\"Removing custom time frame failed.\");\n    }\n\n    private void OnAddCustomTimeFrameClick(ButtonClickEventArgs obj)\n    {\n        _customTimeFrame = TimeFrameManager.Custom.Add(\"Custom Data Source Test (H1)\");\n\n        _customTimeFrame.BarsNeeded = args =>\n        {\n            Print($\"Custom time frame bars needed for symbol '{args.CustomBars.Symbol.Name}'.\");\n\n            var bars = MarketData.GetBars(TimeFrame.Hour, args.CustomBars.Symbol.Name);\n\n            Print($\"Appending custom time frame bars '{bars.Count}' for symbol '{args.CustomBars.Symbol.Name}'.\");\n\n            args.CustomBars.AppendBars(bars.Select(b => new CustomBar(b.OpenTime, b.Open, b.High, b.Low, b.Close, (long)b.TickVolume)));\n        };\n\n        Print(\"Custom time frame added.\");\n    }\n\n    private void OnClearCacheClick(ButtonClickEventArgs obj)\n    {\n        if (_dataSource.ClearCache())\n        {\n            Print($\"Data source '{_dataSource.Name}' cached data cleared.\");\n            return;\n        }\n\n        Print($\"Data source '{_dataSource.Name}' cached data clear failed.\");\n    }\n\n    private void OnRemoveAllDataClick(ButtonClickEventArgs obj)\n    {\n        foreach (var (_, data) in _addedData)\n        {\n            System.IO.File.Delete(data.FilePath);\n        }\n\n        LocalStorage.Remove(\"Data\", LocalStorageScope.Type);\n        LocalStorage.Flush(LocalStorageScope.Type);\n\n        _addedData.Clear();\n\n        Print(\"All added data has been removed.\");\n    }\n\n    private void OnAddClick(ButtonClickEventArgs obj)\n    {\n        if (_symbolNameTextBox.Text.Length == 0 || Symbols.GetSymbol(_symbolNameTextBox.Text) is not { } symbol)\n        {\n            Print($\"Invalid or empty symbol name: {_symbolNameTextBox.Text}\");\n            return;\n        }\n\n        if (string.IsNullOrWhiteSpace(_timeFrameCombobox.SelectedItem) || !TimeFrame.TryParse(_timeFrameCombobox.SelectedItem, out var selectedTimeFrame))\n        {\n            Print($\"Invalid time frame: {_timeFrameCombobox.SelectedItem}\");\n            return;\n        }\n\n        if (string.IsNullOrWhiteSpace(_selectedFilePath))\n        {\n            Print($\"Invalid file path: {_selectedFilePath}\");\n            return;\n        }\n\n        var dataType = selectedTimeFrame == TimeFrame.Tick\n            ? BacktestingDataSourceDataType.Tick\n            : selectedTimeFrame == TimeFrame.Minute\n                ? BacktestingDataSourceDataType.M1OpenPrices\n                : BacktestingDataSourceDataType.OpenPrices;\n\n        var dataId = new DataId(symbol.Name, selectedTimeFrame.Name, dataType);\n\n        _panel.IsEnabled = false;\n\n        BeginInvokeOnMainThread(() =>\n        {\n            try\n            {\n                var minMaxTime = GetMinMaxTime(_selectedFilePath);\n                var data = new Data(_selectedFilePath, minMaxTime);\n\n                _addedData[dataId] = data;\n\n                SaveToLocalStorage(dataId, data);\n\n                Print($\"Data for symbol {symbol} and time frame {selectedTimeFrame} is added: {_selectedFilePath}, Min/Max Time: {minMaxTime}\");\n            }\n            finally\n            {\n                _panel.IsEnabled = true;\n            }\n        });\n    }\n\n    private void SaveToLocalStorage(DataId dataId, Data data)\n    {\n        var existingData = LocalStorage.GetObject<List<(DataId DataId, Data Data)>>(\"Data\", LocalStorageScope.Type)\n                           ?? new List<(DataId DataId, Data Data)>();\n\n        existingData.Add((dataId, data));\n\n        LocalStorage.SetObject(\"Data\", existingData, LocalStorageScope.Type);\n        LocalStorage.Flush(LocalStorageScope.Type);\n    }\n\n    private void OnShowDataClick(ButtonClickEventArgs obj)\n    {\n        var existingData =\n            LocalStorage.GetObject<List<(DataId DataId, Data Data)>>(\"Data\", LocalStorageScope.Type);\n\n        if (existingData is null)\n            return;\n\n        Print(\"Showing data\");\n\n        foreach (var (dataId, data) in existingData)\n        {\n            Print($\"Data '{dataId}' with '{data}'\");\n        }\n    }\n\n    private void LoadFromLocalStorage()\n    {\n        var existingData =\n            LocalStorage.GetObject<List<(DataId DataId, Data Data)>>(\"Data\", LocalStorageScope.Type);\n\n        if (existingData is null)\n            return;\n\n        foreach (var (dataId, data) in existingData)\n        {\n            _addedData[dataId] = data with\n            {\n                MinMaxTime = data.MinMaxTime with\n                {\n                    MinTime = DateTime.SpecifyKind(data.MinMaxTime.MinTime, DateTimeKind.Utc),\n                    MaxTime = DateTime.SpecifyKind(data.MinMaxTime.MaxTime, DateTimeKind.Utc)\n                }\n            };\n\n            Print($\"Added data '{dataId}' from local storage\");\n        }\n    }\n\n    private void OnSelectFileButtonClicked(ButtonClickEventArgs obj)\n    {\n        var openFileDialog = new OpenFileDialog();\n\n        _panel.IsEnabled = false;\n        _selectFileButton.Text = \"Please wait...\";\n\n        BeginInvokeOnMainThread(() =>\n        {\n            try\n            {\n                var result = openFileDialog.ShowDialog();\n\n                if (result != FileDialogResult.OK)\n                    return;\n\n                _selectedFilePath = openFileDialog.FileName;\n            }\n            finally\n            {\n                _selectFileButton.Text = \"Select File\";\n                _panel.IsEnabled = true;\n            }\n        });\n    }\n\n    private IEnumerable<TimeFrame> GetTimeFrames()\n    {\n        var timeFrameFields = typeof(TimeFrame).GetFields(BindingFlags.Static | BindingFlags.Public);\n\n        foreach (var timeFrameField in timeFrameFields)\n        {\n            if (timeFrameField.GetValue(null) is not TimeFrame timeFrame)\n                continue;\n\n            yield return timeFrame;\n        }\n    }\n\n    private void OnDataRequested(BacktestingDataRequest request)\n    {\n        request.StatusChanged += OnRequestStatusChanged;\n\n        Print($\"Data Request from {request.StartTime} to {request.EndTime}\");\n\n        var dataId = GetDataId(request.PriceDataSourceId, request.DataType);\n\n        if (!_addedData.TryGetValue(dataId, out var data))\n        {\n            request.Fail($\"Data not found for '{dataId}'.\");\n\n            return;\n        }\n\n        switch (request.DataType)\n        {\n            case BacktestingDataSourceDataType.Tick:\n                var ticks = GetRequestTicks(dataId, data, request);\n                Print($\"Sending ticks.\");\n\n                request.Complete(ticks);\n                break;\n            default:\n                var bars = GetRequestBars(dataId, data, request);\n                Print($\"Sending bars.\");\n\n                request.Complete(bars);\n                break;\n        }\n    }\n\n    private BacktestingData GetRequestTicks(DataId dataId, Data data, BacktestingDataRequest request)\n    {\n        if (!_cachedTickData.TryGetValue(dataId, out var tickData))\n        {\n            tickData = CacheTickData(dataId, data);\n\n            _cachedTickData[dataId] = tickData;\n        }\n\n        var requestData = new List<BacktestingTick>();\n\n        for (var i = DateOnly.FromDateTime(request.StartTime); i <= DateOnly.FromDateTime(request.EndTime); i = i.AddDays(1))\n        {\n            if (!tickData.TryGetValue(i, out var ticks))\n                continue;\n\n            requestData.AddRange(ticks);\n        }\n\n        return new BacktestingTickData(requestData);\n    }\n\n    private BacktestingData GetRequestBars(DataId dataId, Data data, BacktestingDataRequest request)\n    {\n        if (!_cachedBarData.TryGetValue(dataId, out var barsData))\n        {\n            barsData = CacheBarData(dataId, data);\n\n            _cachedBarData[dataId] = barsData;\n        }\n\n        return new BacktestingBarsData(barsData.Where(b => b.Time >= request.StartTime && b.Time <= request.EndTime).ToArray());\n    }\n\n    private List<BacktestingBar> CacheBarData(DataId dataId, Data data)\n    {\n        var result = new List<BacktestingBar>();\n\n        using var fileStream = System.IO.File.OpenRead(data.FilePath);\n        using var streamReader = new StreamReader(fileStream);\n\n        while (streamReader.ReadLine() is { } line)\n        {\n            var lineSplit = line.Split(',');\n\n            if (lineSplit.Length != 6)\n            {\n                throw new InvalidOperationException($\"Invalid data format for '{dataId}'.\");\n            }\n\n            result.Add(new BacktestingBar(DateTime.Parse(lineSplit[0]).ToUniversalTime(), double.Parse(lineSplit[1]), double.Parse(lineSplit[2]), double.Parse(lineSplit[3]), double.Parse(lineSplit[4]), long.Parse(lineSplit[5])));\n        }\n\n        return result;\n    }\n\n    private Dictionary<DateOnly, List<BacktestingTick>> CacheTickData(DataId dataId, Data data)\n    {\n        var result = new Dictionary<DateOnly, List<BacktestingTick>>();\n\n        using var fileStream = System.IO.File.OpenRead(data.FilePath);\n        using var streamReader = new StreamReader(fileStream);\n\n        while (streamReader.ReadLine() is { } line)\n        {\n            var lineSplit = line.Split(',');\n\n            if (lineSplit.Length != 3)\n            {\n                throw new InvalidOperationException($\"Invalid data format for '{dataId}'.\");\n            }\n\n            var time = DateTime.Parse(lineSplit[0]).ToUniversalTime();\n            var date = DateOnly.FromDateTime(time);\n\n            if (!result.TryGetValue(date, out var dateTicks))\n            {\n                dateTicks = new List<BacktestingTick>();\n\n                result.Add(date, dateTicks);\n            }\n\n            dateTicks.Add(new BacktestingTick(time, double.Parse(lineSplit[1]), double.Parse(lineSplit[2])));\n        }\n\n        return result;\n    }\n\n    private void OnRequestStatusChanged(BacktestingDataRequestStatusChangedEventArgs args)\n    {\n        Print($\"Request '{args.DataRequest.PriceDataSourceId}' status changed: {args.DataRequest.Status}\");\n    }\n\n    private BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n    {\n        Print($\"Min/Max time requested, {args.PriceDataSourceId}, {args.DataType}\");\n\n        var dataId = GetDataId(args.PriceDataSourceId, args.DataType);\n\n        Print($\"Min/Max time request DataId: {dataId}\");\n\n        if (!_addedData.TryGetValue(dataId, out var data))\n            throw new InvalidOperationException(\"No data\");\n\n        Print($\"Min/Max time sent, {data.MinMaxTime}\");\n\n        return data.MinMaxTime;\n    }\n\n    private DataId GetDataId(PriceDataSourceId priceDataSourceId, BacktestingDataSourceDataType dateType)\n    {\n        return new DataId(priceDataSourceId.Symbol.Name, dateType switch\n        {\n            BacktestingDataSourceDataType.Tick => TimeFrame.Tick.Name,\n            BacktestingDataSourceDataType.M1OpenPrices => TimeFrame.Minute.Name,\n            BacktestingDataSourceDataType.OpenPrices when _customTimeFrame != null && priceDataSourceId.TimeFrame == _customTimeFrame.TimeFrame => TimeFrame.Hour.Name,\n            _ => priceDataSourceId.TimeFrame.Name\n        }, dateType);\n    }\n\n    private BacktestingMinMaxTime GetMinMaxTime(string filePath)\n    {\n        using var fileStream = System.IO.File.OpenRead(filePath);\n        using var streamReader = new StreamReader(fileStream);\n\n        string firstLine = null;\n        string lastLine = null;\n\n        while (streamReader.ReadLine() is { } line)\n        {\n            if (firstLine == null)\n                firstLine = line;\n\n            lastLine = line;\n        }\n\n        Print($\"First Line: {firstLine}\");\n        Print($\"Last Line: {lastLine}\");\n\n        return new(\n            !string.IsNullOrWhiteSpace(firstLine) ? DateTime.Parse(firstLine.Split(',')[0]).ToUniversalTime() : default,\n            !string.IsNullOrWhiteSpace(lastLine) ? DateTime.Parse(lastLine.Split(',')[0]).ToUniversalTime() : default);\n    }\n\n    private readonly record struct DataId(string SymbolName, string TimeFrameName, BacktestingDataSourceDataType DataType);\n    private readonly record struct Data(string FilePath, BacktestingMinMaxTime MinMaxTime);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, Func, Array, DateTime\n\nclass CustomDataSourceCSVTest():\n    # Each CSV line has the format: time,open,high,low,close,volume\n    FilePath = r\"C:\\Data\\EURUSD_M1.csv\"\n\n    def on_start(self):\n        self.bars = self.read_bars(self.FilePath)\n        options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.M1OpenPrices | BacktestingDataSourceDataType.OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n        self.dataSource = api.Backtesting.DataSources.Add(\"CSV\", options)\n\n    def read_bars(self, filePath):\n        bars = []\n        with open(filePath) as file:\n            for line in file:\n                parts = line.strip().split(\",\")\n                if len(parts) != 6:\n                    continue\n                bars.append(BacktestingBar(DateTime.Parse(parts[0]).ToUniversalTime(), float(parts[1]), float(parts[2]), float(parts[3]), float(parts[4]), int(parts[5])))\n        return bars\n\n    def on_min_max_time_requested(self, args):\n        return BacktestingMinMaxTime(self.bars[0].Time, self.bars[-1].Time)\n\n    def on_data_requested(self, request):\n        requestBars = [bar for bar in self.bars if bar.Time >= request.StartTime and bar.Time <= request.EndTime]\n        if len(requestBars) == 0:\n            request.Fail(f\"No CSV data between {request.StartTime} and {request.EndTime}\")\n            return\n        request.Complete(BacktestingBarsData(Array[BacktestingBar](requestBars)))","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSources.Add(System.String,cAlgo.API.BacktestingDataSourceOptions)","kind":"method","name":"Add","type":"T:cAlgo.API.BacktestingDataSources","namespace":"cAlgo.API","group":"DataSource","csharp":"BacktestingDataSource Add(string name, BacktestingDataSourceOptions options)","python":"backtestingDataSources.Add(name: str, options: BacktestingDataSourceOptions) -> BacktestingDataSource","summary":"Adds a new backtesting data source.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Data source unique name."},{"name":"options","csharpType":"BacktestingDataSourceOptions","pythonType":"BacktestingDataSourceOptions","summary":"Data source options."}],"returns":{"csharpType":"BacktestingDataSource","pythonType":"BacktestingDataSource","summary":"BacktestingDataSource","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var options = new BacktestingDataSourceOptions(BacktestingDataSourceDataType.OpenPrices, OnMinMaxTimeRequested, OnDataRequested);\n    var dataSource = Backtesting.DataSources.Add(\"My Data\", options);\n    Print(\"Added backtesting data source {0}\", dataSource.Name);\n}\n\nprivate BacktestingMinMaxTime OnMinMaxTimeRequested(BacktestingDataSourceMinMaxTimeArgs args)\n{\n    return new BacktestingMinMaxTime(Server.Time.AddYears(-1), Server.Time);\n}\n\nprivate void OnDataRequested(BacktestingDataRequest request)\n{\n    var bars = MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name);\n    var data = bars.Where(bar => bar.OpenTime >= request.StartTime && bar.OpenTime <= request.EndTime)\n        .Select(bar => new BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume))\n        .ToArray();\n    request.Complete(new BacktestingBarsData(data));\n}","python":"from System import Action, Func, Array\n\ndef on_start(self):\n    options = BacktestingDataSourceOptions(BacktestingDataSourceDataType.OpenPrices, Func[BacktestingDataSourceMinMaxTimeArgs, BacktestingMinMaxTime](self.on_min_max_time_requested), Action[BacktestingDataRequest](self.on_data_requested))\n    dataSource = api.Backtesting.DataSources.Add(\"My Data\", options)\n    api.Print(f\"Added backtesting data source {dataSource.Name}\")\n\ndef on_min_max_time_requested(self, args):\n    return BacktestingMinMaxTime(api.Server.Time.AddYears(-1), api.Server.Time)\n\ndef on_data_requested(self, request):\n    bars = api.MarketData.GetBars(request.PriceDataSourceId.TimeFrame, request.PriceDataSourceId.Symbol.Name)\n    data = [BacktestingBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in bars if bar.OpenTime >= request.StartTime and bar.OpenTime <= request.EndTime]\n    request.Complete(BacktestingBarsData(Array[BacktestingBar](data)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSources.Remove(cAlgo.API.BacktestingDataSource)","kind":"method","name":"Remove","type":"T:cAlgo.API.BacktestingDataSources","namespace":"cAlgo.API","group":"DataSource","csharp":"bool Remove(BacktestingDataSource dataSource)","python":"backtestingDataSources.Remove(dataSource: BacktestingDataSource) -> bool","summary":"Removes a previously added backtesting data source.","remarks":"Remove fails if data source is being used.","parameters":[{"name":"dataSource","csharpType":"BacktestingDataSource","pythonType":"BacktestingDataSource","summary":"Backtesting data source."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise False.","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var dataSource = Backtesting.DataSources.FirstOrDefault(source => source.Name == \"My Data\");\nif (dataSource != null)\n    Print(\"Data source removed: {0}\", Backtesting.DataSources.Remove(dataSource));","python":"for dataSource in api.Backtesting.DataSources:\n    if dataSource.Name == \"My Data\":\n        api.Print(f\"Data source removed: {api.Backtesting.DataSources.Remove(dataSource)}\")\n        break"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingDataSources.RemoveAllUnused","kind":"method","name":"RemoveAllUnused","type":"T:cAlgo.API.BacktestingDataSources","namespace":"cAlgo.API","group":"DataSource","csharp":"void RemoveAllUnused()","python":"backtestingDataSources.RemoveAllUnused() -> None","summary":"Removes all previously added backtesting data sources that are not being used.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStop()\n{\n    Backtesting.DataSources.RemoveAllUnused();\n    Print(\"Remaining data sources: {0}\", Backtesting.DataSources.Count());\n}","python":"def on_stop(self):\n    api.Backtesting.DataSources.RemoveAllUnused()\n    api.Print(f\"Remaining data sources: {len(list(api.Backtesting.DataSources))}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/RemoveAllUnused/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingDataSources/RemoveAllUnused/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingError","kind":"enum","name":"BacktestingError","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public enum BacktestingError","python":"BacktestingError","summary":"Specifies the error that stopped a backtesting process, None if there was no error.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.Completed += OnBacktestingCompleted;\n}\n\nprivate void OnBacktestingCompleted(BacktestingCompletedEventArgs args)\n{\n    if (args.Process.BacktestingError == BacktestingError.None)\n        Print(\"Backtesting finished successfully\");\n    else\n        Print(\"Backtesting failed: {0}\", args.Process.BacktestingError);\n}","python":"def on_start(self):\n    api.Backtesting.Completed += self.on_backtesting_completed\n\ndef on_backtesting_completed(self, args):\n    # None is a Python keyword, so the enum value is read with getattr\n    if args.Process.BacktestingError == getattr(BacktestingError, \"None\"):\n        api.Print(\"Backtesting finished successfully\")\n    else:\n        api.Print(f\"Backtesting failed: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.None","kind":"enum value","name":"None","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.None;","python":"BacktestingError.None","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.Other","kind":"enum value","name":"Other","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.Other;","python":"BacktestingError.Other","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.Net4IsNotSupported","kind":"enum value","name":"Net4IsNotSupported","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.Net4IsNotSupported;","python":"BacktestingError.Net4IsNotSupported","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.NoConnection","kind":"enum value","name":"NoConnection","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.NoConnection;","python":"BacktestingError.NoConnection","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.NoHistoricalData","kind":"enum value","name":"NoHistoricalData","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.NoHistoricalData;","python":"BacktestingError.NoHistoricalData","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.NotSupported","kind":"enum value","name":"NotSupported","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.NotSupported;","python":"BacktestingError.NotSupported","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.BacktestingError.InvalidSettings","kind":"enum value","name":"InvalidSettings","type":"T:cAlgo.API.BacktestingError","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError.InvalidSettings;","python":"BacktestingError.InvalidSettings","summary":"%DOCUMENTATION%","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingMinMaxTime","kind":"struct","name":"BacktestingMinMaxTime","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public sealed struct BacktestingMinMaxTime : ValueType","python":"BacktestingMinMaxTime","summary":"Represents minimum and maximum time of available data for a TimeFrame Symbol on a back testing data source.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var minMaxTime = new BacktestingMinMaxTime(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc), Server.Time);\nPrint(\"Data available from {0} to {1}\", minMaxTime.MinTime, minMaxTime.MaxTime);","python":"from System import DateTime, DateTimeKind\nminMaxTime = BacktestingMinMaxTime(DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc), api.Server.Time)\napi.Print(f\"Data available from {minMaxTime.MinTime} to {minMaxTime.MaxTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingMinMaxTime.#ctor(System.DateTime,System.DateTime)","kind":"constructor","name":"BacktestingMinMaxTime","type":"T:cAlgo.API.BacktestingMinMaxTime","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingMinMaxTime(DateTime MinTime, DateTime MaxTime)","python":"BacktestingMinMaxTime(MinTime: DateTime, MaxTime: DateTime)","summary":"Represents minimum and maximum time of available data for a TimeFrame Symbol on a back testing data source.","remarks":null,"parameters":[{"name":"MinTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Minimum Time"},{"name":"MaxTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Maximum Time"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var minMaxTime = new BacktestingMinMaxTime(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc), Server.Time);\nPrint(\"Data available from {0} to {1}\", minMaxTime.MinTime, minMaxTime.MaxTime);","python":"from System import DateTime, DateTimeKind\nminMaxTime = BacktestingMinMaxTime(DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc), api.Server.Time)\napi.Print(f\"Data available from {minMaxTime.MinTime} to {minMaxTime.MaxTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingMinMaxTime.MaxTime","kind":"property","name":"MaxTime","type":"T:cAlgo.API.BacktestingMinMaxTime","namespace":"cAlgo.API","group":"DataSource","csharp":"public DateTime MaxTime {get; set;}","python":"backtestingMinMaxTime.MaxTime: DateTime","summary":"Maximum Time","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/MaxTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/MaxTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingMinMaxTime.MinTime","kind":"property","name":"MinTime","type":"T:cAlgo.API.BacktestingMinMaxTime","namespace":"cAlgo.API","group":"DataSource","csharp":"public DateTime MinTime {get; set;}","python":"backtestingMinMaxTime.MinTime: DateTime","summary":"Minimum Time","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/MinTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingMinMaxTime/MinTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingProcess","kind":"interface","name":"BacktestingProcess","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public interface BacktestingProcess","python":"BacktestingProcess","summary":"Represents a backtesting process with methods and properties to monitor its status and results.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.ProgressChanged += args => Print(\"Progress: {0:F1}%\", args.Progress);\nprocess.Completed += args => Print(\"Completed, error: {0}\", args.Process.BacktestingError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.ProgressChanged += lambda args: api.Print(f\"Progress: {args.Progress:.1f}%\")\nprocess.Completed += lambda args: api.Print(f\"Completed, error: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingProcess.Terminate","kind":"method","name":"Terminate","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"void Terminate()","python":"backtestingProcess.Terminate() -> None","summary":"Terminates the backtesting process.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private BacktestingProcess _process;\n\nprotected override void OnStart()\n{\n    if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n        return;\n    var settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\n    _process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\n}\n\nprotected override void OnStop()\n{\n    if (_process != null && !_process.IsCompleted)\n        _process.Terminate();\n}","python":"from System import DateTime\n\ndef on_start(self):\n    self.process = None\n    algoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\n    if algoType is None:\n        return\n    settings = BacktestingSettings()\n    settings.StartTimeUtc = DateTime(2025, 1, 1)\n    settings.EndTimeUtc = DateTime(2025, 2, 1)\n    settings.Balance = 10000\n    self.process = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\n\ndef on_stop(self):\n    if self.process is not None and not self.process.IsCompleted:\n        self.process.Terminate()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/Terminate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/Terminate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProcess.BacktestingError","kind":"property","name":"BacktestingError","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"BacktestingError BacktestingError {get;}","python":"backtestingProcess.BacktestingError: BacktestingError","summary":"Gets the error information if the backtesting process failed.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingError","pythonType":"BacktestingError","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"Backtesting error: {0}\", args.Process.BacktestingError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"Backtesting error: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/BacktestingError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/BacktestingError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProcess.HtmlReport","kind":"property","name":"HtmlReport","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"string HtmlReport {get;}","python":"backtestingProcess.HtmlReport: str","summary":"Gets the HTML report of the backtesting results. Returns null if the backtesting is not finished or an error occurred.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"HTML report available: {0}\", args.Process.HtmlReport != null);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"HTML report available: {args.Process.HtmlReport is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/HtmlReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/HtmlReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProcess.IsCompleted","kind":"property","name":"IsCompleted","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"bool IsCompleted {get;}","python":"backtestingProcess.IsCompleted: bool","summary":"Gets a value indicating whether the backtesting process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nif (process.IsCompleted)\n    Print(\"Backtesting already completed with error {0}\", process.BacktestingError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nif process.IsCompleted:\n    api.Print(f\"Backtesting already completed with error {process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/IsCompleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/IsCompleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProcess.JsonReport","kind":"property","name":"JsonReport","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"string JsonReport {get;}","python":"backtestingProcess.JsonReport: str","summary":"Gets the JSON report of the backtesting results. Returns null if the backtesting is not finished or an error occurred.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"JSON report: {0}\", args.Process.JsonReport ?? \"not available\");","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"JSON report: {args.Process.JsonReport}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/JsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/JsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProcess.MonteCarloJsonReport","kind":"property","name":"MonteCarloJsonReport","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"string MonteCarloJsonReport {get;}","python":"backtestingProcess.MonteCarloJsonReport: str","summary":"Gets the Monte Carlo simulation result as JSON, which is the same snapshot that is written to the output file of the MonteCarlo settings. Returns null when no Monte Carlo simulation was configured, when the backtesting is not finished, when the backtest produced no trades, or when an error occurred.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings\n{\n    StartTimeUtc = new DateTime(2025, 1, 1),\n    EndTimeUtc = new DateTime(2025, 2, 1),\n    Balance = 10000,\n    MonteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @\"C:\\Temp\\montecarlo-result.json\")\n};\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"Monte Carlo result: {0}\", args.Process.MonteCarloJsonReport);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nsettings.MonteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r\"C:\\Temp\\montecarlo-result.json\")\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"Monte Carlo result: {args.Process.MonteCarloJsonReport}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/MonteCarloJsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/MonteCarloJsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.BacktestingProcess.Completed","kind":"event","name":"Completed","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"event Action<BacktestingCompletedEventArgs> Completed;","python":"backtestingProcess.Completed += handler  # handler(obj: BacktestingCompletedEventArgs)","summary":"Occurs when the backtesting process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingCompletedEventArgs>","pythonType":"Callable[[BacktestingCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"Completed, error: {0}, report: {1}\", args.Process.BacktestingError, args.JsonReport);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"Completed, error: {args.Process.BacktestingError}, report: {args.JsonReport}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/Completed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/Completed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.BacktestingProcess.ProgressChanged","kind":"event","name":"ProgressChanged","type":"T:cAlgo.API.BacktestingProcess","namespace":"cAlgo.API","group":"Backtesting","csharp":"event Action<BacktestingProgressChangedEventArgs> ProgressChanged;","python":"backtestingProcess.ProgressChanged += handler  # handler(obj: BacktestingProgressChangedEventArgs)","summary":"Occurs when the backtesting progress changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BacktestingProgressChangedEventArgs>","pythonType":"Callable[[BacktestingProgressChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.ProgressChanged += args => Print(\"Progress: {0:F1}% - {1}\", args.Progress, args.Operation);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.ProgressChanged += lambda args: api.Print(f\"Progress: {args.Progress:.1f}% - {args.Operation}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/ProgressChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProcess/ProgressChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingProgressChangedEventArgs","kind":"class","name":"BacktestingProgressChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public class BacktestingProgressChangedEventArgs","python":"BacktestingProgressChangedEventArgs","summary":"Provides data for the backtesting progress changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.ProgressChanged += OnBacktestingProgressChanged;\n}\n\nprivate void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)\n{\n    Print(\"{0:F1}% {1}, completed: {2}\", args.Progress, args.Operation, args.Process.IsCompleted);\n}","python":"def on_start(self):\n    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed\n\ndef on_backtesting_progress_changed(self, args):\n    api.Print(f\"{args.Progress:.1f}% {args.Operation}, completed: {args.Process.IsCompleted}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProgressChangedEventArgs.Operation","kind":"property","name":"Operation","type":"T:cAlgo.API.BacktestingProgressChangedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public string Operation {get;}","python":"backtestingProgressChangedEventArgs.Operation: str","summary":"Gets the description of the current operation.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.ProgressChanged += OnBacktestingProgressChanged;\n}\n\nprivate void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)\n{\n    Print(\"Current backtesting operation: {0}\", args.Operation);\n}","python":"def on_start(self):\n    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed\n\ndef on_backtesting_progress_changed(self, args):\n    api.Print(f\"Current backtesting operation: {args.Operation}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Operation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Operation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProgressChangedEventArgs.Process","kind":"property","name":"Process","type":"T:cAlgo.API.BacktestingProgressChangedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public BacktestingProcess Process {get;}","python":"backtestingProgressChangedEventArgs.Process: BacktestingProcess","summary":"Gets the backtesting process that reported progress.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingProcess","pythonType":"BacktestingProcess","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.ProgressChanged += OnBacktestingProgressChanged;\n}\n\nprivate void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)\n{\n    if (args.Progress > 50 && !args.Process.IsCompleted)\n        Print(\"Backtesting is more than half done\");\n}","python":"def on_start(self):\n    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed\n\ndef on_backtesting_progress_changed(self, args):\n    if args.Progress > 50 and not args.Process.IsCompleted:\n        api.Print(\"Backtesting is more than half done\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Process/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Process/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingProgressChangedEventArgs.Progress","kind":"property","name":"Progress","type":"T:cAlgo.API.BacktestingProgressChangedEventArgs","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double Progress {get;}","python":"backtestingProgressChangedEventArgs.Progress: float","summary":"Gets the progress percentage of the backtesting process.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Backtesting.ProgressChanged += OnBacktestingProgressChanged;\n}\n\nprivate void OnBacktestingProgressChanged(BacktestingProgressChangedEventArgs args)\n{\n    Print(\"Backtesting progress: {0:F1}%\", args.Progress);\n}","python":"def on_start(self):\n    api.Backtesting.ProgressChanged += self.on_backtesting_progress_changed\n\ndef on_backtesting_progress_changed(self, args):\n    api.Print(f\"Backtesting progress: {args.Progress:.1f}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Progress/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingProgressChangedEventArgs/Progress/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingSettings","kind":"class","name":"BacktestingSettings","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public class BacktestingSettings","python":"BacktestingSettings","summary":"Represents settings for configuring the backtesting process.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings\n{\n    StartTimeUtc = new DateTime(2025, 1, 1, 0, 0, 0, DateTimeKind.Utc),\n    EndTimeUtc = new DateTime(2025, 6, 1, 0, 0, 0, DateTimeKind.Utc),\n    Balance = 10000,\n    DataMode = BacktestingDataMode.M1,\n    SpreadPips = 0.5,\n    ApplyCommissionAutomatically = true\n};\nif (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is RobotType robotType)\n    Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);","python":"from System import DateTime, DateTimeKind\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1, 0, 0, 0, DateTimeKind.Utc)\nsettings.EndTimeUtc = DateTime(2025, 6, 1, 0, 0, 0, DateTimeKind.Utc)\nsettings.Balance = 10000\nsettings.DataMode = BacktestingDataMode.M1\nsettings.SpreadPips = 0.5\nsettings.ApplyCommissionAutomatically = True\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is not None:\n    api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingSettings.#ctor","kind":"constructor","name":"BacktestingSettings","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public BacktestingSettings()","python":"BacktestingSettings()","summary":"Represents settings for configuring the backtesting process.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings();\nsettings.Balance = 5000;\nPrint(\"Backtesting balance: {0}\", settings.Balance);","python":"settings = BacktestingSettings()\nsettings.Balance = 5000\napi.Print(f\"Backtesting balance: {settings.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.ApplyCommissionAutomatically","kind":"property","name":"ApplyCommissionAutomatically","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public bool ApplyCommissionAutomatically {get; set;}","python":"backtestingSettings.ApplyCommissionAutomatically: bool","summary":"Gets or sets a value that indicates whether the commission type and value of the backtested symbol are applied automatically. When it is set to true the Commission and CommissionType properties are ignored. The default value is false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { ApplyCommissionAutomatically = true };\nPrint(\"Use symbol commission: {0}\", settings.ApplyCommissionAutomatically);","python":"settings = BacktestingSettings()\nsettings.ApplyCommissionAutomatically = True\napi.Print(f\"Use symbol commission: {settings.ApplyCommissionAutomatically}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/ApplyCommissionAutomatically/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/ApplyCommissionAutomatically/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.Balance","kind":"property","name":"Balance","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double Balance {get; set;}","python":"backtestingSettings.Balance: float","summary":"Gets or sets the initial balance for the backtesting.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { Balance = 25000 };\nPrint(\"Initial backtesting balance: {0}\", settings.Balance);","python":"settings = BacktestingSettings()\nsettings.Balance = 25000\napi.Print(f\"Initial backtesting balance: {settings.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Balance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Balance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.Commission","kind":"property","name":"Commission","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double Commission {get; set;}","python":"backtestingSettings.Commission: float","summary":"Gets or sets the commission value, it is interpreted based on the CommissionType property value. It is ignored when ApplyCommissionAutomatically is set to true. The default value is 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings\n{\n    Commission = 30,\n    CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\n};\nPrint(\"Commission: {0} ({1})\", settings.Commission, settings.CommissionType);","python":"settings = BacktestingSettings()\nsettings.Commission = 30\nsettings.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\napi.Print(f\"Commission: {settings.Commission} ({settings.CommissionType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Commission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/Commission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.CommissionType","kind":"property","name":"CommissionType","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public SymbolCommissionType CommissionType {get; set;}","python":"backtestingSettings.CommissionType: SymbolCommissionType","summary":"Gets or sets the commission type that defines how the Commission property value is interpreted. It is ignored when ApplyCommissionAutomatically is set to true. The default value is SymbolCommissionType.UsdPerMillionUsdVolume.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings\n{\n    Commission = 3.5,\n    CommissionType = SymbolCommissionType.UsdPerOneLot\n};\nPrint(\"Commission type: {0}\", settings.CommissionType);","python":"settings = BacktestingSettings()\nsettings.Commission = 3.5\nsettings.CommissionType = SymbolCommissionType.UsdPerOneLot\napi.Print(f\"Commission type: {settings.CommissionType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/CommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/CommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.DataFile","kind":"property","name":"DataFile","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public string DataFile {get; set;}","python":"backtestingSettings.DataFile: str","summary":"Gets or sets the path to the data file used for backtesting.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings\n{\n    DataMode = BacktestingDataMode.M1Csv,\n    DataFile = @\"C:\\Data\\EURUSD_M1.csv\"\n};\nPrint(\"Backtesting data file: {0}\", settings.DataFile);","python":"settings = BacktestingSettings()\nsettings.DataMode = BacktestingDataMode.M1Csv\nsettings.DataFile = r\"C:\\Data\\EURUSD_M1.csv\"\napi.Print(f\"Backtesting data file: {settings.DataFile}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/DataFile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/DataFile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.DataMode","kind":"property","name":"DataMode","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public BacktestingDataMode DataMode {get; set;}","python":"backtestingSettings.DataMode: BacktestingDataMode","summary":"Gets or sets the data mode used for backtesting.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { DataMode = BacktestingDataMode.Ticks };\nPrint(\"Backtesting data mode: {0}\", settings.DataMode);","python":"settings = BacktestingSettings()\nsettings.DataMode = BacktestingDataMode.Ticks\napi.Print(f\"Backtesting data mode: {settings.DataMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/DataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/DataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.EndTimeUtc","kind":"property","name":"EndTimeUtc","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public DateTime EndTimeUtc {get; set;}","python":"backtestingSettings.EndTimeUtc: DateTime","summary":"Gets or sets the end time in UTC for the backtesting period.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { EndTimeUtc = Server.TimeInUtc.Date };\nPrint(\"Backtesting ends at {0:u}\", settings.EndTimeUtc);","python":"settings = BacktestingSettings()\nsettings.EndTimeUtc = api.Server.TimeInUtc.Date\napi.Print(f\"Backtesting ends at {settings.EndTimeUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/EndTimeUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/EndTimeUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.MonteCarlo","kind":"property","name":"MonteCarlo","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public MonteCarloSettings MonteCarlo {get; set;}","python":"backtestingSettings.MonteCarlo: MonteCarloSettings","summary":"Gets or sets the optional Monte Carlo simulation that runs on the completed backtest. When it is null, the default, no Monte Carlo simulation is performed and the backtest behaves exactly as before. When it is set, the simulation runs on the completed backtest and its result is written to the configured output file.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloSettings","pythonType":"MonteCarloSettings","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var backtestingSettings = new BacktestingSettings\n{\n    StartTimeUtc = new DateTime(2025, 1, 1, 0, 0, 0, DateTimeKind.Utc),\n    EndTimeUtc = new DateTime(2025, 6, 1, 0, 0, 0, DateTimeKind.Utc),\n    Balance = 10000,\n    DataMode = BacktestingDataMode.M1,\n    MonteCarlo = new MonteCarloSettings(MonteCarloMethod.BlockBootstrap, @\"C:\\Temp\\montecarlo-result.json\")\n    {\n        Iterations = 5000,\n        Seed = 42,\n        BlockSize = 10\n    }\n};\n\nPrint($\"Monte Carlo output file: {backtestingSettings.MonteCarlo.OutputFilePath}\");","python":"from System import DateTime, DateTimeKind\nbacktestingSettings = BacktestingSettings()\nbacktestingSettings.StartTimeUtc = DateTime(2025, 1, 1, 0, 0, 0, DateTimeKind.Utc)\nbacktestingSettings.EndTimeUtc = DateTime(2025, 6, 1, 0, 0, 0, DateTimeKind.Utc)\nbacktestingSettings.Balance = 10000\nbacktestingSettings.DataMode = BacktestingDataMode.M1\n\nmonteCarlo = MonteCarloSettings(MonteCarloMethod.BlockBootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.Iterations = 5000\nmonteCarlo.Seed = 42\nmonteCarlo.BlockSize = 10\nbacktestingSettings.MonteCarlo = monteCarlo\n\napi.Print(f\"Monte Carlo output file: {backtestingSettings.MonteCarlo.OutputFilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/MonteCarlo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/MonteCarlo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.PreciseConversion","kind":"property","name":"PreciseConversion","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public bool PreciseConversion {get; set;}","python":"backtestingSettings.PreciseConversion: bool","summary":"Gets or sets a value indicating whether historical data for additional symbols is downloaded to convert profit and margin into the account deposit currency precisely. When true, real historical exchange rates of the additional symbols are used; when false, the default, approximated rates are used. Enabling it can increase the run time and the amount of downloaded data.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { PreciseConversion = true };\nPrint(\"Precise conversion enabled: {0}\", settings.PreciseConversion);","python":"settings = BacktestingSettings()\nsettings.PreciseConversion = True\napi.Print(f\"Precise conversion enabled: {settings.PreciseConversion}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/PreciseConversion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/PreciseConversion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.SpreadPips","kind":"property","name":"SpreadPips","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double SpreadPips {get; set;}","python":"backtestingSettings.SpreadPips: float","summary":"Gets or sets the spread in pips.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { SpreadPips = 1.2 };\nPrint(\"Backtesting spread: {0} pips\", settings.SpreadPips);","python":"settings = BacktestingSettings()\nsettings.SpreadPips = 1.2\napi.Print(f\"Backtesting spread: {settings.SpreadPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/SpreadPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/SpreadPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.StartTimeUtc","kind":"property","name":"StartTimeUtc","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public DateTime StartTimeUtc {get; set;}","python":"backtestingSettings.StartTimeUtc: DateTime","summary":"Gets or sets the start time in UTC for the backtesting period.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var settings = new BacktestingSettings { StartTimeUtc = Server.TimeInUtc.AddMonths(-3) };\nPrint(\"Backtesting starts at {0:u}\", settings.StartTimeUtc);","python":"settings = BacktestingSettings()\nsettings.StartTimeUtc = api.Server.TimeInUtc.AddMonths(-3)\napi.Print(f\"Backtesting starts at {settings.StartTimeUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/StartTimeUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/StartTimeUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingSettings.CommissionUsdPerMillionUsd","kind":"property","name":"CommissionUsdPerMillionUsd","type":"T:cAlgo.API.BacktestingSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double CommissionUsdPerMillionUsd {get; set;}","python":"backtestingSettings.CommissionUsdPerMillionUsd: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Commission with CommissionType instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingTick","kind":"struct","name":"BacktestingTick","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public sealed struct BacktestingTick : ValueType","python":"BacktestingTick","summary":"Represents a tick, used for backtesting data source tick data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var lastTick = MarketData.GetTicks(\"EURUSD\").LastTick;\nvar tick = new BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask);\nPrint(\"Backtesting tick {0}: bid {1}, ask {2}\", tick.Time, tick.Bid, tick.Ask);","python":"lastTick = api.MarketData.GetTicks(\"EURUSD\").LastTick\ntick = BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask)\napi.Print(f\"Backtesting tick {tick.Time}: bid {tick.Bid}, ask {tick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingTick.#ctor(System.DateTime,System.Double,System.Double)","kind":"constructor","name":"BacktestingTick","type":"T:cAlgo.API.BacktestingTick","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingTick(DateTime Time, double Bid, double Ask)","python":"BacktestingTick(Time: DateTime, Bid: float, Ask: float)","summary":"Represents a tick, used for backtesting data source tick data.","remarks":null,"parameters":[{"name":"Time","csharpType":"DateTime","pythonType":"DateTime","summary":"Timestamp"},{"name":"Bid","csharpType":"double","pythonType":"float","summary":"Bid Price"},{"name":"Ask","csharpType":"double","pythonType":"float","summary":"Ask Price"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var lastTick = MarketData.GetTicks(\"EURUSD\").LastTick;\nvar tick = new BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask);\nPrint(\"Backtesting tick {0}: bid {1}, ask {2}\", tick.Time, tick.Bid, tick.Ask);","python":"lastTick = api.MarketData.GetTicks(\"EURUSD\").LastTick\ntick = BacktestingTick(lastTick.Time, lastTick.Bid, lastTick.Ask)\napi.Print(f\"Backtesting tick {tick.Time}: bid {tick.Bid}, ask {tick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingTick.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.BacktestingTick","namespace":"cAlgo.API","group":"DataSource","csharp":"public double Ask {get; set;}","python":"backtestingTick.Ask: float","summary":"Ask Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingTick.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.BacktestingTick","namespace":"cAlgo.API","group":"DataSource","csharp":"public double Bid {get; set;}","python":"backtestingTick.Bid: float","summary":"Bid Price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.BacktestingTick.Time","kind":"property","name":"Time","type":"T:cAlgo.API.BacktestingTick","namespace":"cAlgo.API","group":"DataSource","csharp":"public DateTime Time {get; set;}","python":"backtestingTick.Time: DateTime","summary":"Timestamp","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTick/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.BacktestingTickData","kind":"class","name":"BacktestingTickData","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public class BacktestingTickData","python":"BacktestingTickData","summary":"Represents a collection of backtesting tick data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var ticks = MarketData.GetTicks(request.PriceDataSourceId.Symbol.Name);\n    var data = ticks.Where(tick => tick.Time >= request.StartTime && tick.Time <= request.EndTime)\n        .Select(tick => new BacktestingTick(tick.Time, tick.Bid, tick.Ask));\n    request.Complete(new BacktestingTickData(data));\n}","python":"from System import Array\n\ndef on_data_requested(self, request):\n    ticks = api.MarketData.GetTicks(request.PriceDataSourceId.Symbol.Name)\n    data = [BacktestingTick(tick.Time, tick.Bid, tick.Ask) for tick in ticks if tick.Time >= request.StartTime and tick.Time <= request.EndTime]\n    request.Complete(BacktestingTickData(Array[BacktestingTick](data)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTickData/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTickData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.BacktestingTickData.#ctor(System.Collections.Generic.IEnumerable{cAlgo.API.BacktestingTick})","kind":"constructor","name":"BacktestingTickData","type":"T:cAlgo.API.BacktestingTickData","namespace":"cAlgo.API","group":"DataSource","csharp":"public BacktestingTickData(IEnumerable<BacktestingTick> data)","python":"BacktestingTickData(data: Iterable[BacktestingTick])","summary":"Creates a new instance of BacktestingTickData with passed data.","remarks":null,"parameters":[{"name":"data","csharpType":"IEnumerable<BacktestingTick>","pythonType":"Iterable[BacktestingTick]","summary":"Tick data"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var ticks = new List<BacktestingTick>\n{\n    new BacktestingTick(new DateTime(2025, 1, 2, 0, 0, 0, DateTimeKind.Utc), 1.03520, 1.03530),\n    new BacktestingTick(new DateTime(2025, 1, 2, 0, 0, 1, DateTimeKind.Utc), 1.03525, 1.03534)\n};\nvar tickData = new BacktestingTickData(ticks);","python":"from System import Array, DateTime, DateTimeKind\nticks = [\n    BacktestingTick(DateTime(2025, 1, 2, 0, 0, 0, DateTimeKind.Utc), 1.03520, 1.03530),\n    BacktestingTick(DateTime(2025, 1, 2, 0, 0, 1, DateTimeKind.Utc), 1.03525, 1.03534)\n]\ntickData = BacktestingTickData(Array[BacktestingTick](ticks))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTickData/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/BacktestingTickData/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Bar","kind":"struct","name":"Bar","type":null,"namespace":"cAlgo.API","group":"Bars","csharp":"public sealed struct Bar : ValueType","python":"Bar","summary":"Represents the Bar object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bar = Bars.Last(1);\nvar direction = bar.Close > bar.Open ? \"bullish\" : \"bearish\";\nPrint(\"Last closed bar at {0} was {1}: O {2} H {3} L {4} C {5}\", bar.OpenTime, direction, bar.Open, bar.High, bar.Low, bar.Close);","python":"bar = api.Bars.Last(1)\ndirection = \"bullish\" if bar.Close > bar.Open else \"bearish\"\napi.Print(f\"Last closed bar at {bar.OpenTime} was {direction}: O {bar.Open} H {bar.High} L {bar.Low} C {bar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.Close","kind":"property","name":"Close","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Close {get;}","python":"bar.Close: float","summary":"Gets the Close price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var closedBar = Bars.Last(1);\nPrint(\"Last closed bar close price: {0}\", closedBar.Close);","python":"closedBar = api.Bars.Last(1)\napi.Print(f\"Last closed bar close price: {closedBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.High","kind":"property","name":"High","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public double High {get;}","python":"bar.High: float","summary":"Gets the High price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var previousBar = Bars.Last(1);\nif (Symbol.Bid > previousBar.High)\n    Print(\"Price broke above the previous bar high {0}\", previousBar.High);","python":"previousBar = api.Bars.Last(1)\nif api.Symbol.Bid > previousBar.High:\n    api.Print(f\"Price broke above the previous bar high {previousBar.High}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/High/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/High/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.Low","kind":"property","name":"Low","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Low {get;}","python":"bar.Low: float","summary":"Gets the Low price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var previousBar = Bars.Last(1);\nif (Symbol.Bid < previousBar.Low)\n    Print(\"Price broke below the previous bar low {0}\", previousBar.Low);","python":"previousBar = api.Bars.Last(1)\nif api.Symbol.Bid < previousBar.Low:\n    api.Print(f\"Price broke below the previous bar low {previousBar.Low}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Low/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Low/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.Open","kind":"property","name":"Open","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Open {get;}","python":"bar.Open: float","summary":"Gets the open price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bar = Bars.LastBar;\nPrint(\"Price moved {0} pips since the bar opened at {1}\", (bar.Close - bar.Open) / Symbol.PipSize, bar.Open);","python":"bar = api.Bars.LastBar\napi.Print(f\"Price moved {(bar.Close - bar.Open) / api.Symbol.PipSize} pips since the bar opened at {bar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Open/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/Open/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.OpenTime","kind":"property","name":"OpenTime","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public DateTime OpenTime {get;}","python":"bar.OpenTime: DateTime","summary":"Gets the bar open time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Last bar opened at {0}\", Bars.LastBar.OpenTime);","python":"api.Print(f\"Last bar opened at {api.Bars.LastBar.OpenTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/OpenTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/OpenTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bar.TickVolume","kind":"property","name":"TickVolume","type":"T:cAlgo.API.Bar","namespace":"cAlgo.API","group":"Bars","csharp":"public long TickVolume {get;}","python":"bar.TickVolume: int","summary":"Gets the Tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Ticks in the current bar: {0}\", Bars.LastBar.TickVolume);","python":"api.Print(f\"Ticks in the current bar: {api.Bars.LastBar.TickVolume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bar/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.BarClosedEventArgs","kind":"class","name":"BarClosedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class BarClosedEventArgs","python":"BarClosedEventArgs","summary":"Provides data for the event when a bar closed on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.BarClosed += OnBarsBarClosed;\n}\n\nprivate void OnBarsBarClosed(BarClosedEventArgs args)\n{\n    Print(\"Bar closed on {0} {1}, bars count: {2}\", args.Bars.SymbolName, args.Bars.TimeFrame, args.Bars.Count);\n}","python":"def on_start(self):\n    api.Bars.BarClosed += self.on_bars_bar_closed\n\ndef on_bars_bar_closed(self, args):\n    api.Print(f\"Bar closed on {args.Bars.SymbolName} {args.Bars.TimeFrame}, bars count: {args.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarClosedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarClosedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarClosedEventArgs.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.BarClosedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Bars Bars {get;}","python":"barClosedEventArgs.Bars: Bars","summary":"Gets the bar data.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dailyBars = MarketData.GetBars(TimeFrame.Daily, \"EURUSD\");\n    dailyBars.BarClosed += OnDailyBarClosed;\n}\n\nprivate void OnDailyBarClosed(BarClosedEventArgs args)\n{\n    Print(\"{0} daily bar closed, last close price: {1}\", args.Bars.SymbolName, args.Bars.ClosePrices.LastValue);\n}","python":"def on_start(self):\n    self.daily_bars = api.MarketData.GetBars(TimeFrame.Daily, \"EURUSD\")\n    self.daily_bars.BarClosed += self.on_daily_bar_closed\n\ndef on_daily_bar_closed(self, args):\n    api.Print(f\"{args.Bars.SymbolName} daily bar closed, last close price: {args.Bars.ClosePrices.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarClosedEventArgs/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarClosedEventArgs/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.BarOpenedEventArgs","kind":"class","name":"BarOpenedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class BarOpenedEventArgs","python":"BarOpenedEventArgs","summary":"Provides data for the event when a new bar opened on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Bars object BarOpened event BarOpenedEventArgs\n    public partial class BarOpenedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Bars.BarOpened += Bars_BarOpened;\n        }\n\n        // This method will be called if a new bar opens\n        // BarOpenedEventArgs has a Bars property the you can use to get Bars object\n        private void Bars_BarOpened(BarOpenedEventArgs obj)\n        {\n            var newOpenedBar = obj.Bars.LastBar; // Or you can use obj.Bars[Bars.Count - 1] or obj.Bars.Last(0)\n            var closedBar = obj.Bars.Last(1); // Or you can use obj.Bars[Bars.Count - 2]\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Bars.BarOpened += self.on_bar_opened\n\n    def on_bar_opened(self, args):\n        # Or you can use args.Bars[Bars.Count - 1] or args.Bars.Last(0)\n        newOpenedBar = args.Bars.LastBar\n         # Or you can use args.Bars[Bars.Count - 2]\n        closedBar = args.Bars.Last(1)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarOpenedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarOpenedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOpenedEventArgs.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.BarOpenedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Bars Bars {get;}","python":"barOpenedEventArgs.Bars: Bars","summary":"Gets the bar data.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.BarOpened += OnBarsBarOpened;\n}\n\nprivate void OnBarsBarOpened(BarOpenedEventArgs args)\n{\n    Print(\"New bar opened at {0}, previous bar close: {1}\", args.Bars.LastBar.OpenTime, args.Bars.Last(1).Close);\n}","python":"def on_start(self):\n    api.Bars.BarOpened += self.on_bars_bar_opened\n\ndef on_bars_bar_opened(self, args):\n    api.Print(f\"New bar opened at {args.Bars.LastBar.OpenTime}, previous bar close: {args.Bars.Last(1).Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarOpenedEventArgs/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarOpenedEventArgs/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.BarOutputAttribute","kind":"class","name":"BarOutputAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class BarOutputAttribute : Attribute","python":"BarOutputAttribute","summary":"This attribute is used for marking an indicator IndicatorBars property as a bar Output.","remarks":"Marks a IndicatorBars property as output to be displayed on the chart or panel below. To make it effective please apply this attribute in front of the declaration of the IndicatorBars to be displayed.","parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo;\n\npublic partial class BarsOutputSample : Indicator\n{\n    private ExponentialMovingAverage _openEma;\n    private ExponentialMovingAverage _highEma;\n    private ExponentialMovingAverage _lowEma;\n    private ExponentialMovingAverage _closeEma;\n\n    protected override void Initialize()\n    {\n        _openEma = Indicators.ExponentialMovingAverage(Bars.OpenPrices, EmaPeriods);\n        _highEma = Indicators.ExponentialMovingAverage(Bars.HighPrices, EmaPeriods);\n        _lowEma = Indicators.ExponentialMovingAverage(Bars.LowPrices, EmaPeriods);\n        _closeEma = Indicators.ExponentialMovingAverage(Bars.ClosePrices, EmaPeriods);\n    }\n\n    public override void Calculate(int index)\n    {\n        Result[index] = new(\n            _openEma.Result[index],\n            _highEma.Result[index],\n            _lowEma.Result[index],\n            _closeEma.Result[index],\n            Convert.ToInt64(Bars.TickVolumes[index]));\n    }\n}","python":"class BarsOutputSample():\n    def initialize(self):\n        self.openEma = api.Indicators.ExponentialMovingAverage(api.Bars.OpenPrices, api.EmaPeriods)\n        self.highEma = api.Indicators.ExponentialMovingAverage(api.Bars.HighPrices, api.EmaPeriods)\n        self.lowEma = api.Indicators.ExponentialMovingAverage(api.Bars.LowPrices, api.EmaPeriods)\n        self.closeEma = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, api.EmaPeriods)\n\n    def calculate(self, index):\n        api.Result[index] = OhlcvBar(self.openEma.Result[index], self.highEma.Result[index], self.lowEma.Result[index], self.closeEma.Result[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"Parameters\": [\n    {\n      \"Name\": \"EmaPeriods\",\n      \"DisplayName\": \"EMA Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9\n    }\n  ],\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.BarOutputAttribute.#ctor(System.String)","kind":"constructor","name":"BarOutputAttribute","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public BarOutputAttribute(string name)","python":"BarOutputAttribute(name: str)","summary":"Initializes a new instance of the BarOutputAttribute and sets the name.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":""}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.AreaChartFillColor","kind":"property","name":"AreaChartFillColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string AreaChartFillColor {get; set;}","python":"barOutputAttribute.AreaChartFillColor: str","summary":"Gets or sets the color of the area chart.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"ChartType\": \"Area\",\n      \"AreaChartFillColor\": \"#552196F3\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/AreaChartFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/AreaChartFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.BearFillColor","kind":"property","name":"BearFillColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string BearFillColor {get; set;}","python":"barOutputAttribute.BearFillColor: str","summary":"Gets or sets the color of the bear candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"BearFillColor\": \"#FF8B0000\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BearFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BearFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.BearOutlineColor","kind":"property","name":"BearOutlineColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string BearOutlineColor {get; set;}","python":"barOutputAttribute.BearOutlineColor: str","summary":"Gets or sets the color of the bear candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"BearOutlineColor\": \"#FFFF0000\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BearOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BearOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.BullFillColor","kind":"property","name":"BullFillColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string BullFillColor {get; set;}","python":"barOutputAttribute.BullFillColor: str","summary":"Gets or sets the color of the bull candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"BullFillColor\": \"LimeGreen\",\n      \"BearFillColor\": \"OrangeRed\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BullFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BullFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.BullOutlineColor","kind":"property","name":"BullOutlineColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string BullOutlineColor {get; set;}","python":"barOutputAttribute.BullOutlineColor: str","summary":"Gets or sets the color of the bull candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"BullOutlineColor\": \"Green\",\n      \"BearOutlineColor\": \"Red\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BullOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/BullOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.ChartType","kind":"property","name":"ChartType","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public ChartType ChartType {get; set;}","python":"barOutputAttribute.ChartType: ChartType","summary":"Gets or sets the type of the chart - Bar, Candlesticks, Line or Dots chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"ChartType\": \"Bars\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.Description","kind":"property","name":"Description","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Description {get; set;}","python":"barOutputAttribute.Description: str","summary":"Gets or sets description for output that will be shown in UI.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Description\": \"Bars rebuilt from the chart prices\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Description/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Description/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.DotChartColor","kind":"property","name":"DotChartColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string DotChartColor {get; set;}","python":"barOutputAttribute.DotChartColor: str","summary":"Gets or sets the color of the dot chart.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"ChartType\": \"Dots\",\n      \"DotChartColor\": \"Gold\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/DotChartColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/DotChartColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.IsColorCustomizable","kind":"property","name":"IsColorCustomizable","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsColorCustomizable {get; set;}","python":"barOutputAttribute.IsColorCustomizable: bool","summary":"Gets or sets if Output line color is customizable or not.","remarks":"This property is useful when you are setting color manually with code via SetBarAppearance method.","parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"IsColorCustomizable\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsColorCustomizable/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsColorCustomizable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.IsLastValueVisibleInTitle","kind":"property","name":"IsLastValueVisibleInTitle","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsLastValueVisibleInTitle {get; set;}","python":"barOutputAttribute.IsLastValueVisibleInTitle: bool","summary":"Gets or sets if output last value should be visible or not in instance title (default: true).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"IsLastValueVisibleInTitle\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsLastValueVisibleInTitle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsLastValueVisibleInTitle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsVisible {get; set;}","python":"barOutputAttribute.IsVisible: bool","summary":"Gets or sets default visibility of output.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"IsVisible\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.Name","kind":"property","name":"Name","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Name {get;}","python":"barOutputAttribute.Name: str","summary":"The output name","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var close = (Bars.OpenPrices[index] + Bars.HighPrices[index] + Bars.LowPrices[index] + Bars.ClosePrices[index]) / 4;\n        SmoothedBars[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], close, (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    close = (api.Bars.OpenPrices[index] + api.Bars.HighPrices[index] + api.Bars.LowPrices[index] + api.Bars.ClosePrices[index]) / 4\n    api.SmoothedBars[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], close, int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"SmoothedBars\",\n      \"DisplayName\": \"Smoothed Bars\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarOutputAttribute.TickVolumeColor","kind":"property","name":"TickVolumeColor","type":"T:cAlgo.API.BarOutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string TickVolumeColor {get; set;}","python":"barOutputAttribute.TickVolumeColor: str","summary":"Gets or sets the color of the tick volume bars.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarOutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"TickVolumeColor\": \"SteelBlue\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/TickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/BarOutputAttribute/TickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Bars","kind":"interface","name":"Bars","type":null,"namespace":"cAlgo.API","group":"Bars","csharp":"public interface Bars","python":"Bars","summary":"Represents the Bars interface - the collection of Bar objects.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\n\nnamespace cAlgo\n{\n    // A sample indicator that shows how to use Bars\n    public partial class BarsSample : Indicator\n    {\n        private TextBlock _barTicksNumberTextBlock, _barsStateTextBlock;\n\n        protected override void Initialize()\n        {\n            // Bars events\n            Bars.BarOpened += Bars_BarOpened;\n\n            Bars.Tick += Bars_Tick;\n\n            Bars.HistoryLoaded += Bars_HistoryLoaded;\n\n            Bars.Reloaded += Bars_Reloaded;\n\n            var grid = new Grid(2, 2)\n            {\n                BackgroundColor = Color.DarkGoldenrod,\n                HorizontalAlignment = HorizontalAlignment.Right,\n                VerticalAlignment = VerticalAlignment.Top,\n                Opacity = 0.5\n            };\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Bar Ticks #\",\n                Margin = 5\n            }, 0, 0);\n\n            _barTicksNumberTextBlock = new TextBlock\n            {\n                Text = \"0\",\n                Margin = 5\n            };\n\n            grid.AddChild(_barTicksNumberTextBlock, 0, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Bars State\",\n                Margin = 5\n            }, 1, 0);\n\n            _barsStateTextBlock = new TextBlock\n            {\n                Margin = 5\n            };\n\n            grid.AddChild(_barsStateTextBlock, 1, 1);\n\n            IndicatorArea.AddControl(grid);\n        }\n\n        private void Bars_Reloaded(BarsHistoryLoadedEventArgs obj)\n        {\n            _barsStateTextBlock.Text = \"Reloaded\";\n        }\n\n        private void Bars_HistoryLoaded(BarsHistoryLoadedEventArgs obj)\n        {\n            _barsStateTextBlock.Text = \"History Loaded\";\n        }\n\n        private void Bars_Tick(BarsTickEventArgs obj)\n        {\n            _barTicksNumberTextBlock.Text = Bars.TickVolumes.LastValue.ToString();\n        }\n\n        private void Bars_BarOpened(BarOpenedEventArgs obj)\n        {\n            _barsStateTextBlock.Text = \"New Bar Opened\";\n        }\n\n        public override void Calculate(int index)\n        {\n            Range[index] = Bars.HighPrices[index] - Bars.LowPrices[index];\n            Body[index] = Math.Abs(Bars.ClosePrices[index] - Bars.OpenPrices[index]);\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\ndef getTextBlock(text):\n    textBlock = TextBlock()\n    textBlock.Text = text\n    textBlock.Margin = Thickness(5)\n    return textBlock\n\nclass BarsSample():\n    def initialize(self):\n        api.Bars.BarOpened += self.barOpened\n        api.Bars.Tick += self.barsTick\n        api.Bars.HistoryLoaded += self.barsHistoryLoaded\n        api.Bars.Reloaded += self.barsReloaded\n\n        grid = Grid(2, 2)\n        grid.BackgroundColor = Color.DarkGoldenrod\n        grid.HorizontalAlignment = HorizontalAlignment.Right\n        grid.VerticalAlignment = VerticalAlignment.Top\n        grid.Opacity = 0.5\n\n        grid.AddChild(getTextBlock(\"Bar Ticks #\"), 0, 0)\n\n        self.barTicksNumberTextBlock = getTextBlock(\"0\")\n\n        grid.AddChild(self.barTicksNumberTextBlock, 0, 1)\n        grid.AddChild(getTextBlock(\"Bars State\"), 1, 0)\n\n        self.barsStateTextBlock = getTextBlock(\"\")\n\n        grid.AddChild(self.barsStateTextBlock, 1, 1)\n\n        api.IndicatorArea.AddControl(grid)\n\n    def calculate(self, index):\n        api.Range[index] = api.Bars.HighPrices[index] - api.Bars.LowPrices[index]\n        api.Body[index] = abs(api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index])\n\n    def barOpened(self, args):\n        self.barsStateTextBlock.Text = \"New Bar Opened\"\n\n    def barsTick(self, args):\n        self.barTicksNumberTextBlock.Text = str(api.Bars.TickVolumes.LastValue)\n\n    def barsHistoryLoaded(self, args):\n        self.barsStateTextBlock.Text = \"History Loaded\"\n\n    def barsReloaded(self, args):\n        self.barsStateTextBlock.Text = \"Reloaded\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Range\",\n      \"Color\": \"RoyalBlue\"\n    },\n    {\n      \"Name\": \"Body\",\n      \"Color\": \"Yellow\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.GetSeries(cAlgo.API.StandardSeriesType)","kind":"method","name":"GetSeries","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries GetSeries(StandardSeriesType standardSeriesType)","python":"api.Bars.GetSeries(standardSeriesType: StandardSeriesType) -> DataSeries","summary":"Returns a data series from current Bars based on the passed StandardSeriesType.","remarks":null,"parameters":[{"name":"standardSeriesType","csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"Standard series type"}],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"Standard series DataSeries","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var dataSeries = Bars.GetSeries(SeriesType);\n\n        Print(dataSeries.Count);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        medianPrices = api.Bars.GetSeries(StandardSeriesType.Median)\n        print(medianPrices.Count)","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"SeriesType\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.StandardSeriesType\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/GetSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/GetSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.GetServerFirstBarOpenTime","kind":"method","name":"GetServerFirstBarOpenTime","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DateTime GetServerFirstBarOpenTime()","python":"api.Bars.GetServerFirstBarOpenTime() -> DateTime","summary":"Returns the first available server bar open time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"DateTime of first server bar open time","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"First server bar opened at {0}, first loaded bar opened at {1}\", Bars.GetServerFirstBarOpenTime(), Bars.OpenTimes[0]);","python":"api.Print(f\"First server bar opened at {api.Bars.GetServerFirstBarOpenTime()}, first loaded bar opened at {api.Bars.OpenTimes[0]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/GetServerFirstBarOpenTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/GetServerFirstBarOpenTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.Last(System.Int32)","kind":"method","name":"Last","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"Bar Last(int index)","python":"api.Bars.Last(index: int) -> Bar","summary":"Gets the bar from the end of the collection.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The last bar index from the end of Bars"}],"returns":{"csharpType":"Bar","pythonType":"Bar","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var previousBar = Bars.Last(1);\nPrint(\"Previous bar: open {0}, close {1}\", previousBar.Open, previousBar.Close);","python":"previousBar = api.Bars.Last(1)\napi.Print(f\"Previous bar: open {previousBar.Open}, close {previousBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Last/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Last/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.LoadMoreHistory","kind":"method","name":"LoadMoreHistory","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"int LoadMoreHistory()","python":"api.Bars.LoadMoreHistory() -> int","summary":"Loads more historical bars. Method returns the number of loaded bars that were added to the beginning of the collection.","remarks":"If used in indicator it will restart indicator as it adds more bars to Chart.","parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var loadedCount = Bars.LoadMoreHistory();\nPrint(\"Loaded {0} more bars, total: {1}\", loadedCount, Bars.Count);","python":"loadedCount = api.Bars.LoadMoreHistory()\napi.Print(f\"Loaded {loadedCount} more bars, total: {api.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistory/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.LoadMoreHistoryAsync","kind":"method","name":"LoadMoreHistoryAsync","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"void LoadMoreHistoryAsync()","python":"api.Bars.LoadMoreHistoryAsync() -> None","summary":"Loads more historical bars asynchronously.","remarks":"If used in indicator it will restart indicator as it adds more bars to Chart.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Bars.HistoryLoaded += args => Print(\"Loaded {0} more bars\", args.Count);\nBars.LoadMoreHistoryAsync();","python":"api.Bars.HistoryLoaded += lambda args: api.Print(f\"Loaded {args.Count} more bars\")\napi.Bars.LoadMoreHistoryAsync()"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistoryAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistoryAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.LoadMoreHistoryAsync(System.Action{cAlgo.API.BarsHistoryLoadedEventArgs})","kind":"method","name":"LoadMoreHistoryAsync","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"void LoadMoreHistoryAsync(Action<BarsHistoryLoadedEventArgs> callback)","python":"api.Bars.LoadMoreHistoryAsync(callback: Callable[[BarsHistoryLoadedEventArgs], None]) -> None","summary":"Loads more historical bars asynchronously.","remarks":"If used in indicator it will restart indicator as it adds more bars to Chart.","parameters":[{"name":"callback","csharpType":"Action<BarsHistoryLoadedEventArgs>","pythonType":"Callable[[BarsHistoryLoadedEventArgs], None]","summary":"The callback that will be called after history loaded"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Bars.LoadMoreHistoryAsync(args => Print(\"Loaded {0} more bars, total: {1}\", args.Count, args.Bars.Count));","python":"api.Bars.LoadMoreHistoryAsync(lambda args: api.Print(f\"Loaded {args.Count} more bars, total: {args.Bars.Count}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistoryAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LoadMoreHistoryAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.AveragePrices","kind":"property","name":"AveragePrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries AveragePrices {get;}","python":"api.Bars.AveragePrices: DataSeries","summary":"Gets the average prices data (Open + High + Low + Close) / 4.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"Print(\"Average price (O+H+L+C)/4 of the last closed bar: {0}\", Bars.AveragePrices.Last(1));","python":"api.Print(f\"Average price (O+H+L+C)/4 of the last closed bar: {api.Bars.AveragePrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/AveragePrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/AveragePrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.ClosePrices","kind":"property","name":"ClosePrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries ClosePrices {get;}","python":"api.Bars.ClosePrices: DataSeries","summary":"Gets the Close price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);\nif (Bars.ClosePrices.Last(1) > sma.Result.Last(1))\n    Print(\"Last bar closed above the 50 period SMA\");","python":"sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 50)\nif api.Bars.ClosePrices.Last(1) > sma.Result.Last(1):\n    api.Print(\"Last bar closed above the 50 period SMA\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/ClosePrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/ClosePrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"int Count {get;}","python":"api.Bars.Count: int","summary":"Gets the number of bars.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Loaded bars: {0}\", Bars.Count);","python":"api.Print(f\"Loaded bars: {api.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.HighPrices","kind":"property","name":"HighPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries HighPrices {get;}","python":"api.Bars.HighPrices: DataSeries","summary":"Gets the High price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var highest = double.MinValue;\nfor (var i = 1; i <= 20; i++)\n    highest = Math.Max(highest, Bars.HighPrices.Last(i));\nPrint(\"Highest high of the last 20 closed bars: {0}\", highest);","python":"highest = max(api.Bars.HighPrices.Last(i) for i in range(1, 21))\napi.Print(f\"Highest high of the last 20 closed bars: {highest}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/HighPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/HighPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"Bar Item {get;}","python":"api.Bars[index: int] -> Bar","summary":"Returns a bar based on it is index","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The bar index"}],"returns":{"csharpType":"Bar","pythonType":"Bar","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var firstBar = Bars[0];\nPrint(\"First loaded bar opened at {0}, close: {1}\", firstBar.OpenTime, firstBar.Close);","python":"firstBar = api.Bars[0]\napi.Print(f\"First loaded bar opened at {firstBar.OpenTime}, close: {firstBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.LastBar","kind":"property","name":"LastBar","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"Bar LastBar {get;}","python":"api.Bars.LastBar: Bar","summary":"Gets the last bar in the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Bar","pythonType":"Bar","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastBar = Bars.LastBar;\nPrint(\"Current bar opened at {0}, current close: {1}\", lastBar.OpenTime, lastBar.Close);","python":"lastBar = api.Bars.LastBar\napi.Print(f\"Current bar opened at {lastBar.OpenTime}, current close: {lastBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LastBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LastBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.LowPrices","kind":"property","name":"LowPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries LowPrices {get;}","python":"api.Bars.LowPrices: DataSeries","summary":"Gets the Low price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lowest = double.MaxValue;\nfor (var i = 1; i <= 20; i++)\n    lowest = Math.Min(lowest, Bars.LowPrices.Last(i));\nPrint(\"Lowest low of the last 20 closed bars: {0}\", lowest);","python":"lowest = min(api.Bars.LowPrices.Last(i) for i in range(1, 21))\napi.Print(f\"Lowest low of the last 20 closed bars: {lowest}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LowPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/LowPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.MedianPrices","kind":"property","name":"MedianPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries MedianPrices {get;}","python":"api.Bars.MedianPrices: DataSeries","summary":"Gets the Median prices data (High + Low) / 2.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ema = Indicators.ExponentialMovingAverage(Bars.MedianPrices, 20);\nPrint(\"EMA of median prices: {0}\", ema.Result.LastValue);","python":"ema = api.Indicators.ExponentialMovingAverage(api.Bars.MedianPrices, 20)\napi.Print(f\"EMA of median prices: {ema.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/MedianPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/MedianPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.OpenPrices","kind":"property","name":"OpenPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries OpenPrices {get;}","python":"api.Bars.OpenPrices: DataSeries","summary":"Gets the Open price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current bar open: {0}, previous bar open: {1}\", Bars.OpenPrices.LastValue, Bars.OpenPrices.Last(1));","python":"api.Print(f\"Current bar open: {api.Bars.OpenPrices.LastValue}, previous bar open: {api.Bars.OpenPrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/OpenPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/OpenPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.OpenTimes","kind":"property","name":"OpenTimes","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"TimeSeries OpenTimes {get;}","python":"api.Bars.OpenTimes: TimeSeries","summary":"Gets the open bar time data.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSeries","pythonType":"TimeSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.OpenTimes.GetIndexByTime(Server.Time.AddDays(-1));\nPrint(\"Bar one day ago: index {0}, opened at {1}\", index, Bars.OpenTimes[index]);","python":"index = api.Bars.OpenTimes.GetIndexByTime(api.Server.Time.AddDays(-1))\napi.Print(f\"Bar one day ago: index {index}, opened at {api.Bars.OpenTimes[index]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/OpenTimes/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/OpenTimes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"string SymbolName {get;}","python":"api.Bars.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var eurUsdBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\nPrint(\"Bars symbol: {0}\", eurUsdBars.SymbolName);","python":"eurUsdBars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\napi.Print(f\"Bars symbol: {eurUsdBars.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.TickVolumes","kind":"property","name":"TickVolumes","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries TickVolumes {get;}","python":"api.Bars.TickVolumes: DataSeries","summary":"Gets the Tick volumes data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Tick volume of the last closed bar: {0}\", Bars.TickVolumes.Last(1));","python":"api.Print(f\"Tick volume of the last closed bar: {api.Bars.TickVolumes.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TickVolumes/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TickVolumes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"TimeFrame TimeFrame {get;}","python":"api.Bars.TimeFrame: TimeFrame","summary":"Get the timeframe.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nPrint(\"Bars time frame: {0}\", dailyBars.TimeFrame);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\napi.Print(f\"Bars time frame: {dailyBars.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.TypicalPrices","kind":"property","name":"TypicalPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries TypicalPrices {get;}","python":"api.Bars.TypicalPrices: DataSeries","summary":"Gets the Typical prices data (High + Low + Close) / 3.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Typical price (H+L+C)/3 of the last closed bar: {0}\", Bars.TypicalPrices.Last(1));","python":"api.Print(f\"Typical price (H+L+C)/3 of the last closed bar: {api.Bars.TypicalPrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TypicalPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/TypicalPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Bars.WeightedPrices","kind":"property","name":"WeightedPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries WeightedPrices {get;}","python":"api.Bars.WeightedPrices: DataSeries","summary":"Gets the Weighted prices data (High + Low + 2 * Close) / 4.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Weighted price (H+L+2*C)/4 of the last closed bar: {0}\", Bars.WeightedPrices.Last(1));","python":"api.Print(f\"Weighted price (H+L+2*C)/4 of the last closed bar: {api.Bars.WeightedPrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/WeightedPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/WeightedPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Bars.BarClosed","kind":"event","name":"BarClosed","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"event Action<BarClosedEventArgs> BarClosed;","python":"api.Bars.BarClosed += handler  # handler(obj: BarClosedEventArgs)","summary":"Occurs when a new bar is opened; the event is called for the previous (closed) bar.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BarClosedEventArgs>","pythonType":"Callable[[BarClosedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.BarClosed += OnBarClosed;\n}\n\nprivate void OnBarClosed(BarClosedEventArgs args)\n{\n    var closedBar = args.Bars.Last(1);\n    Print(\"Bar closed: open {0}, close {1}\", closedBar.Open, closedBar.Close);\n}","python":"def on_start(self):\n    api.Bars.BarClosed += self.on_bar_closed\n\ndef on_bar_closed(self, args):\n    closedBar = args.Bars.Last(1)\n    api.Print(f\"Bar closed: open {closedBar.Open}, close {closedBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/BarClosed/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/BarClosed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Bars.BarOpened","kind":"event","name":"BarOpened","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"event Action<BarOpenedEventArgs> BarOpened;","python":"api.Bars.BarOpened += handler  # handler(obj: BarOpenedEventArgs)","summary":"Occurs when the last bar is closed and a new bar is opened.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BarOpenedEventArgs>","pythonType":"Callable[[BarOpenedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var hourlyBars = MarketData.GetBars(TimeFrame.Hour);\n    hourlyBars.BarOpened += OnHourlyBarOpened;\n}\n\nprivate void OnHourlyBarOpened(BarOpenedEventArgs args)\n{\n    Print(\"New hourly bar opened at {0}\", args.Bars.LastBar.OpenTime);\n}","python":"def on_start(self):\n    hourlyBars = api.MarketData.GetBars(TimeFrame.Hour)\n    hourlyBars.BarOpened += self.on_hourly_bar_opened\n\ndef on_hourly_bar_opened(self, args):\n    api.Print(f\"New hourly bar opened at {args.Bars.LastBar.OpenTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/BarOpened/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/BarOpened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Bars.HistoryLoaded","kind":"event","name":"HistoryLoaded","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"event Action<BarsHistoryLoadedEventArgs> HistoryLoaded;","python":"api.Bars.HistoryLoaded += handler  # handler(obj: BarsHistoryLoadedEventArgs)","summary":"Occurs when more history is loaded due to chart scroll on the left or due to API call.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BarsHistoryLoadedEventArgs>","pythonType":"Callable[[BarsHistoryLoadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.HistoryLoaded += OnBarsHistoryLoaded;\n}\n\nprivate void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)\n{\n    Print(\"{0} older bars loaded, total: {1}\", args.Count, args.Bars.Count);\n}","python":"def on_start(self):\n    api.Bars.HistoryLoaded += self.on_bars_history_loaded\n\ndef on_bars_history_loaded(self, args):\n    api.Print(f\"{args.Count} older bars loaded, total: {args.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/HistoryLoaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/HistoryLoaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Bars.Reloaded","kind":"event","name":"Reloaded","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"event Action<BarsHistoryLoadedEventArgs> Reloaded;","python":"api.Bars.Reloaded += handler  # handler(obj: BarsHistoryLoadedEventArgs)","summary":"Occurs when bars are refreshed due to reconnect.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BarsHistoryLoadedEventArgs>","pythonType":"Callable[[BarsHistoryLoadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.Reloaded += OnBarsReloaded;\n}\n\nprivate void OnBarsReloaded(BarsHistoryLoadedEventArgs args)\n{\n    Print(\"Bars reloaded after reconnect, total: {0}\", args.Bars.Count);\n}","python":"def on_start(self):\n    api.Bars.Reloaded += self.on_bars_reloaded\n\ndef on_bars_reloaded(self, args):\n    api.Print(f\"Bars reloaded after reconnect, total: {args.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Reloaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Reloaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Bars.Tick","kind":"event","name":"Tick","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"event Action<BarsTickEventArgs> Tick;","python":"api.Bars.Tick += handler  # handler(obj: BarsTickEventArgs)","summary":"Occurs when a new Tick arrives.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<BarsTickEventArgs>","pythonType":"Callable[[BarsTickEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var eurUsdBars = MarketData.GetBars(TimeFrame.Minute, \"EURUSD\");\n    eurUsdBars.Tick += OnEurUsdBarsTick;\n}\n\nprivate void OnEurUsdBarsTick(BarsTickEventArgs args)\n{\n    Print(\"EURUSD tick, current close: {0}, new bar: {1}\", args.Bars.LastBar.Close, args.IsBarOpened);\n}","python":"def on_start(self):\n    eurUsdBars = api.MarketData.GetBars(TimeFrame.Minute, \"EURUSD\")\n    eurUsdBars.Tick += self.on_eur_usd_bars_tick\n\ndef on_eur_usd_bars_tick(self, args):\n    api.Print(f\"EURUSD tick, current close: {args.Bars.LastBar.Close}, new bar: {args.IsBarOpened}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Tick/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/Tick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Bars.GetPrices(cAlgo.API.PriceType)","kind":"method","name":"GetPrices","type":"T:cAlgo.API.Bars","namespace":"cAlgo.API","group":"Bars","csharp":"DataSeries GetPrices(PriceType priceType)","python":"api.Bars.GetPrices(priceType: PriceType) -> DataSeries","summary":"Returns a data series from current Bars based on passed PriceType.","remarks":null,"parameters":[{"name":"priceType","csharpType":"PriceType","pythonType":"PriceType","summary":"Price Type"}],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"Price Type DataSeries","nullable":false},"exceptions":[],"since":null,"deprecated":"Use GetSeries(StandardSeriesType) instead.","examples":[{"csharp":"// GetPrices is obsolete, use GetSeries with a StandardSeriesType instead\nvar medianPrices = Bars.GetSeries(StandardSeriesType.Median);\nPrint(\"Median price of the last closed bar: {0}\", medianPrices.Last(1));","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        # GetPrices is obsolete, use GetSeries with a StandardSeriesType instead\n        medianPrices = api.Bars.GetSeries(StandardSeriesType.Median)\n        api.Print(f\"Median price of the last closed bar: {medianPrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.BarsHistoryLoadedEventArgs","kind":"class","name":"BarsHistoryLoadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class BarsHistoryLoadedEventArgs","python":"BarsHistoryLoadedEventArgs","summary":"Provides data for the history loaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample indicator shows how to use BarsHistoryLoadedEventArgs\n    public partial class BarsHistoryLoadedEventArgsSample : Robot\n    {\n        protected override void OnStart()\n        {\n            Bars.HistoryLoaded += Bars_HistoryLoaded;\n\n            // You can load more bars by calling this method or LoadMoreHistory\n            Bars.LoadMoreHistoryAsync();\n        }\n\n        // This method will be called if you scroll left on your chart and load more data\n        // Or if you call the Bars.LoadMoreHistory/LoadMoreHistoryAsync methods\n        // BarsHistoryLoadedEventArgs has two properties\n        // BarsHistoryLoadedEventArgs.Bars refers to the bars object that it is history is loaded\n        // BarsHistoryLoadedEventArgs.Count gives you the number of bars that has been loaded\n        private void Bars_HistoryLoaded(BarsHistoryLoadedEventArgs obj)\n        {\n            Print(\"Loaded Bars Count: {0}\", obj.Count);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.Bars.HistoryLoaded += self.on_bars_history_loaded\n        # You can load more bars by calling this method or LoadMoreHistory\n        api.Bars.LoadMoreHistoryAsync()\n\n    def on_bars_history_loaded(self, args):\n        print(f\"Loaded Bars Count: {args.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarsHistoryLoadedEventArgs.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.BarsHistoryLoadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Bars Bars {get;}","python":"barsHistoryLoadedEventArgs.Bars: Bars","summary":"Gets the bar objects data.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.HistoryLoaded += OnBarsHistoryLoaded;\n    Bars.LoadMoreHistoryAsync();\n}\n\nprivate void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)\n{\n    Print(\"{0} {1} now has {2} bars, first bar opened at {3}\", args.Bars.SymbolName, args.Bars.TimeFrame, args.Bars.Count, args.Bars[0].OpenTime);\n}","python":"def on_start(self):\n    api.Bars.HistoryLoaded += self.on_bars_history_loaded\n    api.Bars.LoadMoreHistoryAsync()\n\ndef on_bars_history_loaded(self, args):\n    api.Print(f\"{args.Bars.SymbolName} {args.Bars.TimeFrame} now has {args.Bars.Count} bars, first bar opened at {args.Bars[0].OpenTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarsHistoryLoadedEventArgs.Count","kind":"property","name":"Count","type":"T:cAlgo.API.BarsHistoryLoadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int Count {get;}","python":"barsHistoryLoadedEventArgs.Count: int","summary":"Gets the number of bars.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.HistoryLoaded += OnBarsHistoryLoaded;\n    Bars.LoadMoreHistoryAsync();\n}\n\nprivate void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)\n{\n    Print(\"Loaded {0} more bars\", args.Count);\n}","python":"def on_start(self):\n    api.Bars.HistoryLoaded += self.on_bars_history_loaded\n    api.Bars.LoadMoreHistoryAsync()\n\ndef on_bars_history_loaded(self, args):\n    api.Print(f\"Loaded {args.Count} more bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsHistoryLoadedEventArgs/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.BarsTickEventArgs","kind":"class","name":"BarsTickEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class BarsTickEventArgs","python":"BarsTickEventArgs","summary":"Provides data for the tick bar event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.Tick += OnBarsTick;\n}\n\nprivate void OnBarsTick(BarsTickEventArgs args)\n{\n    var lastBar = args.Bars.LastBar;\n    Print(\"{0} {1} tick | Close: {2} | First tick of a new bar: {3}\", args.Bars.SymbolName, args.Bars.TimeFrame, lastBar.Close, args.IsBarOpened);\n}","python":"def on_start(self):\n    api.Bars.Tick += self.on_bars_tick\n\ndef on_bars_tick(self, args):\n    last_bar = args.Bars.LastBar\n    api.Print(f\"{args.Bars.SymbolName} {args.Bars.TimeFrame} tick | Close: {last_bar.Close} | First tick of a new bar: {args.IsBarOpened}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarsTickEventArgs.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.BarsTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Bars Bars {get;}","python":"barsTickEventArgs.Bars: Bars","summary":"Gets the Bar objects data.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var hourBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\n    hourBars.Tick += OnHourBarsTick;\n}\n\nprivate void OnHourBarsTick(BarsTickEventArgs args)\n{\n    Print(\"{0} last close: {1}, bars count: {2}\", args.Bars.SymbolName, args.Bars.ClosePrices.LastValue, args.Bars.Count);\n}","python":"def on_start(self):\n    self.hour_bars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\n    self.hour_bars.Tick += self.on_hour_bars_tick\n\ndef on_hour_bars_tick(self, args):\n    api.Print(f\"{args.Bars.SymbolName} last close: {args.Bars.ClosePrices.LastValue}, bars count: {args.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.BarsTickEventArgs.IsBarOpened","kind":"property","name":"IsBarOpened","type":"T:cAlgo.API.BarsTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool IsBarOpened {get;}","python":"barsTickEventArgs.IsBarOpened: bool","summary":"Defines if current tick is the first tick of a new bar.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Bars.Tick += OnBarsTick;\n}\n\nprivate void OnBarsTick(BarsTickEventArgs args)\n{\n    if (args.IsBarOpened)\n        Print(\"New bar opened at {0}\", args.Bars.LastBar.OpenTime);\n}","python":"def on_start(self):\n    api.Bars.Tick += self.on_bars_tick\n\ndef on_bars_tick(self, args):\n    if args.IsBarOpened:\n        api.Print(f\"New bar opened at {args.Bars.LastBar.OpenTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/IsBarOpened/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/BarsTickEventArgs/IsBarOpened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.BearsPower","kind":"interface","name":"BearsPower","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface BearsPower","python":"BearsPower","summary":"The calculation of the Bears Power.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private BearsPower _bearsPower;\n\nprotected override void OnStart()\n{\n    _bearsPower = Indicators.BearsPower(13, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Bears Power: {0}\", _bearsPower.Result.Last(1));\n}","python":"def on_start(self):\n    self.bearsPower = api.Indicators.BearsPower(13, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"Bears Power: {self.bearsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BearsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BearsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.BearsPower.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.BearsPower","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"bearsPower.Result: IndicatorDataSeries","summary":"The histogram (bar graph). It shows the maximum bearish strength during the time period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bearsPower = Indicators.BearsPower(13, MovingAverageType.Exponential);\nif (bearsPower.Result.Last(1) < 0)\n    Print(\"Bears are in control: {0}\", bearsPower.Result.Last(1));","python":"bearsPower = api.Indicators.BearsPower(13, MovingAverageType.Exponential)\nif bearsPower.Result.Last(1) < 0:\n    api.Print(f\"Bears are in control: {bearsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BearsPower/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BearsPower/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.BollingerBands","kind":"interface","name":"BollingerBands","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface BollingerBands","python":"BollingerBands","summary":"Bollinger Bands are used to confirm signals. The bands indicate overbought and oversold levels relative to a moving average.","remarks":"Bollinger bands widen in volatile market periods, and contract during less volatile periods. Tightening of the bands is often used a signal that there will shortly be a sharp increase in market volatility.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nPrint(\"Top: {0}, Main: {1}, Bottom: {2}\", bollingerBands.Top.LastValue, bollingerBands.Main.LastValue, bollingerBands.Bottom.LastValue);","python":"bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\napi.Print(f\"Top: {bollingerBands.Top.LastValue}, Main: {bollingerBands.Main.LastValue}, Bottom: {bollingerBands.Bottom.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Bollinger Bands indicator\n    public partial class BollingerBandsSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private BollingerBands _bollingerBands;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _bollingerBands = Indicators.BollingerBands(Source, 14, 2, MovingAverageType.Exponential);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.LowPrices.Last(1) <= _bollingerBands.Bottom.Last(1) && Bars.LowPrices.Last(2) > _bollingerBands.Bottom.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label);\n            }\n            else if (Bars.HighPrices.Last(1) >= _bollingerBands.Top.Last(1) && Bars.HighPrices.Last(2) < _bollingerBands.Top.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass BollingerBandsSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.bollingerBands = api.Indicators.BollingerBands(api.Source, 14, 2, MovingAverageType.Exponential)\n\n    def on_bar_closed(self):\n        if api.Bars.LowPrices.Last(0) <= self.bollingerBands.Bottom.Last(0) and api.Bars.LowPrices.Last(1) > self.bollingerBands.Bottom.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif api.Bars.HighPrices.Last(0) >= self.bollingerBands.Top.Last(0) and api.Bars.HighPrices.Last(1) < self.bollingerBands.Top.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    },\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.BollingerBands.Bottom","kind":"property","name":"Bottom","type":"T:cAlgo.API.Indicators.BollingerBands","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Bottom {get;}","python":"bollingerBands.Bottom: IndicatorDataSeries","summary":"Lower Bollinger Band.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Bottom Bollinger Band result.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nif (Bars.LowPrices.Last(1) <= bollingerBands.Bottom.Last(1))\n    Print(\"The last bar touched the Bottom band at {0}\", bollingerBands.Bottom.Last(1));","python":"bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nif api.Bars.LowPrices.Last(1) <= bollingerBands.Bottom.Last(1):\n    api.Print(f\"The last bar touched the Bottom band at {bollingerBands.Bottom.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Bottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Bottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.BollingerBands.Main","kind":"property","name":"Main","type":"T:cAlgo.API.Indicators.BollingerBands","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Main {get;}","python":"bollingerBands.Main: IndicatorDataSeries","summary":"Moving Average (Middle Bollinger Band).","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The main result.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nPrint(\"Current Main Bollinger Band's price is: {0}\", bollingerBands.Main.LastValue);","python":"bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\napi.Print(f\"Current Main Bollinger Band's price is: {bollingerBands.Main.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Main/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Main/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.BollingerBands.Top","kind":"property","name":"Top","type":"T:cAlgo.API.Indicators.BollingerBands","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Top {get;}","python":"bollingerBands.Top: IndicatorDataSeries","summary":"Upper Bollinger Band.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Upper Bollinger Band result.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nif (Bars.HighPrices.Last(1) >= bollingerBands.Top.Last(1))\n    Print(\"The last bar touched the Top band at {0}\", bollingerBands.Top.Last(1));","python":"bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nif api.Bars.HighPrices.Last(1) >= bollingerBands.Top.Last(1):\n    api.Print(f\"The last bar touched the Top band at {bollingerBands.Top.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BollingerBands/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Border","kind":"class","name":"Border","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class Border : ControlBase","python":"Border","summary":"Represents the border.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // A sample indicator that shows how to use Border chart control\n    public partial class BorderSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var border = new Border\n            {\n                BorderColor = Color.Yellow,\n                BorderThickness = 2,\n                Opacity = 0.5,\n                BackgroundColor = Color.Violet,\n                HorizontalAlignment = HorizontalAlignment.Right,\n                VerticalAlignment = VerticalAlignment.Bottom,\n                Width = 200,\n                Height = 100,\n                Margin = 10\n            };\n\n            var stackPanel = new StackPanel\n            {\n                Orientation = Orientation.Vertical\n            };\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Text\",\n                Margin = 5,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            stackPanel.AddChild(new Button\n            {\n                Text = \"Button\",\n                Margin = 5,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            stackPanel.AddChild(new TextBox\n            {\n                Text = \"Type text...\",\n                Margin = 5,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                FontWeight = FontWeight.ExtraBold,\n                Width = 100\n            });\n\n            border.Child = stackPanel;\n\n            Chart.AddControl(border);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        border = Border()\n        border.BorderColor = Color.Yellow\n        border.BorderThickness = Thickness(2)\n        border.Opacity = 0.5\n        border.BackgroundColor = Color.Violet\n        border.HorizontalAlignment = HorizontalAlignment.Right\n        border.VerticalAlignment = VerticalAlignment.Bottom\n        border.Width = 200\n        border.Height = 100\n        border.Margin = Thickness(10)\n\n        stackPanel = StackPanel()\n        stackPanel.Orientation = Orientation.Vertical\n\n        textBlock = TextBlock()\n        textBlock.Margin = Thickness(5)\n        textBlock.Text = \"Text\"\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.HorizontalAlignment = HorizontalAlignment.Center\n\n        stackPanel.AddChild(textBlock)\n\n        button = Button()\n        button.Margin = Thickness(5)\n        button.Text = \"Button\"\n        button.FontWeight = FontWeight.ExtraBold\n        button.HorizontalAlignment = HorizontalAlignment.Center\n\n        stackPanel.AddChild(button)\n\n        textBox = TextBox()\n        textBox.Margin = Thickness(5)\n        textBox.FontWeight = FontWeight.ExtraBold\n        textBox.HorizontalAlignment = HorizontalAlignment.Center\n        textBox.Width = 100\n        textBox.Text = \"Type text...\"\n\n        stackPanel.AddChild(textBox)\n\n        border.Child = stackPanel\n\n        api.Chart.AddControl(border)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Border.#ctor","kind":"constructor","name":"Border","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public Border()","python":"Border()","summary":"Initializes a new instance of the Border class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BorderColor = Color.Gray, BorderThickness = 1, CornerRadius = 4, Padding = 8 };\nborder.Child = new TextBlock { Text = \"Balance: \" + Account.Balance };\nChart.AddControl(border);","python":"border = Border()\nborder.BorderColor = Color.Gray\nborder.BorderThickness = Thickness(1)\nborder.CornerRadius = CornerRadius(4)\nborder.Padding = Thickness(8)\ntextBlock = TextBlock()\ntextBlock.Text = f\"Balance: {api.Account.Balance}\"\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BackgroundColor {get; set;}","python":"border.BackgroundColor: Color","summary":"Gets or sets the color of the border background. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BackgroundColor = Color.FromArgb(120, 0, 0, 0), Padding = 5 };\nborder.Child = new TextBlock { Text = SymbolName, ForegroundColor = Color.White };\nChart.AddControl(border);","python":"border = Border()\nborder.BackgroundColor = Color.FromArgb(120, 0, 0, 0)\nborder.Padding = Thickness(5)\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ntextBlock.ForegroundColor = Color.White\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.BorderColor","kind":"property","name":"BorderColor","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BorderColor {get; set;}","python":"border.BorderColor: Color","summary":"Gets or sets the border line color. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BorderThickness = 2, Width = 150, Height = 40 };\nborder.BorderColor = Account.Equity >= Account.Balance ? Color.Green : Color.Red;\nChart.AddControl(border);","python":"border = Border()\nborder.BorderThickness = Thickness(2)\nborder.Width = 150\nborder.Height = 40\nborder.BorderColor = Color.Green if api.Account.Equity >= api.Account.Balance else Color.Red\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BorderColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BorderColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.BorderThickness","kind":"property","name":"BorderThickness","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness BorderThickness {get; set;}","python":"border.BorderThickness: Thickness","summary":"Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BorderColor = Color.Red, BorderThickness = new Thickness(0, 0, 0, 2) };\nborder.Child = new TextBlock { Text = \"Underlined header\" };\nChart.AddControl(border);","python":"border = Border()\nborder.BorderColor = Color.Red\nborder.BorderThickness = Thickness(0, 0, 0, 2)\ntextBlock = TextBlock()\ntextBlock.Text = \"Underlined header\"\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BorderThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/BorderThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.Child","kind":"property","name":"Child","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Child {get; set;}","python":"border.Child: ControlBase","summary":"Gets or sets the border child object.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\npanel.AddChild(new TextBlock { Text = \"EURUSD\" });\npanel.AddChild(new Button { Text = \"Buy\" });\nvar border = new Border { BorderColor = Color.Gold, BorderThickness = 2, Child = panel };\nChart.AddControl(border);","python":"panel = StackPanel()\nsymbolText = TextBlock()\nsymbolText.Text = \"EURUSD\"\npanel.AddChild(symbolText)\nborder = Border()\nborder.BorderColor = Color.Gold\nborder.BorderThickness = Thickness(2)\nborder.Child = panel\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.CornerRadius","kind":"property","name":"CornerRadius","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public CornerRadius CornerRadius {get; set;}","python":"border.CornerRadius: CornerRadius","summary":"Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).","remarks":null,"parameters":[],"returns":{"csharpType":"CornerRadius","pythonType":"CornerRadius","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BackgroundColor = Color.SteelBlue, CornerRadius = new CornerRadius(10), Padding = 6 };\nborder.Child = new TextBlock { Text = \"Rounded\" };\nChart.AddControl(border);","python":"border = Border()\nborder.BackgroundColor = Color.SteelBlue\nborder.CornerRadius = CornerRadius(10)\nborder.Padding = Thickness(6)\ntextBlock = TextBlock()\ntextBlock.Text = \"Rounded\"\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/CornerRadius/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/CornerRadius/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Border.Padding","kind":"property","name":"Padding","type":"T:cAlgo.API.Border","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness Padding {get; set;}","python":"border.Padding: Thickness","summary":"Gets or sets the border padding thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BackgroundColor = Color.DarkSlateGray, Padding = new Thickness(10, 5, 10, 5) };\nborder.Child = new TextBlock { Text = \"Padded content\" };\nChart.AddControl(border);","python":"border = Border()\nborder.BackgroundColor = Color.DarkSlateGray\nborder.Padding = Thickness(10, 5, 10, 5)\ntextBlock = TextBlock()\ntextBlock.Text = \"Padded content\"\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Padding/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Border/Padding/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.BullsPower","kind":"interface","name":"BullsPower","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface BullsPower","python":"BullsPower","summary":"The calculation of the Bulls Power.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private BullsPower _bullsPower;\n\nprotected override void OnStart()\n{\n    _bullsPower = Indicators.BullsPower(13, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Bulls Power: {0}\", _bullsPower.Result.Last(1));\n}","python":"def on_start(self):\n    self.bullsPower = api.Indicators.BullsPower(13, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"Bulls Power: {self.bullsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BullsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BullsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.BullsPower.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.BullsPower","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"bullsPower.Result: IndicatorDataSeries","summary":"The histogram (bar graph). It shows the maximum bullish strength during the time period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bullsPower = Indicators.BullsPower(13, MovingAverageType.Exponential);\nif (bullsPower.Result.Last(1) > 0)\n    Print(\"Bulls are in control: {0}\", bullsPower.Result.Last(1));","python":"bullsPower = api.Indicators.BullsPower(13, MovingAverageType.Exponential)\nif bullsPower.Result.Last(1) > 0:\n    api.Print(f\"Bulls are in control: {bullsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/BullsPower/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/BullsPower/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Button","kind":"class","name":"Button","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class Button : Control","python":"Button","summary":"Represents the button.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\nusing System.Linq;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Button control and handle its clicked event\n    public partial class ButtonSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7\n            };\n\n            for (int i = 0; i < 5; i++)\n            {\n                var button = new Button\n                {\n                    Text = \"Button #\" + i,\n                    Margin = 10\n                };\n\n                button.Click += Button_Click;\n\n                stackPanel.AddChild(button);\n            }\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void Button_Click(ButtonClickEventArgs obj)\n        {\n            var textSplit = obj.Button.Text.Split(' ').TakeWhile(text => !text.Equals(\"Clicked\", StringComparison.OrdinalIgnoreCase)).ToArray();\n\n            obj.Button.Text = string.Join(\" \", textSplit) + \" Clicked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n\n        for i in range(5):\n            button = Button()\n            button.Text = f\"Button # {i}\"\n            button.Margin = Thickness(10)\n            button.Click += self.on_button_clicked\n            stackPanel.AddChild(button)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_button_clicked(self, args):\n        textSplit = args.Button.Text.split(' ')[:2]\n        args.Button.Text = f\"{' '.join(textSplit)} Clicked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Button.#ctor","kind":"constructor","name":"Button","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public Button()","python":"Button()","summary":"Initializes a new instance of the Button class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", Margin = 5 };\nbutton.Click += args => Print(\"Clicked\");\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.Margin = Thickness(5)\nbutton.Click += lambda args: api.Print(\"Clicked\")\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Button.BorderColor","kind":"property","name":"BorderColor","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BorderColor {get; set;}","python":"button.BorderColor: Color","summary":"Gets or sets the border line color. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Sell\", BorderColor = Color.Red, BorderThickness = 1 };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Sell\"\nbutton.BorderColor = Color.Red\nbutton.BorderThickness = Thickness(1)\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/BorderColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/BorderColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Button.BorderThickness","kind":"property","name":"BorderThickness","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness BorderThickness {get; set;}","python":"button.BorderThickness: Thickness","summary":"Gets or sets the border thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Close all\", BorderColor = Color.Orange, BorderThickness = new Thickness(2) };\nChart.AddControl(button);\nPrint(\"Border thickness: {0}\", button.BorderThickness.Left);","python":"button = Button()\nbutton.Text = \"Close all\"\nbutton.BorderColor = Color.Orange\nbutton.BorderThickness = Thickness(2)\napi.Chart.AddControl(button)\napi.Print(f\"Border thickness: {button.BorderThickness.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/BorderThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/BorderThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Button.Content","kind":"property","name":"Content","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Content {get; set;}","python":"button.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var content = new StackPanel { Orientation = Orientation.Horizontal };\ncontent.AddChild(new Ellipse { Width = 8, Height = 8, FillColor = Color.LimeGreen, Margin = 3 });\ncontent.AddChild(new TextBlock { Text = \"Buy\" });\nvar button = new Button { Content = content };\nChart.AddControl(button);","python":"content = StackPanel()\ncontent.Orientation = Orientation.Horizontal\ndot = Ellipse()\ndot.Width = 8\ndot.Height = 8\ndot.FillColor = Color.LimeGreen\nlabel = TextBlock()\nlabel.Text = \"Buy\"\ncontent.AddChild(dot)\ncontent.AddChild(label)\nbutton = Button()\nbutton.Content = content\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Button.CornerRadius","kind":"property","name":"CornerRadius","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public CornerRadius CornerRadius {get; set;}","python":"button.CornerRadius: CornerRadius","summary":"Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).","remarks":null,"parameters":[],"returns":{"csharpType":"CornerRadius","pythonType":"CornerRadius","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", CornerRadius = new CornerRadius(12) };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.CornerRadius = CornerRadius(12)\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/CornerRadius/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/CornerRadius/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Button.Text","kind":"property","name":"Text","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"button.Text: str","summary":"Gets or sets the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Start trading\" };\nbutton.Click += args => args.Button.Text = args.Button.Text == \"Start trading\" ? \"Stop trading\" : \"Start trading\";\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Start trading\"\napi.Chart.AddControl(button)\napi.Print(f\"Button text: {button.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.Button.Click","kind":"event","name":"Click","type":"T:cAlgo.API.Button","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ButtonClickEventArgs> Click;","python":"button.Click += handler  # handler(obj: ButtonClickEventArgs)","summary":"Occurs when the button is clicked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ButtonClickEventArgs>","pythonType":"Callable[[ButtonClickEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy 0.01 lots\" };\nbutton.Click += args =>\n{\n    var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01), \"Button\");\n    Print(\"{0} clicked, order successful: {1}\", args.Button.Text, result.IsSuccessful);\n};\nChart.AddControl(button);","python":"def on_start(self):\n    button = Button()\n    button.Text = \"Buy 0.01 lots\"\n    button.Click += self.on_button_click\n    api.Chart.AddControl(button)\n\ndef on_button_click(self, args):\n    result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01), \"Button\")\n    api.Print(f\"{args.Button.Text} clicked, order successful: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Click/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Button/Click/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ButtonClickEventArgs","kind":"class","name":"ButtonClickEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ButtonClickEventArgs","python":"ButtonClickEventArgs","summary":"Represents the button click event data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Button object Click event ButtonClickEventArgs\n    public partial class ButtonClickEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var button = new Button\n            {\n                Text = \"Button not clicked yet\",\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            // Whenever you click on the button the Button_Click method will be called\n            button.Click += Button_Click;\n\n            Chart.AddControl(button);\n        }\n\n        // Here we change the button test when it is clicked\n        private void Button_Click(ButtonClickEventArgs obj)\n        {\n            obj.Button.Text = \"Button Clicked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        button = Button()\n        button.Text = \"Button not clicked yet\"\n        button.HorizontalAlignment = HorizontalAlignment.Center\n        button.VerticalAlignment = VerticalAlignment.Center\n\n        # Whenever you click on the button the on_button_click method will be called\n        button.Click += self.on_button_click\n\n        api.Chart.AddControl(button)\n\n    def on_button_click(self, args):\n        # Here we change the button test when it is clicked\n        args.Button.Text = \"Button Clicked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ButtonClickEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ButtonClickEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Button.Click)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Button.Click)."}]}
{"id":"P:cAlgo.API.ButtonClickEventArgs.Button","kind":"property","name":"Button","type":"T:cAlgo.API.ButtonClickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Button Button {get;}","python":"buttonClickEventArgs.Button: Button","summary":"Gets the button data.","remarks":null,"parameters":[],"returns":{"csharpType":"Button","pythonType":"Button","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var button = new Button { Text = \"Buy EURUSD\" };\n    button.Click += OnButtonClick;\n    Chart.AddControl(button);\n}\n\nprivate void OnButtonClick(ButtonClickEventArgs args)\n{\n    args.Button.IsEnabled = false;\n    args.Button.Text = \"Order sent\";\n    ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\");\n}","python":"def on_start(self):\n    button = Button()\n    button.Text = \"Buy EURUSD\"\n    button.Click += self.on_button_click\n    api.Chart.AddControl(button)\n\ndef on_button_click(self, args):\n    args.Button.IsEnabled = False\n    args.Button.Text = \"Order sent\"\n    api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ButtonClickEventArgs/Button/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ButtonClickEventArgs/Button/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Button.Click)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Button.Click)."}]}
{"id":"T:cAlgo.API.Canvas","kind":"class","name":"Canvas","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public class Canvas : Panel","python":"Canvas","summary":"Defines an area to position child elements by coordinates relative to the Canvas area.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use the Canvas panel\n    public partial class CanvasSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var canvas = new Canvas\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Width = 300,\n                Height = 200,\n                BackgroundColor = Color.Red,\n                Opacity = 0.5\n            };\n\n            canvas.AddChild(new Button\n            {\n                Top = 20,\n                Left = 80,\n                Margin = 5,\n                Text = \"Button Inside Canvas\"\n            });\n\n            canvas.AddChild(new Image\n            {\n                Source = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128'><circle cx='64' cy='64' r='60' fill='#2F4BFF'/></svg>\"),\n                Margin = 5,\n                Width = 128,\n                Height = 128,\n                Top = 45,\n                Left = 80\n            });\n\n            Chart.AddControl(canvas);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    SVG = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\"\n\n    def initialize(self):\n        canvas = Canvas()\n        canvas.HorizontalAlignment = HorizontalAlignment.Center\n        canvas.VerticalAlignment = VerticalAlignment.Center\n        canvas.Width = 300\n        canvas.Height = 200\n        canvas.BackgroundColor = Color.Red\n        canvas.Opacity = 0.5\n\n        button = Button()\n        button.Top = 20\n        button.Left = 80\n        button.Margin = Thickness(5)\n        button.Text = \"Button Inside Canvas\"\n\n        canvas.AddChild(button)\n\n        image = Image()\n        image.Margin = Thickness(5)\n        image.Width = 128\n        image.Height = 128\n        image.Top = 45\n        image.Left = 80\n        image.Source = SvgIcon(self.SVG)\n\n        canvas.AddChild(image)\n\n        api.Chart.AddControl(canvas)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Canvas/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Canvas/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Canvas.#ctor","kind":"constructor","name":"Canvas","type":"T:cAlgo.API.Canvas","namespace":"cAlgo.API","group":"Layout","csharp":"public Canvas()","python":"Canvas()","summary":"Initializes a new instance of the Canvas class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas { Width = 250, Height = 120, BackgroundColor = Color.FromArgb(60, Color.Black) };\ncanvas.AddChild(new TextBlock { Text = \"Entry\", Left = 10, Top = 10 });\ncanvas.AddChild(new TextBlock { Text = \"Exit\", Left = 10, Top = 40 });\nChart.AddControl(canvas);","python":"canvas = Canvas()\ncanvas.Width = 250\ncanvas.Height = 120\ncanvas.BackgroundColor = Color.FromArgb(60, Color.Black)\nentry = TextBlock()\nentry.Text = \"Entry\"\nentry.Left = 10\nentry.Top = 10\ncanvas.AddChild(entry)\napi.Chart.AddControl(canvas)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Canvas/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Canvas/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.CenterOfGravity","kind":"interface","name":"CenterOfGravity","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface CenterOfGravity","python":"CenterOfGravity","summary":"The Center of Gravity (COG) indicator is a technical indicator developed by John Ehlers in 2002, used to identify potential turning points in the price as early as possible.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var centerOfGravity = Indicators.CenterOfGravity(10);\nPrint(\"COG: {0}, Lag: {1}\", centerOfGravity.Result.Last(1), centerOfGravity.Lag.Last(1));","python":"centerOfGravity = api.Indicators.CenterOfGravity(10)\napi.Print(f\"COG: {centerOfGravity.Result.Last(1)}, Lag: {centerOfGravity.Lag.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Center Of Gravity indicator\n    public partial class CenterOfGravitySample : Robot\n    {\n        private double _volumeInUnits;\n\n        private CenterOfGravity _centerOfGravity;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _centerOfGravity = Indicators.CenterOfGravity(10);\n        }\n\n        protected override void OnBar()\n        {\n            if (_centerOfGravity.Result.Last(1) > _centerOfGravity.Lag.Last(1) && _centerOfGravity.Result.Last(2) <= _centerOfGravity.Lag.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_centerOfGravity.Result.Last(1) < _centerOfGravity.Lag.Last(1) && _centerOfGravity.Result.Last(2) >= _centerOfGravity.Lag.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass CenterOfGravitySample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.centerOfGravity = api.Indicators.CenterOfGravity(10)\n\n    def on_bar_closed(self):\n        if self.centerOfGravity.Result.Last(0) > self.centerOfGravity.Lag.Last(0) and self.centerOfGravity.Result.Last(1) <= self.centerOfGravity.Lag.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif self.centerOfGravity.Result.Last(0) < self.centerOfGravity.Lag.Last(0) and self.centerOfGravity.Result.Last(1) >= self.centerOfGravity.Lag.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.CenterOfGravity.Lag","kind":"property","name":"Lag","type":"T:cAlgo.API.Indicators.CenterOfGravity","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Lag {get; set;}","python":"centerOfGravity.Lag: IndicatorDataSeries","summary":"The lag/signal/trigger line of COG","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var centerOfGravity = Indicators.CenterOfGravity(10);\nif (centerOfGravity.Result.Last(1) > centerOfGravity.Lag.Last(1))\n    Print(\"COG is above its lag line: {0}\", centerOfGravity.Lag.Last(1));","python":"centerOfGravity = api.Indicators.CenterOfGravity(10)\nif centerOfGravity.Result.Last(1) > centerOfGravity.Lag.Last(1):\n    api.Print(f\"COG is above its lag line: {centerOfGravity.Lag.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/Lag/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/Lag/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.CenterOfGravity.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.CenterOfGravity","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"centerOfGravity.Result: IndicatorDataSeries","summary":"The COG line, by using it you can identify the support and resistance levels and have a more or less clear idea when the price starts moving in a different direction.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var centerOfGravity = Indicators.CenterOfGravity(10);\nPrint(\"COG line: {0}\", centerOfGravity.Result.Last(1));","python":"centerOfGravity = api.Indicators.CenterOfGravity(10)\napi.Print(f\"COG line: {centerOfGravity.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CenterOfGravity/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ChaikinMoneyFlow","kind":"interface","name":"ChaikinMoneyFlow","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ChaikinMoneyFlow","python":"ChaikinMoneyFlow","summary":"The Chaikin Money Flow Indicator measures the amount of Money Flow Volume over a specific period. The resulting indicator fluctuates above/below the zero line.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChaikinMoneyFlow _chaikinMoneyFlow;\n\nprotected override void Initialize()\n{\n   _chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(Period);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _chaikinMoneyFlow.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.chaikinMoneyFlow = api.Indicators.ChaikinMoneyFlow(api.Period)\n\n    def calculate(self, index):\n        api.Result[index] = self.chaikinMoneyFlow.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 21\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Chaikin Money Flow indicator\n    public partial class ChaikinMoneyFlowSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private ChaikinMoneyFlow _chaikinMoneyFlow;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_chaikinMoneyFlow.Result.Last(1) > 0 && _chaikinMoneyFlow.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_chaikinMoneyFlow.Result.Last(1) < 0 && _chaikinMoneyFlow.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass ChaikinMoneyFlowSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.chaikinMoneyFlow = api.Indicators.ChaikinMoneyFlow(14)\n\n    def on_bar_closed(self):\n        if self.chaikinMoneyFlow.Result.Last(0) > 0 and self.chaikinMoneyFlow.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.chaikinMoneyFlow.Result.Last(0) < 0 and self.chaikinMoneyFlow.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinMoneyFlow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinMoneyFlow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ChaikinMoneyFlow.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ChaikinMoneyFlow","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"chaikinMoneyFlow.Result: IndicatorDataSeries","summary":"The time series of the Chaikin Money Flow Indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChaikinMoneyFlow _chaikinMoneyFlow;\n\nprotected override void OnStart()\n{\n    _chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(Period);\n}\nprotected override void OnBar()\n{\n    var currentValue = _chaikinMoneyFlow.Result.LastValue;\n    Print(\"Chaikin Money Flow: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.chaikinMoneyFlow = api.Indicators.ChaikinMoneyFlow(api.Period)\n\ndef on_bar(self):\n    currentValue = self.chaikinMoneyFlow.Result.LastValue\n    api.Print(f\"Chaikin Money Flow: {currentValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 21\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinMoneyFlow/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinMoneyFlow/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ChaikinOscillator","kind":"interface","name":"ChaikinOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ChaikinOscillator","python":"ChaikinOscillator","summary":"The Chaikin Oscillator Indicator interface.","remarks":"The Chaikin Oscillator's main purpose is to identify potential buying and selling signals in a security by analyzing the relationship between price and trading volume.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChaikinOscillator _chaikinOscillator;\n\nprotected override void OnStart()\n{\n    _chaikinOscillator = Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Chaikin Oscillator: {0}\", _chaikinOscillator.Result.Last(1));\n}","python":"def on_start(self):\n    self.chaikinOscillator = api.Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"Chaikin Oscillator: {self.chaikinOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ChaikinOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ChaikinOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"chaikinOscillator.Result: IndicatorDataSeries","summary":"The resulting time series of Chaikin Oscillator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chaikinOscillator = Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential);\nif (chaikinOscillator.Result.Last(1) > 0 && chaikinOscillator.Result.Last(2) <= 0)\n    Print(\"Chaikin Oscillator crossed above zero: {0}\", chaikinOscillator.Result.Last(1));","python":"chaikinOscillator = api.Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential)\nif chaikinOscillator.Result.Last(1) > 0 and chaikinOscillator.Result.Last(2) <= 0:\n    api.Print(f\"Chaikin Oscillator crossed above zero: {chaikinOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ChaikinVolatility","kind":"interface","name":"ChaikinVolatility","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ChaikinVolatility","python":"ChaikinVolatility","summary":"The Chaikin Volatility Indicator interface.","remarks":"The Chaikin Volatility's main purpose is to confirm price trends and to forecast price reversals.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChaikinVolatility chaikinVolatility;\n\nprotected override void Initialize()\n{\n    chaikinVolatility = Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple);\n}\npublic override void Calculate(int index)\n{\n    // Display Result of Indicator\n    Result[index] = chaikinVolatility.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.chaikinVolatility = api.Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        api.Result[index] = self.chaikinVolatility.Result[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Chaikin Volatility indicator\n    public partial class ChaikinVolatilitySample : Robot\n    {\n        private double _volumeInUnits;\n\n        private ChaikinVolatility _chaikinVolatility;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _chaikinVolatility = Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_chaikinVolatility.Result.Last(1) > 0)\n            {\n                if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) < _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n                else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) > _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else\n            {\n                ClosePositions();\n            }\n        }\n\n        private void ClosePositions()\n        {\n            foreach (var position in BotPositions)\n            {\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass ChaikinVolatilitySample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.chaikinVolatility = api.Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple)\n        self.movingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\n\n    def on_bar_closed(self):\n        if self.chaikinVolatility.Result.Last(0) > 0:\n            if api.Bars.ClosePrices.Last(0) > self.movingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) < self.movingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n            elif api.Bars.ClosePrices.Last(0) < self.movingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) > self.movingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        else:\n            self.close_positions()\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self):\n        for position in self.get_bot_positions():\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinVolatility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinVolatility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ChaikinVolatility.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ChaikinVolatility","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"chaikinVolatility.Result: IndicatorDataSeries","summary":"Chaikin Volatility Result Series.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Output Series of ChaikinVolatility.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChaikinVolatility _chaikinVolatility;\n\nprotected override void OnStart()\n{\n    _chaikinVolatility = Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple);\n}\n\nprotected override void OnBar()\n{\n    Print(\"The Current Chaikin Volatility Value is: {0}\", _chaikinVolatility.Result.Last(1));\n}","python":"def on_start(self):\n    self.chaikinVolatility = api.Indicators.ChaikinVolatility(14, 10, MovingAverageType.Simple)\n\ndef on_bar(self):\n    api.Print(f\"The Current Chaikin Volatility Value is: {self.chaikinVolatility.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinVolatility/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChaikinVolatility/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ChandeMomentumOscillator","kind":"interface","name":"ChandeMomentumOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ChandeMomentumOscillator","python":"ChandeMomentumOscillator","summary":"The calculation of the Chande Momentum Oscillator indicator.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ChandeMomentumOscillator _chandeMomentumOscillator;\n\nprotected override void OnStart()\n{\n    _chandeMomentumOscillator = Indicators.ChandeMomentumOscillator(Bars.ClosePrices, 9);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Chande Momentum Oscillator: {0}\", _chandeMomentumOscillator.Result.Last(1));\n}","python":"def on_start(self):\n    self.chandeMomentumOscillator = api.Indicators.ChandeMomentumOscillator(api.Bars.ClosePrices, 9)\n\ndef on_bar(self):\n    api.Print(f\"Chande Momentum Oscillator: {self.chandeMomentumOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChandeMomentumOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChandeMomentumOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ChandeMomentumOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ChandeMomentumOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"chandeMomentumOscillator.Result: IndicatorDataSeries","summary":"Gets the resulting series of the Chande Momentum Oscillator indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chandeMomentumOscillator = Indicators.ChandeMomentumOscillator(Bars.ClosePrices, 9);\nvar value = chandeMomentumOscillator.Result.Last(1);\nif (value > 50)\n    Print(\"Overbought: {0}\", value);\nelse if (value < -50)\n    Print(\"Oversold: {0}\", value);","python":"chandeMomentumOscillator = api.Indicators.ChandeMomentumOscillator(api.Bars.ClosePrices, 9)\nvalue = chandeMomentumOscillator.Result.Last(1)\nif value > 50:\n    api.Print(f\"Overbought: {value}\")\nelif value < -50:\n    api.Print(f\"Oversold: {value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChandeMomentumOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ChandeMomentumOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CharacterCasing","kind":"enum","name":"CharacterCasing","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum CharacterCasing","python":"CharacterCasing","summary":"Specifies the case of characters typed manually into a TextBox control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This indicator shows how to use CharacterCasing on text box controls\n    public partial class CharacterCasingSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                Width = 200\n            };\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Lower Character Casing\",\n                Margin = new Thickness(10, 10, 10, 0),\n                ForegroundColor = Color.Red,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            stackPanel.AddChild(new TextBox\n            {\n                CharacterCasing = CharacterCasing.Lower,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Upper Character Casing\",\n                Margin = new Thickness(10, 10, 10, 0),\n                ForegroundColor = Color.Red,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            stackPanel.AddChild(new TextBox\n            {\n                CharacterCasing = CharacterCasing.Upper,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Normal Character Casing\",\n                Margin = new Thickness(10, 10, 10, 0),\n                ForegroundColor = Color.Red,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            stackPanel.AddChild(new TextBox\n            {\n                CharacterCasing = CharacterCasing.Normal,\n                Margin = 10\n            });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.ForegroundColor = Color.Red\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.Margin = Thickness(10, 10, 10, 0)\n        return textBlock\n\n    def get_text_box(self, characterCasing):\n        textBox = TextBox()\n        textBox.CharacterCasing = characterCasing\n        textBox.Margin = Thickness(10)\n        return textBox\n\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.6\n        stackPanel.Width = 200\n\n        stackPanel.AddChild(self.get_text_block(\"Lower Character Casing\"))\n        stackPanel.AddChild(self.get_text_box(CharacterCasing.Lower))\n        stackPanel.AddChild(self.get_text_block(\"Upper Character Casing\"))\n        stackPanel.AddChild(self.get_text_box(CharacterCasing.Upper))\n        stackPanel.AddChild(self.get_text_block(\"Normal Character Casing\"))\n        stackPanel.AddChild(self.get_text_box(CharacterCasing.Normal))\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.CharacterCasing.Normal","kind":"enum value","name":"Normal","type":"T:cAlgo.API.CharacterCasing","namespace":"cAlgo.API","group":"Controls","csharp":"CharacterCasing.Normal;","python":"CharacterCasing.Normal","summary":"Characters typed into a TextBox are not converted.","remarks":null,"parameters":[],"returns":{"csharpType":"CharacterCasing","pythonType":"CharacterCasing","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.CharacterCasing.Lower","kind":"enum value","name":"Lower","type":"T:cAlgo.API.CharacterCasing","namespace":"cAlgo.API","group":"Controls","csharp":"CharacterCasing.Lower;","python":"CharacterCasing.Lower","summary":"Characters typed into a TextBox are converted to lowercase.","remarks":null,"parameters":[],"returns":{"csharpType":"CharacterCasing","pythonType":"CharacterCasing","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.CharacterCasing.Upper","kind":"enum value","name":"Upper","type":"T:cAlgo.API.CharacterCasing","namespace":"cAlgo.API","group":"Controls","csharp":"CharacterCasing.Upper;","python":"CharacterCasing.Upper","summary":"Characters typed into a TextBox are converted to uppercase.","remarks":null,"parameters":[],"returns":{"csharpType":"CharacterCasing","pythonType":"CharacterCasing","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CharacterCasing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Chart","kind":"interface","name":"Chart","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface Chart","python":"Chart","summary":"Represents the Chart Interface.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator display's the chart data by using the current Chart object\n    public partial class ChartSample : Indicator\n    {\n        private Grid _grid;\n\n        private TextBlock _mouseLocationTextBlock;\n\n        private TextBlock _mouseWheelDeltaTextBlock;\n\n        private TextBlock _objectsNumberTextBlock;\n\n        protected override void Initialize()\n        {\n            Chart.ChartTypeChanged += args => CreateAndAddGridToChart();\n            Chart.ColorsChanged += args => CreateAndAddGridToChart();\n            Chart.DisplaySettingsChanged += args => CreateAndAddGridToChart();\n            Chart.Drag += args => CreateAndAddGridToChart();\n            Chart.DragEnd += args => CreateAndAddGridToChart();\n            Chart.DragStart += args => CreateAndAddGridToChart();\n            Chart.IndicatorAreaAdded += args => CreateAndAddGridToChart();\n            Chart.IndicatorAreaRemoved += args => CreateAndAddGridToChart();\n            Chart.MouseMove += args =>\n            {\n                if (_mouseLocationTextBlock == null)\n                    return;\n\n                _mouseLocationTextBlock.Text = string.Format(\"({0}, {1})\", args.MouseX, args.MouseY);\n            };\n            Chart.MouseLeave += args =>\n            {\n                if (_mouseLocationTextBlock == null)\n                    return;\n\n                _mouseLocationTextBlock.Text = \"(Null, Null)\";\n                _mouseWheelDeltaTextBlock.Text = \"0\";\n            };\n            Chart.MouseWheel += args =>\n            {\n                if (_mouseWheelDeltaTextBlock == null)\n                    return;\n\n                _mouseWheelDeltaTextBlock.Text = args.Delta.ToString();\n            };\n            Chart.ObjectsAdded += args => _objectsNumberTextBlock.Text = Chart.Objects.Count.ToString();\n            Chart.ObjectsRemoved += args => _objectsNumberTextBlock.Text = Chart.Objects.Count.ToString();\n\n            Chart.ZoomChanged += args => CreateAndAddGridToChart();\n\n            CreateAndAddGridToChart();\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n\n        private void CreateAndAddGridToChart()\n        {\n            if (_grid != null)\n                Chart.RemoveControl(_grid);\n\n            _grid = new Grid(10, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Left,\n                VerticalAlignment = VerticalAlignment.Bottom\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold);\n            style.Set(ControlProperty.ForegroundColor, Color.Red);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Height\",\n                Style = style\n            }, 0, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.Height.ToString(),\n                Style = style\n            }, 0, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Width\",\n                Style = style\n            }, 1, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.Width.ToString(),\n                Style = style\n            }, 1, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Zoom Level\",\n                Style = style\n            }, 2, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.ZoomLevel.ToString(),\n                Style = style\n            }, 2, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Objects #\",\n                Style = style\n            }, 3, 0);\n\n            _objectsNumberTextBlock = new TextBlock\n            {\n                Style = style,\n                Text = Chart.Objects.Count.ToString()\n            };\n\n            _grid.AddChild(_objectsNumberTextBlock, 3, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Top Y\",\n                Style = style\n            }, 4, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.TopY.ToString(),\n                Style = style\n            }, 4, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Bottom Y\",\n                Style = style\n            }, 5, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.BottomY.ToString(),\n                Style = style\n            }, 5, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Type\",\n                Style = style\n            }, 6, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.ChartType.ToString(),\n                Style = style\n            }, 6, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Mouse Location\",\n                Style = style\n            }, 7, 0);\n\n            _mouseLocationTextBlock = new TextBlock\n            {\n                Style = style,\n                Text = \"(Null, Null)\"\n            };\n\n            _grid.AddChild(_mouseLocationTextBlock, 7, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Indicator Areas #\",\n                Style = style\n            }, 8, 0);\n            _grid.AddChild(new TextBlock\n            {\n                Text = Chart.IndicatorAreas.Count.ToString(),\n                Style = style\n            }, 8, 1);\n\n            _grid.AddChild(new TextBlock\n            {\n                Text = \"Mouse Wheel Delta\",\n                Style = style\n            }, 9, 0);\n\n            _mouseWheelDeltaTextBlock = new TextBlock\n            {\n                Style = style,\n                Text = \"0\"\n            };\n\n            _grid.AddChild(_mouseWheelDeltaTextBlock, 9, 1);\n\n            Chart.AddControl(_grid);\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_mouse_move(self, args):\n        if self.mouseLocationTextBlock is None:\n            return\n        self.mouseLocationTextBlock.Text = f\"({args.MouseX}, {args.MouseY})\"\n\n    def on_mouse_leave(self, args):\n        if self.mouseLocationTextBlock is None:\n            return\n        self.mouseLocationTextBlock.Text = \"(Null, Null)\"\n        self.mouseWheelDeltaTextBlock.Text = \"0\"\n\n    def on_mouse_wheel(self, args):\n        if self.mouseWheelDeltaTextBlock is None:\n            return\n        self.mouseWheelDeltaTextBlock.Text = str(args.Delta)\n\n    def update_objects_count(self):\n        self.objectsNumberTextBlock.Text = str(api.Chart.Objects.Count)\n\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock\n\n    def create_and_add_grid_to_chart(self):\n        if hasattr(self, \"grid\") and self.grid is not None:\n            api.Chart.RemoveControl(self.grid)\n\n        self.grid = Grid(10, 2)\n        self.grid.BackgroundColor = Color.Gold\n        self.grid.Opacity = 0.6\n        self.grid.HorizontalAlignment = HorizontalAlignment.Left\n        self.grid.VerticalAlignment = VerticalAlignment.Bottom\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Margin, 5)\n        self.style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold)\n        self.style.Set(ControlProperty.ForegroundColor, Color.Red)\n\n        self.grid.AddChild(self.get_text_block(\"Height\"), 0, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.Height)), 0, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Width\"), 1, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.Width)), 1, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Zoom Level\"), 2, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.ZoomLevel)), 2, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Objects #\"), 3, 0)\n        self.objectsNumberTextBlock = self.get_text_block(str(api.Chart.Objects.Count))\n        self.grid.AddChild(self.objectsNumberTextBlock, 3, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Top Y\"), 4, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.TopY)), 4, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Bottom Y\"), 5, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.BottomY)), 5, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Type\"), 6, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.ChartType)), 6, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Mouse Location\"), 7, 0)\n        self.mouseLocationTextBlock = self.get_text_block(\"(Null, Null)\")\n        self.grid.AddChild(self.mouseLocationTextBlock, 7, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Indicator Areas #\"), 8, 0)\n        self.grid.AddChild(self.get_text_block(str(api.Chart.IndicatorAreas.Count)), 8, 1)\n\n        self.grid.AddChild(self.get_text_block(\"Mouse Wheel Delta\"), 9, 0)\n        self.mouseWheelDeltaTextBlock = self.get_text_block(\"0\")\n        self.grid.AddChild(self.mouseWheelDeltaTextBlock, 9, 1)\n\n        api.Chart.AddControl(self.grid)\n\n    def initialize(self):\n        api.Chart.ChartTypeChanged += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.ColorsChanged += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.DisplaySettingsChanged += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.Drag += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.DragEnd += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.DragStart += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.IndicatorAreaAdded += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.IndicatorAreaRemoved += lambda _: self.create_and_add_grid_to_chart()\n        api.Chart.ZoomChanged += lambda _: self.create_and_add_grid_to_chart()\n\n        api.Chart.MouseMove += self.on_mouse_move\n        api.Chart.MouseLeave += self.on_mouse_leave\n        api.Chart.MouseWheel += self.on_mouse_wheel\n\n        api.Chart.ObjectsAdded += lambda _: self.update_objects_count()\n        api.Chart.ObjectsRemoved += lambda _: self.update_objects_count()\n\n        self.create_and_add_grid_to_chart()","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Chart.AddHotkey(System.Action{cAlgo.API.ChartKeyboardEventArgs},cAlgo.API.Key,cAlgo.API.ModifierKeys)","kind":"method","name":"AddHotkey","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool AddHotkey(Action<ChartKeyboardEventArgs> hotkeyHandler, Key key, ModifierKeys modifiers)","python":"api.Chart.AddHotkey(hotkeyHandler: Callable[[ChartKeyboardEventArgs], None], key: Key, modifiers: ModifierKeys) -> bool","summary":"Adds an hotkey to the chart that will call the handler when pressed","remarks":null,"parameters":[{"name":"hotkeyHandler","csharpType":"Action<ChartKeyboardEventArgs>","pythonType":"Callable[[ChartKeyboardEventArgs], None]","summary":"The action delegate handler that will be called with a ChartKeyboardEventArgs"},{"name":"key","csharpType":"Key","pythonType":"Key","summary":"The Hotkey main key"},{"name":"modifiers","csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"The hotkey modifier key, default to None which means no modifer key"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool (True if Hotkey was added successfully otherwise False)","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isAdded = Chart.AddHotkey(args => Print(\"Hotkey {0} pressed on {1}\", args.Key, args.Chart.SymbolName), Key.H, ModifierKeys.Control);\nPrint(\"Hotkey added: {0}\", isAdded);","python":"from System import Action\n\ndef on_hotkey(args):\n    api.Print(f\"Hotkey {args.Key} pressed on {args.Chart.SymbolName}\")\n\nisAdded = api.Chart.AddHotkey(Action[ChartKeyboardEventArgs](on_hotkey), Key.H, ModifierKeys.Control)\napi.Print(f\"Hotkey added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"May return true, but the handler never runs: the CLI has no keyboard input."},{"name":"Cloud","support":"None","behaviour":"Returns false and writes a warning to the log; the hotkey is not registered."}]}
{"id":"M:cAlgo.API.Chart.AddHotkey(System.Action{cAlgo.API.ChartKeyboardEventArgs},System.String)","kind":"method","name":"AddHotkey","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool AddHotkey(Action<ChartKeyboardEventArgs> hotkeyHandler, string hotkey)","python":"api.Chart.AddHotkey(hotkeyHandler: Callable[[ChartKeyboardEventArgs], None], hotkey: str) -> bool","summary":"Adds an hotkey to the chart that will call the handler when pressed","remarks":null,"parameters":[{"name":"hotkeyHandler","csharpType":"Action<ChartKeyboardEventArgs>","pythonType":"Callable[[ChartKeyboardEventArgs], None]","summary":"The action delegate handler that will be called with a ChartKeyboardEventArgs"},{"name":"hotkey","csharpType":"string","pythonType":"str","summary":"The keyboard key for hotkey"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool (True if Hotkey was added successfully otherwise False)","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isAdded = Chart.AddHotkey(args => Print(\"Hotkey pressed: {0}\", args.Key), \"Ctrl+Shift+H\");\nPrint(\"Hotkey added: {0}\", isAdded);","python":"from System import Action\n\ndef on_hotkey(args):\n    api.Print(f\"Hotkey pressed: {args.Key}\")\n\nisAdded = api.Chart.AddHotkey(Action[ChartKeyboardEventArgs](on_hotkey), \"Ctrl+Shift+H\")\napi.Print(f\"Hotkey added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"May return true, but the handler never runs: the CLI has no keyboard input."},{"name":"Cloud","support":"None","behaviour":"Returns false and writes a warning to the log; the hotkey is not registered."}]}
{"id":"M:cAlgo.API.Chart.AddHotkey(System.Action,cAlgo.API.Key,cAlgo.API.ModifierKeys)","kind":"method","name":"AddHotkey","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool AddHotkey(Action hotkeyHandler, Key key, ModifierKeys modifiers)","python":"api.Chart.AddHotkey(hotkeyHandler: Action, key: Key, modifiers: ModifierKeys) -> bool","summary":"Adds an hotkey to the chart that will call the handler when pressed","remarks":null,"parameters":[{"name":"hotkeyHandler","csharpType":"Action","pythonType":"Action","summary":"The action delegate handler that will be called"},{"name":"key","csharpType":"Key","pythonType":"Key","summary":"The Hotkey main key"},{"name":"modifiers","csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"The hotkey modifier key, default to None which means no modifer key"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool (True if Hotkey was added successfully otherwise False)","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isAdded = Chart.AddHotkey(() => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin), Key.B, ModifierKeys.Control);\nPrint(\"Buy hotkey added: {0}\", isAdded);","python":"from System import Action\n\ndef buy():\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\n\nisAdded = api.Chart.AddHotkey(Action(buy), Key.B, ModifierKeys.Control)\napi.Print(f\"Buy hotkey added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"May return true, but the handler never runs: the CLI has no keyboard input."},{"name":"Cloud","support":"None","behaviour":"Returns false and writes a warning to the log; the hotkey is not registered."}]}
{"id":"M:cAlgo.API.Chart.AddHotkey(System.Action,System.String)","kind":"method","name":"AddHotkey","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool AddHotkey(Action hotkeyHandler, string hotkey)","python":"api.Chart.AddHotkey(hotkeyHandler: Action, hotkey: str) -> bool","summary":"Adds an hotkey to the chart that will call the handler when pressed","remarks":null,"parameters":[{"name":"hotkeyHandler","csharpType":"Action","pythonType":"Action","summary":"The action delegate handler that will be called"},{"name":"hotkey","csharpType":"string","pythonType":"str","summary":"The keyboard key for hotkey"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool (True if Hotkey was added successfully otherwise False)","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isAdded = Chart.AddHotkey(() => Chart.RemoveAllObjects(), \"Ctrl+Shift+D\");\nPrint(\"Clear drawings hotkey added: {0}\", isAdded);","python":"from System import Action\n\ndef clear_drawings():\n    api.Chart.RemoveAllObjects()\n\nisAdded = api.Chart.AddHotkey(Action(clear_drawings), \"Ctrl+Shift+D\")\napi.Print(f\"Clear drawings hotkey added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/AddHotkey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"May return true, but the handler never runs: the CLI has no keyboard input."},{"name":"Cloud","support":"None","behaviour":"Returns false and writes a warning to the log; the hotkey is not registered."}]}
{"id":"M:cAlgo.API.Chart.DrawRiskReward(System.String,System.Int32,System.Int32,System.Double,cAlgo.API.OrderType,cAlgo.API.TradeType,cAlgo.API.ChartRiskRewardType)","kind":"method","name":"DrawRiskReward","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRiskReward DrawRiskReward(string name, int barIndex1, int barIndex2, double entryPrice, OrderType orderType, TradeType tradeType, ChartRiskRewardType type)","python":"api.Chart.DrawRiskReward(name: str, barIndex1: int, barIndex2: int, entryPrice: float, orderType: OrderType, tradeType: TradeType, type: ChartRiskRewardType) -> ChartRiskReward","summary":"Draws a risk reward.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"Bar index of start point"},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"Bar index of end point"},{"name":"entryPrice","csharpType":"double","pythonType":"float","summary":"Entry price"},{"name":"orderType","csharpType":"OrderType","pythonType":"OrderType","summary":"Order type"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type for risk reward"},{"name":"type","csharpType":"ChartRiskRewardType","pythonType":"ChartRiskRewardType","summary":"Type of risk reward"}],"returns":{"csharpType":"ChartRiskReward","pythonType":"ChartRiskReward","summary":"ChartRiskReward","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskRewardType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1);\nvar riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\nPrint(\"Volume for a 1% equity risk: {0}\", riskReward.VolumeInUnits);","python":"riskRewardType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1)\nriskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\napi.Print(f\"Volume for a 1% equity risk: {riskReward.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DrawRiskReward/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DrawRiskReward/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.Chart.DrawRiskReward(System.String,System.DateTime,System.DateTime,System.Double,cAlgo.API.OrderType,cAlgo.API.TradeType,cAlgo.API.ChartRiskRewardType)","kind":"method","name":"DrawRiskReward","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRiskReward DrawRiskReward(string name, DateTime time1, DateTime time2, double entryPrice, OrderType orderType, TradeType tradeType, ChartRiskRewardType type)","python":"api.Chart.DrawRiskReward(name: str, time1: DateTime, time2: DateTime, entryPrice: float, orderType: OrderType, tradeType: TradeType, type: ChartRiskRewardType) -> ChartRiskReward","summary":"Draws a risk reward.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"Time of start point"},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"Time of end point"},{"name":"entryPrice","csharpType":"double","pythonType":"float","summary":"Entry price"},{"name":"orderType","csharpType":"OrderType","pythonType":"OrderType","summary":"Order type"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type for risk reward"},{"name":"type","csharpType":"ChartRiskRewardType","pythonType":"ChartRiskRewardType","summary":"Type of risk reward"}],"returns":{"csharpType":"ChartRiskReward","pythonType":"ChartRiskReward","summary":"ChartRiskReward","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskRewardType = new ChartRiskRewardFixedSizeType(1000);\nvar riskReward = Chart.DrawRiskReward(\"RR\", Bars.OpenTimes[Chart.LastVisibleBarIndex - 10], Bars.OpenTimes[Chart.LastVisibleBarIndex], Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\nPrint(\"Stop loss: {0} | Take profit: {1}\", riskReward.StopLossPrice, riskReward.TakeProfitPrice);","python":"riskRewardType = ChartRiskRewardFixedSizeType(1000)\nriskReward = api.Chart.DrawRiskReward(\"RR\", api.Bars.OpenTimes[api.Chart.LastVisibleBarIndex - 10], api.Bars.OpenTimes[api.Chart.LastVisibleBarIndex], api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\napi.Print(f\"Stop loss: {riskReward.StopLossPrice} | Take profit: {riskReward.TakeProfitPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DrawRiskReward/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DrawRiskReward/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.Chart.ResetBarColor(System.Int64)","kind":"method","name":"ResetBarColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ResetBarColor(long barIndex)","python":"api.Chart.ResetBarColor(barIndex: int) -> None","summary":"Resets the color of the bar to the default.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nChart.SetBarColor(index, Color.Gold);\nChart.ResetBarColor(index);\nPrint(\"Bar {0} color reset to default\", index);","python":"index = api.Bars.Count - 1\napi.Chart.SetBarColor(index, Color.Gold)\napi.Chart.ResetBarColor(index)\napi.Print(f\"Bar {index} color reset to default\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetBarColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetBarColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores bar colour changes."}]}
{"id":"M:cAlgo.API.Chart.ResetBarColors","kind":"method","name":"ResetBarColors","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ResetBarColors()","python":"api.Chart.ResetBarColors() -> None","summary":"Resets the colors of all the bars.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ResetBarColors();\nPrint(\"All bar colors reset to the chart color settings\");","python":"api.Chart.ResetBarColors()\napi.Print(\"All bar colors reset to the chart color settings\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetBarColors/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetBarColors/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores bar colour changes."}]}
{"id":"M:cAlgo.API.Chart.ResetTickVolumeColor(System.Int64)","kind":"method","name":"ResetTickVolumeColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ResetTickVolumeColor(long barIndex)","python":"api.Chart.ResetTickVolumeColor(barIndex: int) -> None","summary":"Resets the color of the tick volume line to the default at the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nChart.SetTickVolumeColor(index, Color.Yellow);\nChart.ResetTickVolumeColor(index);\nPrint(\"Tick volume color of bar {0} reset\", index);","python":"index = api.Bars.Count - 1\napi.Chart.SetTickVolumeColor(index, Color.Yellow)\napi.Chart.ResetTickVolumeColor(index)\napi.Print(f\"Tick volume color of bar {index} reset\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetTickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetTickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores tick volume colour changes."}]}
{"id":"M:cAlgo.API.Chart.ResetTickVolumeColors","kind":"method","name":"ResetTickVolumeColors","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ResetTickVolumeColors()","python":"api.Chart.ResetTickVolumeColors() -> None","summary":"Resets the color of all the tick volume bars.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ResetTickVolumeColors();\nPrint(\"All tick volume colors reset\");","python":"api.Chart.ResetTickVolumeColors()\napi.Print(\"All tick volume colors reset\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetTickVolumeColors/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ResetTickVolumeColors/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores tick volume colour changes."}]}
{"id":"M:cAlgo.API.Chart.ScrollXBy(System.Int32)","kind":"method","name":"ScrollXBy","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ScrollXBy(int bars)","python":"api.Chart.ScrollXBy(bars: int) -> None","summary":"Scrolls the chart by the X-axis for the specified number of bars.","remarks":null,"parameters":[{"name":"bars","csharpType":"int","pythonType":"int","summary":"The number of bars"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ScrollXBy(-50);\nPrint(\"First visible bar after scrolling: {0}\", Chart.FirstVisibleBarIndex);","python":"api.Chart.ScrollXBy(-50)\napi.Print(f\"First visible bar after scrolling: {api.Chart.FirstVisibleBarIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXBy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXBy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores scroll requests."}]}
{"id":"M:cAlgo.API.Chart.ScrollXTo(System.Int32)","kind":"method","name":"ScrollXTo","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ScrollXTo(int barIndex)","python":"api.Chart.ScrollXTo(barIndex: int) -> None","summary":"Scrolls the chart by the X-axis to the bar with the specified index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The index of the bar."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ScrollXTo(Bars.Count - 200);\nPrint(\"Scrolled to bar {0}\", Chart.FirstVisibleBarIndex);","python":"api.Chart.ScrollXTo(api.Bars.Count - 200)\napi.Print(f\"Scrolled to bar {api.Chart.FirstVisibleBarIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXTo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXTo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores scroll requests."}]}
{"id":"M:cAlgo.API.Chart.ScrollXTo(System.DateTime)","kind":"method","name":"ScrollXTo","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void ScrollXTo(DateTime time)","python":"api.Chart.ScrollXTo(time: DateTime) -> None","summary":"Scrolls the chart by the X-axis to the specified date time.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The X-axis date time"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ScrollXTo(Server.Time.AddDays(-7));\nPrint(\"First visible bar time: {0}\", Bars.OpenTimes[Chart.FirstVisibleBarIndex]);","python":"api.Chart.ScrollXTo(api.Server.Time.AddDays(-7))\napi.Print(f\"First visible bar time: {api.Bars.OpenTimes[api.Chart.FirstVisibleBarIndex]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXTo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ScrollXTo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores scroll requests."}]}
{"id":"M:cAlgo.API.Chart.SetBarColor(System.Int64,cAlgo.API.Color)","kind":"method","name":"SetBarColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void SetBarColor(long barIndex, Color color)","python":"api.Chart.SetBarColor(barIndex: int, color: Color) -> None","summary":"Sets the color of the bar at the specified bar index. It will change the bar fill color and the outline color.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color for the bar"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar color = Bars.ClosePrices[index] > Bars.OpenPrices[index] ? Color.Gold : Color.Purple;\nChart.SetBarColor(index, color);","python":"index = api.Bars.Count - 1\ncolor = Color.Gold if api.Bars.ClosePrices[index] > api.Bars.OpenPrices[index] else Color.Purple\napi.Chart.SetBarColor(index, color)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores bar colour changes."}]}
{"id":"M:cAlgo.API.Chart.SetBarFillColor(System.Int64,cAlgo.API.Color)","kind":"method","name":"SetBarFillColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void SetBarFillColor(long barIndex, Color color)","python":"api.Chart.SetBarFillColor(barIndex: int, color: Color) -> None","summary":"Sets the fill color of the bar at the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color for filling the bar"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nif (Bars.TickVolumes[index] > Bars.TickVolumes[index - 1] * 2)\n    Chart.SetBarFillColor(index, Color.Yellow);","python":"index = api.Bars.Count - 1\nif api.Bars.TickVolumes[index] > api.Bars.TickVolumes[index - 1] * 2:\n    api.Chart.SetBarFillColor(index, Color.Yellow)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores bar colour changes."}]}
{"id":"M:cAlgo.API.Chart.SetBarOutlineColor(System.Int64,cAlgo.API.Color)","kind":"method","name":"SetBarOutlineColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void SetBarOutlineColor(long barIndex, Color color)","python":"api.Chart.SetBarOutlineColor(barIndex: int, color: Color) -> None","summary":"Sets the outline color of the bar at the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color for bar outline"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nChart.SetBarOutlineColor(index, Color.White);\nPrint(\"Outline color of bar {0} changed\", index);","python":"index = api.Bars.Count - 1\napi.Chart.SetBarOutlineColor(index, Color.White)\napi.Print(f\"Outline color of bar {index} changed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetBarOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores bar colour changes."}]}
{"id":"M:cAlgo.API.Chart.SetTickVolumeColor(System.Int64,cAlgo.API.Color)","kind":"method","name":"SetTickVolumeColor","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"void SetTickVolumeColor(long barIndex, Color color)","python":"api.Chart.SetTickVolumeColor(barIndex: int, color: Color) -> None","summary":"Sets the color of tick volume line at the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"long","pythonType":"int","summary":"The bar index number"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color for bar tick volume"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar color = Bars.TickVolumes[index] > Bars.TickVolumes[index - 1] ? Color.Green : Color.Red;\nChart.SetTickVolumeColor(index, color);","python":"index = api.Bars.Count - 1\ncolor = Color.Green if api.Bars.TickVolumes[index] > api.Bars.TickVolumes[index - 1] else Color.Red\napi.Chart.SetTickVolumeColor(index, color)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetTickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SetTickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"None","behaviour":"Does nothing: the cloud host ignores tick volume colour changes."}]}
{"id":"M:cAlgo.API.Chart.TakeChartshot","kind":"method","name":"TakeChartshot","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"byte[] TakeChartshot()","python":"api.Chart.TakeChartshot() -> list[int] | None","summary":"Takes a chartshot from the chart that indicator / cBot runs on.","remarks":"TakeChartshot only works if chart is visible.","parameters":[],"returns":{"csharpType":"byte[]","pythonType":"list[int]","summary":"If successful chartshot data inside a byte array in PNG format otherwise null.","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartshot = Chart.TakeChartshot();\nif (chartshot != null)\n    Print(\"Chartshot PNG size: {0} bytes\", chartshot.Length);\nelse\n    Print(\"Chartshot is not available, the chart is not visible\");","python":"chartshot = api.Chart.TakeChartshot()\nif chartshot is not None:\n    api.Print(f\"Chartshot PNG size: {chartshot.Length} bytes\")\nelse:\n    api.Print(\"Chartshot is not available, the chart is not visible\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TakeChartshot/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TakeChartshot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Returns an empty byte array and raises InvalidOperationException \"Chartshot is not available in current mode.\""},{"name":"Cloud","support":"None","behaviour":"Returns an empty byte array and raises InvalidOperationException \"Chartshot is not available in current mode.\""}]}
{"id":"M:cAlgo.API.Chart.TryChangeTimeFrame(cAlgo.API.TimeFrame)","kind":"method","name":"TryChangeTimeFrame","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool TryChangeTimeFrame(TimeFrame timeFrame)","python":"api.Chart.TryChangeTimeFrame(timeFrame: TimeFrame) -> bool","summary":"Changes the time frame on the chart.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame to change the current chart time frame to"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isChanged = Chart.TryChangeTimeFrame(TimeFrame.Hour4);\nPrint(\"Time frame changed: {0} | Current: {1}\", isChanged, Chart.TimeFrame);","python":"isChanged = api.Chart.TryChangeTimeFrame(TimeFrame.Hour4)\napi.Print(f\"Time frame changed: {isChanged} | Current: {api.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TryChangeTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TryChangeTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Chart.TryChangeTimeFrameAndSymbol(cAlgo.API.TimeFrame,System.String)","kind":"method","name":"TryChangeTimeFrameAndSymbol","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool TryChangeTimeFrameAndSymbol(TimeFrame timeFrame, string symbolName)","python":"api.Chart.TryChangeTimeFrameAndSymbol(timeFrame: TimeFrame, symbolName: str) -> bool","summary":"Changes the time frame and the symbol on the chart.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame to change the current chart time frame to"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name to change the current chart symbol to"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var isChanged = Chart.TryChangeTimeFrameAndSymbol(TimeFrame.Daily, \"GBPUSD\");\nPrint(\"Chart changed: {0} | {1} {2}\", isChanged, Chart.SymbolName, Chart.TimeFrame);","python":"isChanged = api.Chart.TryChangeTimeFrameAndSymbol(TimeFrame.Daily, \"GBPUSD\")\napi.Print(f\"Chart changed: {isChanged} | {api.Chart.SymbolName} {api.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TryChangeTimeFrameAndSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TryChangeTimeFrameAndSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"Bars Bars {get;}","python":"api.Chart.Bars: Bars","summary":"Gets the chart Bar objects.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartBars = Chart.Bars;\nPrint(\"Last chart bar: {0} | Close: {1}\", chartBars.LastBar.OpenTime, chartBars.LastBar.Close);","python":"chartBars = api.Chart.Bars\napi.Print(f\"Last chart bar: {chartBars.LastBar.OpenTime} | Close: {chartBars.LastBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.BarsTotal","kind":"property","name":"BarsTotal","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int BarsTotal {get;}","python":"api.Chart.BarsTotal: int","summary":"Gets the total number of the bars on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Bars loaded on the chart: {0}\", Chart.BarsTotal);","python":"api.Print(f\"Bars loaded on the chart: {api.Chart.BarsTotal}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/BarsTotal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/BarsTotal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.ChartType","kind":"property","name":"ChartType","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType ChartType {get; set;}","python":"api.Chart.ChartType: ChartType","summary":"Gets or sets the type of the chart - Bar, Candlesticks, Line or Dots chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ChartType = ChartType.Candlesticks;\nPrint(\"Chart type: {0}\", Chart.ChartType);","python":"api.Chart.ChartType = ChartType.Candlesticks\napi.Print(f\"Chart type: {api.Chart.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Starts as Candlesticks; a new value is only stored in the cBot and has no effect."}]}
{"id":"P:cAlgo.API.Chart.ColorSettings","kind":"property","name":"ColorSettings","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartColorSettings ColorSettings {get;}","python":"api.Chart.ColorSettings: ChartColorSettings","summary":"Gets the chart color settings.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartColorSettings","pythonType":"ChartColorSettings","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BackgroundColor = Color.Black;\nChart.ColorSettings.BullFillColor = Color.LimeGreen;\nPrint(\"Background: {0} | Bull fill: {1}\", Chart.ColorSettings.BackgroundColor, Chart.ColorSettings.BullFillColor);","python":"api.Chart.ColorSettings.BackgroundColor = Color.Black\napi.Chart.ColorSettings.BullFillColor = Color.LimeGreen\napi.Print(f\"Background: {api.Chart.ColorSettings.BackgroundColor} | Bull fill: {api.Chart.ColorSettings.BullFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ColorSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ColorSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Starts with empty default values, not a real chart's; changes are only stored in the cBot."}]}
{"id":"P:cAlgo.API.Chart.DisplaySettings","kind":"property","name":"DisplaySettings","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartDisplaySettings DisplaySettings {get;}","python":"api.Chart.DisplaySettings: ChartDisplaySettings","summary":"Gets the chart display settings.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartDisplaySettings","pythonType":"ChartDisplaySettings","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Grid = false;\nChart.DisplaySettings.TickVolume = true;\nPrint(\"Grid: {0} | Tick volume: {1}\", Chart.DisplaySettings.Grid, Chart.DisplaySettings.TickVolume);","python":"api.Chart.DisplaySettings.Grid = False\napi.Chart.DisplaySettings.TickVolume = True\napi.Print(f\"Grid: {api.Chart.DisplaySettings.Grid} | Tick volume: {api.Chart.DisplaySettings.TickVolume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DisplaySettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DisplaySettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Starts with empty default values, not a real chart's; changes are only stored in the cBot."}]}
{"id":"P:cAlgo.API.Chart.FirstVisibleBarIndex","kind":"property","name":"FirstVisibleBarIndex","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int FirstVisibleBarIndex {get;}","python":"api.Chart.FirstVisibleBarIndex: int","summary":"Gets the index of the first visible bar on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var firstIndex = Chart.FirstVisibleBarIndex;\nPrint(\"First visible bar: {0} opened at {1}\", firstIndex, Bars.OpenTimes[firstIndex]);","python":"firstIndex = api.Chart.FirstVisibleBarIndex\napi.Print(f\"First visible bar: {firstIndex} opened at {api.Bars.OpenTimes[firstIndex]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/FirstVisibleBarIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/FirstVisibleBarIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always 0: the cloud host reports an empty viewport."}]}
{"id":"P:cAlgo.API.Chart.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"Guid Id {get;}","python":"api.Chart.Id: Guid","summary":"Gets the unique Id of Chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Guid","pythonType":"Guid","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart id: {0}\", Chart.Id);","python":"api.Print(f\"Chart id: {api.Chart.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IndicatorAreas","kind":"property","name":"IndicatorAreas","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"IReadonlyList<IndicatorArea> IndicatorAreas {get;}","python":"api.Chart.IndicatorAreas: IReadonlyList[IndicatorArea]","summary":"Gets the read only list of the indicator areas.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorArea>","pythonType":"IReadonlyList[IndicatorArea]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Indicator areas: {0}\", Chart.IndicatorAreas.Count);\nforeach (var area in Chart.IndicatorAreas)\n    Print(\"Area height: {0} | Objects: {1}\", area.Height, area.Objects.Count);","python":"api.Print(f\"Indicator areas: {api.Chart.IndicatorAreas.Count}\")\nfor area in api.Chart.IndicatorAreas:\n    api.Print(f\"Area height: {area.Height} | Objects: {area.Objects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreas/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreas/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.Indicators","kind":"property","name":"Indicators","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartIndicators Indicators {get;}","python":"api.Chart.Indicators: ChartIndicators","summary":"Gets the ChartIndicators operating on a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIndicators","pythonType":"ChartIndicators","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Indicators on the chart: {0}\", Chart.Indicators.Count);\nforeach (var indicator in Chart.Indicators)\n    Print(\"Indicator: {0} | Panel: {1}\", indicator.Name, indicator.PanelIndex);","python":"api.Print(f\"Indicators on the chart: {api.Chart.Indicators.Count}\")\nfor indicator in api.Chart.Indicators:\n    api.Print(f\"Indicator: {indicator.Name} | Panel: {indicator.PanelIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Indicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Indicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IsActive","kind":"property","name":"IsActive","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsActive {get;}","python":"api.Chart.IsActive: bool","summary":"True if Chart is active otherwise False","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart is active: {0}\", Chart.IsActive);","python":"api.Print(f\"Chart is active: {api.Chart.IsActive}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsActive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsActive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IsPriceScaleInverted","kind":"property","name":"IsPriceScaleInverted","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsPriceScaleInverted {get; set;}","python":"api.Chart.IsPriceScaleInverted: bool","summary":"Gets or sets the value indicating whether the price scale of the chart main area is inverted, so the higher prices are displayed lower. BottomY is still the lowest visible price and TopY the highest. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.IsPriceScaleInverted = !Chart.IsPriceScaleInverted;\n\nPrint(\"Price scale inverted: {0} | Bottom Y: {1} | Top Y: {2}\", Chart.IsPriceScaleInverted, Chart.BottomY, Chart.TopY);","python":"api.Chart.IsPriceScaleInverted = not api.Chart.IsPriceScaleInverted\n\nprint(f\"Price scale inverted: {api.Chart.IsPriceScaleInverted} | Bottom Y: {api.Chart.BottomY} | Top Y: {api.Chart.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsPriceScaleInverted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsPriceScaleInverted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IsPriceToBarRatioLocked","kind":"property","name":"IsPriceToBarRatioLocked","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsPriceToBarRatioLocked {get; set;}","python":"api.Chart.IsPriceToBarRatioLocked: bool","summary":"Gets or sets the value indicating whether the price to bar ratio of the chart main area is locked. While locked, zooming keeps the same price distance per bar, the auto scale of the main area is disabled and the price scale mode is Regular. Locking switches Percent, IndexedTo100 and Logarithmic modes to Regular. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.IsPriceToBarRatioLocked = true;\n\nPrint(\"Price to bar ratio locked: {0} | Price scale mode: {1} | Auto scale: {2}\", Chart.IsPriceToBarRatioLocked, Chart.PriceScaleMode, Chart.IsAutoScaleEnabled);","python":"api.Chart.IsPriceToBarRatioLocked = True\n\nprint(f\"Price to bar ratio locked: {api.Chart.IsPriceToBarRatioLocked} | Price scale mode: {api.Chart.PriceScaleMode} | Auto scale: {api.Chart.IsAutoScaleEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsPriceToBarRatioLocked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsPriceToBarRatioLocked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IsScalePriceChartOnly","kind":"property","name":"IsScalePriceChartOnly","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsScalePriceChartOnly {get; set;}","python":"api.Chart.IsScalePriceChartOnly: bool","summary":"Gets or sets the value indicating whether the auto scale of the chart main area fits only the bars, ignoring the overlay indicator outputs and the chart objects. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.IsScalePriceChartOnly = true;\n\nPrint(\"Scale price chart only: {0}\", Chart.IsScalePriceChartOnly);","python":"api.Chart.IsScalePriceChartOnly = True\n\nprint(f\"Scale price chart only: {api.Chart.IsScalePriceChartOnly}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsScalePriceChartOnly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsScalePriceChartOnly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.IsScrollingEnabled","kind":"property","name":"IsScrollingEnabled","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsScrollingEnabled {get; set;}","python":"api.Chart.IsScrollingEnabled: bool","summary":"Gets or sets the value indicating whether the scrolling is enabled or disabled for the chart. If disabled, then the chart is not affected by scrolling, dragging, scaling, or pressing any keyboard keys, but is still affected by resizing, zooming, and API calls for changing X or Y-axis positions on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.IsScrollingEnabled = false;\nPrint(\"Chart scrolling enabled: {0}\", Chart.IsScrollingEnabled);","python":"api.Chart.IsScrollingEnabled = False\napi.Print(f\"Chart scrolling enabled: {api.Chart.IsScrollingEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsScrollingEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsScrollingEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Starts as false; a new value is only stored in the cBot and has no effect."}]}
{"id":"P:cAlgo.API.Chart.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsVisible {get;}","python":"api.Chart.IsVisible: bool","summary":"True if Chart is visible otherwise False.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Chart.IsVisible)\n    Print(\"Chart is visible, a chartshot can be taken\");","python":"if api.Chart.IsVisible:\n    api.Print(\"Chart is visible, a chartshot can be taken\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.LastVisibleBarIndex","kind":"property","name":"LastVisibleBarIndex","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int LastVisibleBarIndex {get;}","python":"api.Chart.LastVisibleBarIndex: int","summary":"Gets the index of the last visible bar on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastIndex = Chart.LastVisibleBarIndex;\nPrint(\"Last visible bar: {0} closed at {1}\", lastIndex, Bars.ClosePrices[lastIndex]);","python":"lastIndex = api.Chart.LastVisibleBarIndex\napi.Print(f\"Last visible bar: {lastIndex} closed at {api.Bars.ClosePrices[lastIndex]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/LastVisibleBarIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/LastVisibleBarIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always 0: the cloud host reports an empty viewport."}]}
{"id":"P:cAlgo.API.Chart.MaxBarWidth","kind":"property","name":"MaxBarWidth","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int MaxBarWidth {get; set;}","python":"api.Chart.MaxBarWidth: int","summary":"Gets or sets the maximum width of a single bar (the candle body) in pixels. When the chart is zoomed in, the bar body is never drawn wider than this value and the extra horizontal space is added to the gap between the bars. This is useful for footprint-style rendering where additional text must fit next to each bar.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"Chart.MaxBarWidth = 12;\nPrint(\"Maximum bar width: {0} pixels\", Chart.MaxBarWidth);","python":"api.Chart.MaxBarWidth = 12\napi.Print(f\"Maximum bar width: {api.Chart.MaxBarWidth} pixels\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/MaxBarWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/MaxBarWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Value is only stored in the cBot and has no effect."}]}
{"id":"P:cAlgo.API.Chart.MaxVisibleBars","kind":"property","name":"MaxVisibleBars","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int MaxVisibleBars {get;}","python":"api.Chart.MaxVisibleBars: int","summary":"Gets the maximum number of the visible bars on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The chart can show up to {0} bars at the current zoom\", Chart.MaxVisibleBars);","python":"api.Print(f\"The chart can show up to {api.Chart.MaxVisibleBars} bars at the current zoom\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/MaxVisibleBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/MaxVisibleBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always 0: the cloud host reports an empty viewport."}]}
{"id":"P:cAlgo.API.Chart.PriceAxisPosition","kind":"property","name":"PriceAxisPosition","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceAxisPosition PriceAxisPosition {get; set;}","python":"api.Chart.PriceAxisPosition: ChartPriceAxisPosition","summary":"Gets or sets the side of the chart where the price axis of the main area and of all the indicator areas is displayed. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceAxisPosition","pythonType":"ChartPriceAxisPosition","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceAxisPosition = ChartPriceAxisPosition.Left;\n\nPrint(\"Price axis position: {0}\", Chart.PriceAxisPosition);","python":"api.Chart.PriceAxisPosition = ChartPriceAxisPosition.Left\n\nprint(f\"Price axis position: {api.Chart.PriceAxisPosition}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceAxisPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceAxisPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.PriceScaleBasePrice","kind":"property","name":"PriceScaleBasePrice","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"double PriceScaleBasePrice {get;}","python":"api.Chart.PriceScaleBasePrice: float","summary":"Gets the base price used by the Percent and IndexedTo100 price scale modes, which is the close price of the first visible bar. Returns NaN in the Regular and Logarithmic modes, and in the silent backtesting, the CLI and the cloud.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceScaleMode = ChartPriceScaleMode.IndexedTo100;\n\nif (!double.IsNaN(Chart.PriceScaleBasePrice))\n    Print(\"Price scale base price: {0}\", Chart.PriceScaleBasePrice);\nelse\n    Print(\"Price scale base price is not available\");","python":"import math\n\napi.Chart.PriceScaleMode = ChartPriceScaleMode.IndexedTo100\n\nif not math.isnan(api.Chart.PriceScaleBasePrice):\n    print(f\"Price scale base price: {api.Chart.PriceScaleBasePrice}\")\nelse:\n    print(\"Price scale base price is not available\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceScaleBasePrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceScaleBasePrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.PriceScaleMode","kind":"property","name":"PriceScaleMode","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceScaleMode PriceScaleMode {get; set;}","python":"api.Chart.PriceScaleMode: ChartPriceScaleMode","summary":"Gets or sets the price scale mode of the chart main area. Percent and IndexedTo100 enable the auto scale of the main area. While the price to bar ratio is locked only Regular can be set, and setting any other mode is ignored. Logarithmic works for every price, zero and negative prices are drawn on a logarithmic scale mirrored below zero. The Y-axis values used by the API stay in price units in every mode. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceScaleMode = ChartPriceScaleMode.Logarithmic;\n\nPrint(\"Price scale mode: {0}\", Chart.PriceScaleMode);","python":"api.Chart.PriceScaleMode = ChartPriceScaleMode.Logarithmic\n\nprint(f\"Price scale mode: {api.Chart.PriceScaleMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.PriceToBarRatio","kind":"property","name":"PriceToBarRatio","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"double PriceToBarRatio {get; set;}","python":"api.Chart.PriceToBarRatio: float","summary":"Gets or sets the price to bar ratio of the chart main area: the price distance displayed per one bar width. Used while the price to bar ratio is locked. Values that are not greater than zero, NaN or infinite are ignored. Setting this value does not lock the ratio.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceToBarRatio = Symbol.PipSize * 10;\nChart.IsPriceToBarRatioLocked = true;\n\nPrint(\"Price to bar ratio: {0}\", Chart.PriceToBarRatio);","python":"api.Chart.PriceToBarRatio = api.Symbol.PipSize * 10\napi.Chart.IsPriceToBarRatioLocked = True\n\nprint(f\"Price to bar ratio: {api.Chart.PriceToBarRatio}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceToBarRatio/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/PriceToBarRatio/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.Robots","kind":"property","name":"Robots","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRobots Robots {get;}","python":"api.Chart.Robots: ChartRobots","summary":"Gets the ChartRobots operating on a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRobots","pythonType":"ChartRobots","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"cBots on the chart: {0}\", Chart.Robots.Count);\nforeach (var robot in Chart.Robots)\n    Print(\"cBot: {0} | State: {1}\", robot.Name, robot.State);","python":"api.Print(f\"cBots on the chart: {api.Chart.Robots.Count}\")\nfor robot in api.Chart.Robots:\n    api.Print(f\"cBot: {robot.Name} | State: {robot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Robots/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Robots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"Symbol Symbol {get;}","python":"api.Chart.Symbol: Symbol","summary":"Gets the chart symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartSymbol = Chart.Symbol;\nPrint(\"Chart symbol: {0} | Bid: {1} | Ask: {2}\", chartSymbol.Name, chartSymbol.Bid, chartSymbol.Ask);","python":"chartSymbol = api.Chart.Symbol\napi.Print(f\"Chart symbol: {chartSymbol.Name} | Bid: {chartSymbol.Bid} | Ask: {chartSymbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"string SymbolName {get;}","python":"api.Chart.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart symbol name: {0}\", Chart.SymbolName);","python":"api.Print(f\"Chart symbol name: {api.Chart.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"TimeFrame TimeFrame {get;}","python":"api.Chart.TimeFrame: TimeFrame","summary":"Gets the time frame of the chart from 1 minute to 1 month.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart time frame: {0}\", Chart.TimeFrame);\nif (Chart.TimeFrame == TimeFrame.Hour)\n    Print(\"The chart shows hourly bars\");","python":"api.Print(f\"Chart time frame: {api.Chart.TimeFrame}\")\nif api.Chart.TimeFrame == TimeFrame.Hour:\n    api.Print(\"The chart shows hourly bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.ZoomLevel","kind":"property","name":"ZoomLevel","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int ZoomLevel {get; set;}","python":"api.Chart.ZoomLevel: int","summary":"Gets or sets the zoom percent values. Valid values are from 5 to 500 with a step of 5, as can be seen on UI in the charts Zoom control.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ZoomLevel = 50;\nPrint(\"Chart zoom level: {0}%\", Chart.ZoomLevel);","python":"api.Chart.ZoomLevel = 50\napi.Print(f\"Chart zoom level: {api.Chart.ZoomLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ZoomLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ZoomLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Applied to a chart that is never displayed in the CLI; no visual effect."},{"name":"Cloud","support":"Partial","behaviour":"Starts at the default zoom; a new value is only stored in the cBot and has no effect."}]}
{"id":"E:cAlgo.API.Chart.Activated","kind":"event","name":"Activated","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartActivationChangedEventArgs> Activated;","python":"api.Chart.Activated += handler  # handler(obj: ChartActivationChangedEventArgs)","summary":"Occurs when chart is activated","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartActivationChangedEventArgs>","pythonType":"Callable[[ChartActivationChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Activated += OnChartActivated;\n}\n\nprivate void OnChartActivated(ChartActivationChangedEventArgs args)\n{\n    Print(\"Chart activated: {0}\", args.Chart.SymbolName);\n}","python":"def on_start(self):\n    api.Chart.Activated += self.on_chart_activated\n\ndef on_chart_activated(self, args):\n    api.Print(f\"Chart activated: {args.Chart.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Activated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Activated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: the CLI has no chart window."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud has no chart window."}]}
{"id":"E:cAlgo.API.Chart.ChartTypeChanged","kind":"event","name":"ChartTypeChanged","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartTypeEventArgs> ChartTypeChanged;","python":"api.Chart.ChartTypeChanged += handler  # handler(obj: ChartTypeEventArgs)","summary":"Occurs when the chart type changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartTypeEventArgs>","pythonType":"Callable[[ChartTypeEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ChartTypeChanged += OnChartTypeChanged;\n}\n\nprivate void OnChartTypeChanged(ChartTypeEventArgs args)\n{\n    Print(\"Chart type changed to {0}\", args.Chart.ChartType);\n}","python":"def on_start(self):\n    api.Chart.ChartTypeChanged += self.on_chart_type_changed\n\ndef on_chart_type_changed(self, args):\n    api.Print(f\"Chart type changed to {args.Chart.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ChartTypeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ChartTypeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Only the cBot's own changes can raise it; no user can change a chart in the CLI."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud host does not report chart type changes."}]}
{"id":"E:cAlgo.API.Chart.ColorsChanged","kind":"event","name":"ColorsChanged","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartColorEventArgs> ColorsChanged;","python":"api.Chart.ColorsChanged += handler  # handler(obj: ChartColorEventArgs)","summary":"Occurs when the chart color settings change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartColorEventArgs>","pythonType":"Callable[[ChartColorEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ColorsChanged += OnColorsChanged;\n}\n\nprivate void OnColorsChanged(ChartColorEventArgs args)\n{\n    Print(\"Chart colors changed | Background: {0}\", args.Chart.ColorSettings.BackgroundColor);\n}","python":"def on_start(self):\n    api.Chart.ColorsChanged += self.on_colors_changed\n\ndef on_colors_changed(self, args):\n    api.Print(f\"Chart colors changed | Background: {args.Chart.ColorSettings.BackgroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ColorsChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ColorsChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Only the cBot's own changes can raise it; no user can change a chart in the CLI."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud host does not report colour changes."}]}
{"id":"E:cAlgo.API.Chart.Deactivated","kind":"event","name":"Deactivated","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartActivationChangedEventArgs> Deactivated;","python":"api.Chart.Deactivated += handler  # handler(obj: ChartActivationChangedEventArgs)","summary":"Occurs when chart is deactivated","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartActivationChangedEventArgs>","pythonType":"Callable[[ChartActivationChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Deactivated += OnChartDeactivated;\n}\n\nprivate void OnChartDeactivated(ChartActivationChangedEventArgs args)\n{\n    Print(\"Chart deactivated: {0}\", args.Chart.SymbolName);\n}","python":"def on_start(self):\n    api.Chart.Deactivated += self.on_chart_deactivated\n\ndef on_chart_deactivated(self, args):\n    api.Print(f\"Chart deactivated: {args.Chart.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Deactivated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/Deactivated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: the CLI has no chart window."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud has no chart window."}]}
{"id":"E:cAlgo.API.Chart.DisplaySettingsChanged","kind":"event","name":"DisplaySettingsChanged","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartDisplaySettingsEventArgs> DisplaySettingsChanged;","python":"api.Chart.DisplaySettingsChanged += handler  # handler(obj: ChartDisplaySettingsEventArgs)","summary":"Occurs when one or several charts display settings change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartDisplaySettingsEventArgs>","pythonType":"Callable[[ChartDisplaySettingsEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.DisplaySettingsChanged += OnDisplaySettingsChanged;\n}\n\nprivate void OnDisplaySettingsChanged(ChartDisplaySettingsEventArgs args)\n{\n    Print(\"Display settings changed | Grid: {0}\", args.Chart.DisplaySettings.Grid);\n}","python":"def on_start(self):\n    api.Chart.DisplaySettingsChanged += self.on_display_settings_changed\n\ndef on_display_settings_changed(self, args):\n    api.Print(f\"Display settings changed | Grid: {args.Chart.DisplaySettings.Grid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DisplaySettingsChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/DisplaySettingsChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Only the cBot's own changes can raise it; no user can change a chart in the CLI."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud host does not report display setting changes."}]}
{"id":"E:cAlgo.API.Chart.IndicatorAreaAdded","kind":"event","name":"IndicatorAreaAdded","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<IndicatorAreaAddedEventArgs> IndicatorAreaAdded;","python":"api.Chart.IndicatorAreaAdded += handler  # handler(obj: IndicatorAreaAddedEventArgs)","summary":"Occurs when the indicator area is added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<IndicatorAreaAddedEventArgs>","pythonType":"Callable[[IndicatorAreaAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.IndicatorAreaAdded += OnIndicatorAreaAdded;\n}\n\nprivate void OnIndicatorAreaAdded(IndicatorAreaAddedEventArgs args)\n{\n    Print(\"Indicator area added | Areas: {0}\", args.Chart.IndicatorAreas.Count);\n}","python":"def on_start(self):\n    api.Chart.IndicatorAreaAdded += self.on_indicator_area_added\n\ndef on_indicator_area_added(self, args):\n    api.Print(f\"Indicator area added | Areas: {args.Chart.IndicatorAreas.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreaAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreaAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Chart.IndicatorAreaRemoved","kind":"event","name":"IndicatorAreaRemoved","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<IndicatorAreaRemovedEventArgs> IndicatorAreaRemoved;","python":"api.Chart.IndicatorAreaRemoved += handler  # handler(obj: IndicatorAreaRemovedEventArgs)","summary":"Occurs when the indicator area is removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<IndicatorAreaRemovedEventArgs>","pythonType":"Callable[[IndicatorAreaRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.IndicatorAreaRemoved += OnIndicatorAreaRemoved;\n}\n\nprivate void OnIndicatorAreaRemoved(IndicatorAreaRemovedEventArgs args)\n{\n    Print(\"Indicator area removed | Areas: {0}\", args.Chart.IndicatorAreas.Count);\n}","python":"def on_start(self):\n    api.Chart.IndicatorAreaRemoved += self.on_indicator_area_removed\n\ndef on_indicator_area_removed(self, args):\n    api.Print(f\"Indicator area removed | Areas: {args.Chart.IndicatorAreas.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreaRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/IndicatorAreaRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Chart.KeyDown","kind":"event","name":"KeyDown","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartKeyboardEventArgs> KeyDown;","python":"api.Chart.KeyDown += handler  # handler(obj: ChartKeyboardEventArgs)","summary":"Occurs when a keyboard key pressed while the mouse cursor is over the chart","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartKeyboardEventArgs>","pythonType":"Callable[[ChartKeyboardEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    Print(\"Key pressed: {0} | Ctrl: {1} | Shift: {2}\", args.Key, args.CtrlKey, args.ShiftKey);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    api.Print(f\"Key pressed: {args.Key} | Ctrl: {args.CtrlKey} | Shift: {args.ShiftKey}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/KeyDown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/KeyDown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: the CLI has no keyboard input."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud has no keyboard input."}]}
{"id":"E:cAlgo.API.Chart.VisibilityChanged","kind":"event","name":"VisibilityChanged","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartVisibilityChangedEventArgs> VisibilityChanged;","python":"api.Chart.VisibilityChanged += handler  # handler(obj: ChartVisibilityChangedEventArgs)","summary":"Occurs when chart visibility changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartVisibilityChangedEventArgs>","pythonType":"Callable[[ChartVisibilityChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.VisibilityChanged += OnChartVisibilityChanged;\n}\n\nprivate void OnChartVisibilityChanged(ChartVisibilityChangedEventArgs args)\n{\n    Print(\"Chart visible: {0}\", args.Chart.IsVisible);\n}","python":"def on_start(self):\n    api.Chart.VisibilityChanged += self.on_chart_visibility_changed\n\ndef on_chart_visibility_changed(self, args):\n    api.Print(f\"Chart visible: {args.Chart.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/VisibilityChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/VisibilityChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud displays no chart."}]}
{"id":"E:cAlgo.API.Chart.ZoomChanged","kind":"event","name":"ZoomChanged","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartZoomEventArgs> ZoomChanged;","python":"api.Chart.ZoomChanged += handler  # handler(obj: ChartZoomEventArgs)","summary":"Occurs when the chart zoom options change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartZoomEventArgs>","pythonType":"Callable[[ChartZoomEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ZoomChanged += OnZoomChanged;\n}\n\nprivate void OnZoomChanged(ChartZoomEventArgs args)\n{\n    Print(\"Chart zoom changed to {0}%\", args.Chart.ZoomLevel);\n}","python":"def on_start(self):\n    api.Chart.ZoomChanged += self.on_zoom_changed\n\ndef on_zoom_changed(self, args):\n    api.Print(f\"Chart zoom changed to {args.Chart.ZoomLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ZoomChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/ZoomChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Only the cBot's own changes can raise it; no user can zoom a chart in the CLI."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud host does not report zoom changes."}]}
{"id":"P:cAlgo.API.Chart.Zoom","kind":"property","name":"Zoom","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"int Zoom {get; set;}","python":"api.Chart.Zoom: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use ZoomLevel instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Chart.MarketSeries","kind":"property","name":"MarketSeries","type":"T:cAlgo.API.Chart","namespace":"cAlgo.API","group":"Chart","csharp":"MarketSeries MarketSeries {get;}","python":"api.Chart.MarketSeries: MarketSeries","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSeries","pythonType":"MarketSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Bars instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartActivationChangedEventArgs","kind":"class","name":"ChartActivationChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartActivationChangedEventArgs","python":"ChartActivationChangedEventArgs","summary":"Provides data for chart activated/deactivated events","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Activated += OnChartActivationChanged;\n    Chart.Deactivated += OnChartActivationChanged;\n}\n\nprivate void OnChartActivationChanged(ChartActivationChangedEventArgs args)\n{\n    Print(\"Chart {0} {1} is active: {2}\", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.IsActive);\n}","python":"def on_start(self):\n    api.Chart.Activated += self.on_chart_activation_changed\n    api.Chart.Deactivated += self.on_chart_activation_changed\n\ndef on_chart_activation_changed(self, args):\n    api.Print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} is active: {args.Chart.IsActive}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.Activated, Chart.Deactivated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.Activated, Chart.Deactivated)."}]}
{"id":"P:cAlgo.API.ChartActivationChangedEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartActivationChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartActivationChangedEventArgs.Chart: Chart","summary":"The chart that event belongs to","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Activated += OnChartActivated;\n}\n\nprivate void OnChartActivated(ChartActivationChangedEventArgs args)\n{\n    Print(\"Activated chart: {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.Activated += self.on_chart_activated\n\ndef on_chart_activated(self, args):\n    api.Print(f\"Activated chart: {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.Activated, Chart.Deactivated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.Activated, Chart.Deactivated)."}]}
{"id":"T:cAlgo.API.ChartAndrewsPitchfork","kind":"interface","name":"ChartAndrewsPitchfork","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartAndrewsPitchfork","python":"ChartAndrewsPitchfork","summary":"Represents the Andrew's Pitchfork chart object. A tool that helps to identify possible support and resistance levels with the three parallel lines.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This indicator shows how to draw an Andrews Pitchfork by using Chart.DrawAndrewsPitchfork method\n    public partial class AndrewsPitchforkSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var barIndex1 = Chart.FirstVisibleBarIndex;\n            var barIndex2 = Chart.FirstVisibleBarIndex + ((Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex) / 5);\n            var barIndex3 = Chart.FirstVisibleBarIndex + ((Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex) / 2);\n\n            var y1 = Bars.ClosePrices[barIndex1];\n            var y2 = Bars.ClosePrices[barIndex2];\n            var y3 = Bars.ClosePrices[barIndex3];\n\n            var andrewsPitchfork = Chart.DrawAndrewsPitchfork(\"AndrewsPitchfork\", barIndex1, y1, barIndex2, y2, barIndex3, y3, Color.Red);\n\n            andrewsPitchfork.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        barIndex1 = api.Chart.FirstVisibleBarIndex\n        barIndex2 = api.Chart.FirstVisibleBarIndex + ((api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex) // 5)\n        barIndex3 = api.Chart.FirstVisibleBarIndex + ((api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex) // 2)\n        y1 = api.Bars.ClosePrices[barIndex1]\n        y2 = api.Bars.ClosePrices[barIndex2]\n        y3 = api.Bars.ClosePrices[barIndex3]\n        andrewsPitchfork = api.Chart.DrawAndrewsPitchfork(\"AndrewsPitchfork\", barIndex1, y1, barIndex2, y2, barIndex3, y3, Color.Red)\n        andrewsPitchfork.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartAndrewsPitchfork.CalculateY(System.Int32)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(int barIndex)","python":"chartAndrewsPitchfork.CalculateY(barIndex: int) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nvar medianValue = pitchfork.CalculateY(Bars.Count - 1);\nPrint(\"Median line value at the last bar: {0}\", medianValue);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nmedianValue = pitchfork.CalculateY(api.Bars.Count - 1)\napi.Print(f\"Median line value at the last bar: {medianValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartAndrewsPitchfork.CalculateY(System.DateTime)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(DateTime time)","python":"chartAndrewsPitchfork.CalculateY(time: DateTime) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nvar medianValue = pitchfork.CalculateY(Bars.OpenTimes.LastValue);\nPrint(\"Median line value at {0}: {1}\", Bars.OpenTimes.LastValue, medianValue);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nmedianValue = pitchfork.CalculateY(api.Bars.OpenTimes.LastValue)\napi.Print(f\"Median line value at {api.Bars.OpenTimes.LastValue}: {medianValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartAndrewsPitchfork.Color: Color","summary":"Gets or sets the chart object lines color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Color = Color.DodgerBlue;\nPrint(\"Color: {0}\", pitchfork.Color);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Color = Color.DodgerBlue\napi.Print(f\"Color: {pitchfork.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartAndrewsPitchfork.LineStyle: LineStyle","summary":"Gets or sets the chart object lines style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.LineStyle = LineStyle.DotsRare;\nPrint(\"Line style: {0}\", pitchfork.LineStyle);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.LineStyle = LineStyle.DotsRare\napi.Print(f\"Line style: {pitchfork.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartAndrewsPitchfork.Thickness: int","summary":"Gets or sets the chart object lines thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Thickness = 3;\nPrint(\"Thickness: {0}\", pitchfork.Thickness);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Thickness = 3\napi.Print(f\"Thickness: {pitchfork.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time1 {get; set;}","python":"chartAndrewsPitchfork.Time1: DateTime","summary":"Gets or sets the time value for the Andrew's Pitchfork point 1.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Time1 = Bars.OpenTimes.Last(35);\nPrint(\"Point 1 time: {0}\", pitchfork.Time1);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Time1 = api.Bars.OpenTimes.Last(35)\napi.Print(f\"Point 1 time: {pitchfork.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time2 {get; set;}","python":"chartAndrewsPitchfork.Time2: DateTime","summary":"Gets or sets the time value for the Andrew's Pitchfork point 2.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Time2 = Bars.OpenTimes.Last(22);\nPrint(\"Point 2 time: {0}\", pitchfork.Time2);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Time2 = api.Bars.OpenTimes.Last(22)\napi.Print(f\"Point 2 time: {pitchfork.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Time3","kind":"property","name":"Time3","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time3 {get; set;}","python":"chartAndrewsPitchfork.Time3: DateTime","summary":"Gets or sets the time value for the Andrew's Pitchfork point 3.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Time3 = Bars.OpenTimes.Last(5);\nPrint(\"Point 3 time: {0}\", pitchfork.Time3);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Time3 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Point 3 time: {pitchfork.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Time3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y1 {get; set;}","python":"chartAndrewsPitchfork.Y1: float","summary":"Gets or sets the Y-axis value for the Andrew's Pitchfork point 1.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Y1 = Bars.LowPrices.Last(30) - 10 * Symbol.PipSize;\nPrint(\"Point 1 price: {0}\", pitchfork.Y1);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Y1 = api.Bars.LowPrices.Last(30) - 10 * api.Symbol.PipSize\napi.Print(f\"Point 1 price: {pitchfork.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y2 {get; set;}","python":"chartAndrewsPitchfork.Y2: float","summary":"Gets or sets the Y-axis value for the Andrew's Pitchfork point 2.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Y2 = Bars.HighPrices.Last(20) + 10 * Symbol.PipSize;\nPrint(\"Point 2 price: {0}\", pitchfork.Y2);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Y2 = api.Bars.HighPrices.Last(20) + 10 * api.Symbol.PipSize\napi.Print(f\"Point 2 price: {pitchfork.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartAndrewsPitchfork.Y3","kind":"property","name":"Y3","type":"T:cAlgo.API.ChartAndrewsPitchfork","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y3 {get; set;}","python":"chartAndrewsPitchfork.Y3: float","summary":"Gets or sets the Y-axis value for the Andrew's Pitchfork point 3.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\npitchfork.Y3 = Bars.ClosePrices.Last(10);\nPrint(\"Point 3 price: {0}\", pitchfork.Y3);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\npitchfork.Y3 = api.Bars.ClosePrices.Last(10)\napi.Print(f\"Point 3 price: {pitchfork.Y3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartAndrewsPitchfork/Y3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartArea","kind":"interface","name":"ChartArea","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartArea","python":"ChartArea","summary":"The Chart Area Interface.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ChartArea area = Chart.IndicatorAreas.Count > 0 ? Chart.IndicatorAreas[0] : Chart;\narea.DrawHorizontalLine(\"middle\", area.BottomY + (area.TopY - area.BottomY) / 2, Color.Gray);\nPrint(\"Area size: {0}x{1} | Objects: {2}\", area.Width, area.Height, area.Objects.Count);","python":"area = api.Chart.IndicatorAreas[0] if api.Chart.IndicatorAreas.Count > 0 else api.Chart\narea.DrawHorizontalLine(\"middle\", area.BottomY + (area.TopY - area.BottomY) / 2, Color.Gray)\napi.Print(f\"Area size: {area.Width}x{area.Height} | Objects: {area.Objects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control)","python":"chartArea.AddControl(control: ControlBase) -> None","summary":"Adds a chart control from the Control Base to the main chart area or to the indicator area.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Top };\nbutton.Click += args => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.HorizontalAlignment = HorizontalAlignment.Right\nbutton.VerticalAlignment = VerticalAlignment.Top\nbutton.Click += lambda args: api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase,System.Int32,System.Double)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control, int barIndex, double y)","python":"chartArea.AddControl(control: ControlBase, barIndex: int, y: float) -> None","summary":"Adds a chart control to chart / indicator area on absolute bar index and price (x,y) coordinates.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"High\", ForegroundColor = Color.Yellow };\nChart.AddControl(label, Bars.Count - 1, Bars.HighPrices.LastValue);","python":"label = TextBlock()\nlabel.Text = \"High\"\nlabel.ForegroundColor = Color.Yellow\napi.Chart.AddControl(label, api.Bars.Count - 1, api.Bars.HighPrices.LastValue)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase,System.DateTime,System.Double)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control, DateTime time, double y)","python":"chartArea.AddControl(control: ControlBase, time: DateTime, y: float) -> None","summary":"Adds a chart control to chart / indicator area on absolute time and price (x,y) coordinates.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Time"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Low\", ForegroundColor = Color.Orange };\nChart.AddControl(label, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue);","python":"label = TextBlock()\nlabel.Text = \"Low\"\nlabel.ForegroundColor = Color.Orange\napi.Chart.AddControl(label, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase,System.DateTime)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control, DateTime time)","python":"chartArea.AddControl(control: ControlBase, time: DateTime) -> None","summary":"Adds a chart control to chart / indicator area on absolute time (x) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Time"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Session open\", VerticalAlignment = VerticalAlignment.Top };\nChart.AddControl(label, Server.Time.Date);","python":"label = TextBlock()\nlabel.Text = \"Session open\"\nlabel.VerticalAlignment = VerticalAlignment.Top\napi.Chart.AddControl(label, api.Server.Time.Date)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase,System.Int32)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control, int barIndex)","python":"chartArea.AddControl(control: ControlBase, barIndex: int) -> None","summary":"Adds a chart control to chart / indicator area on absolute bar index (x) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Last bar\", VerticalAlignment = VerticalAlignment.Bottom };\nChart.AddControl(label, Bars.Count - 1);","python":"label = TextBlock()\nlabel.Text = \"Last bar\"\nlabel.VerticalAlignment = VerticalAlignment.Bottom\napi.Chart.AddControl(label, api.Bars.Count - 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.AddControl(cAlgo.API.ControlBase,System.Double)","kind":"method","name":"AddControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void AddControl(ControlBase control, double y)","python":"chartArea.AddControl(control: ControlBase, y: float) -> None","summary":"Adds a chart control to chart / indicator area on absolute price (y) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Bid\", HorizontalAlignment = HorizontalAlignment.Right };\nChart.AddControl(label, Symbol.Bid);","python":"label = TextBlock()\nlabel.Text = \"Bid\"\nlabel.HorizontalAlignment = HorizontalAlignment.Right\napi.Chart.AddControl(label, api.Symbol.Bid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/AddControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"The control is accepted but never displayed: the CLI displays no chart."},{"name":"Cloud","support":"None","behaviour":"The control is accepted but never displayed: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.BarIndexToX(System.Double)","kind":"method","name":"BarIndexToX","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double BarIndexToX(double barIndex)","python":"chartArea.BarIndexToX(barIndex: float) -> float","summary":"Converts Bar Index to X coordinate.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"double","pythonType":"float","summary":"Bar Index"}],"returns":{"csharpType":"double","pythonType":"float","summary":"X Coordinate","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var x = Chart.BarIndexToX(Chart.LastVisibleBarIndex);\nPrint(\"Last visible bar is at X: {0}\", x);","python":"x = api.Chart.BarIndexToX(api.Chart.LastVisibleBarIndex)\napi.Print(f\"Last visible bar is at X: {x}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/BarIndexToX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/BarIndexToX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns 0; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns 0; no conversion is done."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color)","python":"chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color) -> ChartAndrewsPitchfork","summary":"Draws an Andrew's pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nPrint(\"Pitchfork drawn from {0} to {1}\", pitchfork.Time1, pitchfork.Time3);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\napi.Print(f\"Pitchfork drawn from {pitchfork.Time1} to {pitchfork.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness)","python":"chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int) -> ChartAndrewsPitchfork","summary":"Draws an Andrew's pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Andrew's pitchfork lines thickness."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2);\nPrint(\"Pitchfork thickness: {0}\", pitchfork.Thickness);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2)\napi.Print(f\"Pitchfork thickness: {pitchfork.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawAndrewsPitchfork(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartAndrewsPitchfork","summary":"Draws an Andrew's pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Andrew's pitchfork lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Andrew's pitchfork lines style."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots);\nPrint(\"Pitchfork style: {0}\", pitchfork.LineStyle);","python":"pitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Pitchfork style: {pitchfork.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color)","python":"chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color) -> ChartAndrewsPitchfork","summary":"Draws an Andrew's pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red);\nPrint(\"Pitchfork drawn from {0} to {1}\", pitchfork.Time1, pitchfork.Time3);","python":"index = api.Bars.Count - 1\npitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red)\napi.Print(f\"Pitchfork drawn from {pitchfork.Time1} to {pitchfork.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness)","python":"chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int) -> ChartAndrewsPitchfork","summary":"Draws an Andrews pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Andrew's pitchfork lines thickness."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2);\nPrint(\"Pitchfork thickness: {0}\", pitchfork.Thickness);","python":"index = api.Bars.Count - 1\npitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2)\napi.Print(f\"Pitchfork thickness: {pitchfork.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawAndrewsPitchfork(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawAndrewsPitchfork","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawAndrewsPitchfork(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartAndrewsPitchfork","summary":"Draws an Andrew's pitchfork.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Andrew's pitchfork point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Andrew's pitchfork point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Andrew's pitchfork lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Andrew's pitchfork lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Andrew's pitchfork lines style."}],"returns":{"csharpType":"ChartAndrewsPitchfork","pythonType":"ChartAndrewsPitchfork","summary":"ChartAndrewsPitchfork.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar pitchfork = Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots);\nPrint(\"Pitchfork style: {0}\", pitchfork.LineStyle);","python":"index = api.Bars.Count - 1\npitchfork = api.Chart.DrawAndrewsPitchfork(\"pitchfork\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Pitchfork style: {pitchfork.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawAndrewsPitchfork/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawArrow(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nPrint(\"Arrow drawn from {0} to {1}\", arrow.Time1, arrow.Time2);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\napi.Print(f\"Arrow drawn from {arrow.Time1} to {arrow.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawArrow(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);\nPrint(\"Arrow thickness: {0}\", arrow.Thickness);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2)\napi.Print(f\"Arrow thickness: {arrow.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawArrow(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The trend line style."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);\nPrint(\"Arrow style: {0}\", arrow.LineStyle);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Arrow style: {arrow.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawArrow(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arrow = Chart.DrawArrow(\"arrow\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Red);\nPrint(\"Arrow drawn from {0} to {1}\", arrow.Time1, arrow.Time2);","python":"index = api.Bars.Count - 1\narrow = api.Chart.DrawArrow(\"arrow\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Red)\napi.Print(f\"Arrow drawn from {arrow.Time1} to {arrow.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawArrow(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arrow = Chart.DrawArrow(\"arrow\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Red, 2);\nPrint(\"Arrow thickness: {0}\", arrow.Thickness);","python":"index = api.Bars.Count - 1\narrow = api.Chart.DrawArrow(\"arrow\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Red, 2)\napi.Print(f\"Arrow thickness: {arrow.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawArrow(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawArrow","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawArrow(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartArrow","summary":"Draws an arrow.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The trend line style."}],"returns":{"csharpType":"ChartArrow","pythonType":"ChartArrow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arrow = Chart.DrawArrow(\"arrow\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Arrow style: {0}\", arrow.LineStyle);","python":"index = api.Bars.Count - 1\narrow = api.Chart.DrawArrow(\"arrow\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Arrow style: {arrow.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottCorrection(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color)","kind":"method","name":"DrawElliottCorrection","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color)","python":"chartArea.DrawElliottCorrection(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, color: Color) -> ChartElliottCorrection","summary":"Draws an Elliott Correction Wave (A-B-C).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Correction Wave lines color."}],"returns":{"csharpType":"ChartElliottCorrection","pythonType":"ChartElliottCorrection","summary":"ChartElliottCorrection.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\nPrint(\"Correction wave C at {0}\", correction.WaveC.Y);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\napi.Print(f\"Correction wave C at {correction.WaveC.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottCorrection(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawElliottCorrection","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color, int thickness)","python":"chartArea.DrawElliottCorrection(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, color: Color, thickness: int) -> ChartElliottCorrection","summary":"Draws an Elliott Correction Wave (A-B-C).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Correction Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Correction Wave lines thickness."}],"returns":{"csharpType":"ChartElliottCorrection","pythonType":"ChartElliottCorrection","summary":"ChartElliottCorrection.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue, 2);\nPrint(\"Correction thickness: {0}\", correction.Thickness);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue, 2)\napi.Print(f\"Correction thickness: {correction.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottCorrection(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawElliottCorrection","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawElliottCorrection(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, color: Color, thickness: int, lineStyle: LineStyle) -> ChartElliottCorrection","summary":"Draws an Elliott Correction Wave (A-B-C).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Correction Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Correction Wave lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Elliott Correction Wave lines style."}],"returns":{"csharpType":"ChartElliottCorrection","pythonType":"ChartElliottCorrection","summary":"ChartElliottCorrection.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue, 2, LineStyle.Dots);\nPrint(\"Correction style: {0}\", correction.LineStyle);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Correction style: {correction.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottCorrection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottDoubleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color)","kind":"method","name":"DrawElliottDoubleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color)","python":"chartArea.DrawElliottDoubleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX: ChartPoint, waveY: ChartPoint, color: Color) -> ChartElliottDoubleCombo","summary":"Draws an Elliott Double Combo Wave (W-X-Y).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave X anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Double Combo Wave lines color."}],"returns":{"csharpType":"ChartElliottDoubleCombo","pythonType":"ChartElliottDoubleCombo","summary":"ChartElliottDoubleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange);\nPrint(\"Double combo wave Y at {0}\", combo.WaveY.Y);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange)\napi.Print(f\"Double combo wave Y at {combo.WaveY.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottDoubleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawElliottDoubleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color, int thickness)","python":"chartArea.DrawElliottDoubleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX: ChartPoint, waveY: ChartPoint, color: Color, thickness: int) -> ChartElliottDoubleCombo","summary":"Draws an Elliott Double Combo Wave (W-X-Y).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave X anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Double Combo Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Double Combo Wave lines thickness."}],"returns":{"csharpType":"ChartElliottDoubleCombo","pythonType":"ChartElliottDoubleCombo","summary":"ChartElliottDoubleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange, 2);\nPrint(\"Double combo thickness: {0}\", combo.Thickness);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange, 2)\napi.Print(f\"Double combo thickness: {combo.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottDoubleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawElliottDoubleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawElliottDoubleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX: ChartPoint, waveY: ChartPoint, color: Color, thickness: int, lineStyle: LineStyle) -> ChartElliottDoubleCombo","summary":"Draws an Elliott Double Combo Wave (W-X-Y).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave X anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Double Combo Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Double Combo Wave lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Elliott Double Combo Wave lines style."}],"returns":{"csharpType":"ChartElliottDoubleCombo","pythonType":"ChartElliottDoubleCombo","summary":"ChartElliottDoubleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange, 2, LineStyle.Dots);\nPrint(\"Double combo style: {0}\", combo.LineStyle);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange, 2, LineStyle.Dots)\napi.Print(f\"Double combo style: {combo.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottDoubleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottImpulse(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color)","kind":"method","name":"DrawElliottImpulse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color)","python":"chartArea.DrawElliottImpulse(name: str, origin: ChartPoint, wave1: ChartPoint, wave2: ChartPoint, wave3: ChartPoint, wave4: ChartPoint, wave5: ChartPoint, color: Color) -> ChartElliottImpulse","summary":"Draws an Elliott Impulse Wave (1-2-3-4-5).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"wave1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 1 anchor point."},{"name":"wave2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 2 anchor point."},{"name":"wave3","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 3 anchor point."},{"name":"wave4","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 4 anchor point."},{"name":"wave5","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 5 anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Impulse Wave lines color."}],"returns":{"csharpType":"ChartElliottImpulse","pythonType":"ChartElliottImpulse","summary":"ChartElliottImpulse.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nPrint(\"Impulse wave 5 at {0}\", impulse.Wave5.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\napi.Print(f\"Impulse wave 5 at {impulse.Wave5.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottImpulse(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawElliottImpulse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color, int thickness)","python":"chartArea.DrawElliottImpulse(name: str, origin: ChartPoint, wave1: ChartPoint, wave2: ChartPoint, wave3: ChartPoint, wave4: ChartPoint, wave5: ChartPoint, color: Color, thickness: int) -> ChartElliottImpulse","summary":"Draws an Elliott Impulse Wave (1-2-3-4-5).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"wave1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 1 anchor point."},{"name":"wave2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 2 anchor point."},{"name":"wave3","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 3 anchor point."},{"name":"wave4","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 4 anchor point."},{"name":"wave5","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 5 anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Impulse Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Impulse Wave lines thickness."}],"returns":{"csharpType":"ChartElliottImpulse","pythonType":"ChartElliottImpulse","summary":"ChartElliottImpulse.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red, 2);\nPrint(\"Impulse thickness: {0}\", impulse.Thickness);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red, 2)\napi.Print(f\"Impulse thickness: {impulse.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottImpulse(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawElliottImpulse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawElliottImpulse(name: str, origin: ChartPoint, wave1: ChartPoint, wave2: ChartPoint, wave3: ChartPoint, wave4: ChartPoint, wave5: ChartPoint, color: Color, thickness: int, lineStyle: LineStyle) -> ChartElliottImpulse","summary":"Draws an Elliott Impulse Wave (1-2-3-4-5).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"wave1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 1 anchor point."},{"name":"wave2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 2 anchor point."},{"name":"wave3","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 3 anchor point."},{"name":"wave4","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 4 anchor point."},{"name":"wave5","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave 5 anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Impulse Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Impulse Wave lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Elliott Impulse Wave lines style."}],"returns":{"csharpType":"ChartElliottImpulse","pythonType":"ChartElliottImpulse","summary":"ChartElliottImpulse.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red, 2, LineStyle.Dots);\nPrint(\"Impulse style: {0}\", impulse.LineStyle);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Impulse style: {impulse.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottImpulse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTriangle(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color)","kind":"method","name":"DrawElliottTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color)","python":"chartArea.DrawElliottTriangle(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, waveD: ChartPoint, waveE: ChartPoint, color: Color) -> ChartElliottTriangle","summary":"Draws an Elliott Triangle Wave (A-B-C-D-E).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"waveD","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave D anchor point."},{"name":"waveE","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave E anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triangle Wave lines color."}],"returns":{"csharpType":"ChartElliottTriangle","pythonType":"ChartElliottTriangle","summary":"ChartElliottTriangle.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"elliottTriangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\nPrint(\"Triangle wave E at {0}\", triangle.WaveE.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"elliottTriangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\napi.Print(f\"Triangle wave E at {triangle.WaveE.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTriangle(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawElliottTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color, int thickness)","python":"chartArea.DrawElliottTriangle(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, waveD: ChartPoint, waveE: ChartPoint, color: Color, thickness: int) -> ChartElliottTriangle","summary":"Draws an Elliott Triangle Wave (A-B-C-D-E).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"waveD","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave D anchor point."},{"name":"waveE","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave E anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triangle Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Triangle Wave lines thickness."}],"returns":{"csharpType":"ChartElliottTriangle","pythonType":"ChartElliottTriangle","summary":"ChartElliottTriangle.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"elliottTriangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green, 2);\nPrint(\"Triangle thickness: {0}\", triangle.Thickness);","python":"triangle = api.Chart.DrawElliottTriangle(\"elliottTriangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green, 2)\napi.Print(f\"Triangle thickness: {triangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTriangle(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawElliottTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawElliottTriangle(name: str, origin: ChartPoint, waveA: ChartPoint, waveB: ChartPoint, waveC: ChartPoint, waveD: ChartPoint, waveE: ChartPoint, color: Color, thickness: int, lineStyle: LineStyle) -> ChartElliottTriangle","summary":"Draws an Elliott Triangle Wave (A-B-C-D-E).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveA","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave A anchor point."},{"name":"waveB","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave B anchor point."},{"name":"waveC","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave C anchor point."},{"name":"waveD","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave D anchor point."},{"name":"waveE","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave E anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triangle Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Triangle Wave lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Elliott Triangle Wave lines style."}],"returns":{"csharpType":"ChartElliottTriangle","pythonType":"ChartElliottTriangle","summary":"ChartElliottTriangle.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"elliottTriangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green, 2, LineStyle.Dots);\nPrint(\"Triangle style: {0}\", triangle.LineStyle);","python":"triangle = api.Chart.DrawElliottTriangle(\"elliottTriangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green, 2, LineStyle.Dots)\napi.Print(f\"Triangle style: {triangle.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTripleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color)","kind":"method","name":"DrawElliottTripleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color)","python":"chartArea.DrawElliottTripleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX1: ChartPoint, waveY: ChartPoint, waveX2: ChartPoint, waveZ: ChartPoint, color: Color) -> ChartElliottTripleCombo","summary":"Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The first wave X (X1) anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"waveX2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The second wave X (X2) anchor point."},{"name":"waveZ","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Z anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triple Combo Wave lines color."}],"returns":{"csharpType":"ChartElliottTripleCombo","pythonType":"ChartElliottTripleCombo","summary":"ChartElliottTripleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\nPrint(\"Triple combo wave Z at {0}\", combo.WaveZ.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\napi.Print(f\"Triple combo wave Z at {combo.WaveZ.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTripleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawElliottTripleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color, int thickness)","python":"chartArea.DrawElliottTripleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX1: ChartPoint, waveY: ChartPoint, waveX2: ChartPoint, waveZ: ChartPoint, color: Color, thickness: int) -> ChartElliottTripleCombo","summary":"Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The first wave X (X1) anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"waveX2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The second wave X (X2) anchor point."},{"name":"waveZ","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Z anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triple Combo Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Triple Combo Wave lines thickness."}],"returns":{"csharpType":"ChartElliottTripleCombo","pythonType":"ChartElliottTripleCombo","summary":"ChartElliottTripleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple, 2);\nPrint(\"Triple combo thickness: {0}\", combo.Thickness);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple, 2)\napi.Print(f\"Triple combo thickness: {combo.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawElliottTripleCombo(System.String,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.ChartPoint,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawElliottTripleCombo","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawElliottTripleCombo(name: str, origin: ChartPoint, waveW: ChartPoint, waveX1: ChartPoint, waveY: ChartPoint, waveX2: ChartPoint, waveZ: ChartPoint, color: Color, thickness: int, lineStyle: LineStyle) -> ChartElliottTripleCombo","summary":"Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"origin","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The origin (wave 0) anchor point."},{"name":"waveW","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave W anchor point."},{"name":"waveX1","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The first wave X (X1) anchor point."},{"name":"waveY","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Y anchor point."},{"name":"waveX2","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The second wave X (X2) anchor point."},{"name":"waveZ","csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"The wave Z anchor point."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Elliott Triple Combo Wave lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Elliott Triple Combo Wave lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Elliott Triple Combo Wave lines style."}],"returns":{"csharpType":"ChartElliottTripleCombo","pythonType":"ChartElliottTripleCombo","summary":"ChartElliottTripleCombo.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple, 2, LineStyle.Dots);\nPrint(\"Triple combo style: {0}\", combo.LineStyle);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple, 2, LineStyle.Dots)\napi.Print(f\"Triple combo style: {combo.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawElliottTripleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawEllipse(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Red));\nellipse.IsFilled = true;\nPrint(\"Ellipse drawn from {0} to {1}\", ellipse.Time1, ellipse.Time2);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Red))\nellipse.IsFilled = True\napi.Print(f\"Ellipse drawn from {ellipse.Time1} to {ellipse.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawEllipse(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The ellipse line thickness."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);\nPrint(\"Ellipse thickness: {0}\", ellipse.Thickness);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2)\napi.Print(f\"Ellipse thickness: {ellipse.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawEllipse(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The ellipse line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The ellipse line style."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);\nPrint(\"Ellipse style: {0}\", ellipse.LineStyle);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Ellipse style: {ellipse.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawEllipse(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar ellipse = Chart.DrawEllipse(\"ellipse\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.FromArgb(80, Color.Red));\nellipse.IsFilled = true;\nPrint(\"Ellipse drawn from {0} to {1}\", ellipse.Time1, ellipse.Time2);","python":"index = api.Bars.Count - 1\nellipse = api.Chart.DrawEllipse(\"ellipse\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.FromArgb(80, Color.Red))\nellipse.IsFilled = True\napi.Print(f\"Ellipse drawn from {ellipse.Time1} to {ellipse.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawEllipse(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The ellipse line thickness."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar ellipse = Chart.DrawEllipse(\"ellipse\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Red, 2);\nPrint(\"Ellipse thickness: {0}\", ellipse.Thickness);","python":"index = api.Bars.Count - 1\nellipse = api.Chart.DrawEllipse(\"ellipse\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Red, 2)\napi.Print(f\"Ellipse thickness: {ellipse.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEllipse(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawEllipse","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawEllipse(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartEllipse","summary":"Draws an ellipse.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the ellipse point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the ellipse point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The ellipse line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The ellipse line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The ellipse line style."}],"returns":{"csharpType":"ChartEllipse","pythonType":"ChartEllipse","summary":"ChartEllipse.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar ellipse = Chart.DrawEllipse(\"ellipse\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Ellipse style: {0}\", ellipse.LineStyle);","python":"index = api.Bars.Count - 1\nellipse = api.Chart.DrawEllipse(\"ellipse\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Ellipse style: {ellipse.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color)","python":"chartArea.DrawEquidistantChannel(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, channelHeight: float, color: Color) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nPrint(\"Channel height in pips: {0}\", channel.ChannelHeight / Symbol.PipSize);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\napi.Print(f\"Channel height in pips: {channel.ChannelHeight / api.Symbol.PipSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color, int thickness)","python":"chartArea.DrawEquidistantChannel(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, channelHeight: float, color: Color, thickness: int) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the equidistant channel lines."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red, 2);\nPrint(\"Channel thickness: {0}\", channel.Thickness);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red, 2)\napi.Print(f\"Channel thickness: {channel.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawEquidistantChannel(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, channelHeight: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the equidistant channel lines."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The equidistant channel lines style."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red, 2, LineStyle.Dots);\nPrint(\"Channel line style: {0}\", channel.LineStyle);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Channel line style: {channel.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color)","python":"chartArea.DrawEquidistantChannel(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, channelHeight: float, color: Color) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar channel = Chart.DrawEquidistantChannel(\"channel\", index - 30, Bars.LowPrices[index - 30], index, Bars.LowPrices[index], 20 * Symbol.PipSize, Color.Red);\nPrint(\"Channel height in pips: {0}\", channel.ChannelHeight / Symbol.PipSize);","python":"index = api.Bars.Count - 1\nchannel = api.Chart.DrawEquidistantChannel(\"channel\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.LowPrices[index], 20 * api.Symbol.PipSize, Color.Red)\napi.Print(f\"Channel height in pips: {channel.ChannelHeight / api.Symbol.PipSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color, int thickness)","python":"chartArea.DrawEquidistantChannel(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, channelHeight: float, color: Color, thickness: int) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the equidistant channel lines."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar channel = Chart.DrawEquidistantChannel(\"channel\", index - 30, Bars.LowPrices[index - 30], index, Bars.LowPrices[index], 20 * Symbol.PipSize, Color.Red, 2);\nPrint(\"Channel thickness: {0}\", channel.Thickness);","python":"index = api.Bars.Count - 1\nchannel = api.Chart.DrawEquidistantChannel(\"channel\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.LowPrices[index], 20 * api.Symbol.PipSize, Color.Red, 2)\napi.Print(f\"Channel thickness: {channel.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawEquidistantChannel(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawEquidistantChannel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawEquidistantChannel(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, channelHeight: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartEquidistantChannel","summary":"Draws an equidistant channel.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the equidistant channel end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the equidistant channel end location."},{"name":"channelHeight","csharpType":"double","pythonType":"float","summary":"The equidistant channel hight in pips."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the equidistant channel lines."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the equidistant channel lines."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The equidistant channel lines style."}],"returns":{"csharpType":"ChartEquidistantChannel","pythonType":"ChartEquidistantChannel","summary":"ChartEquidistantChannel.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar channel = Chart.DrawEquidistantChannel(\"channel\", index - 30, Bars.LowPrices[index - 30], index, Bars.LowPrices[index], 20 * Symbol.PipSize, Color.Red, 2, LineStyle.Dots);\nPrint(\"Channel line style: {0}\", channel.LineStyle);","python":"index = api.Bars.Count - 1\nchannel = api.Chart.DrawEquidistantChannel(\"channel\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.LowPrices[index], 20 * api.Symbol.PipSize, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Channel line style: {channel.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nPrint(\"Fibonacci arc levels: {0}\", arc.FibonacciLevels.Count);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\napi.Print(f\"Fibonacci arc levels: {arc.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci arc lines thickness."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);\nPrint(\"Fibonacci arc thickness: {0}\", arc.Thickness);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2)\napi.Print(f\"Fibonacci arc thickness: {arc.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci arc lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci arc lines style."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci arc style: {0}\", arc.LineStyle);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci arc style: {arc.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arc = Chart.DrawFibonacciArc(\"arc\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red);\nPrint(\"Fibonacci arc levels: {0}\", arc.FibonacciLevels.Count);","python":"index = api.Bars.Count - 1\narc = api.Chart.DrawFibonacciArc(\"arc\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red)\napi.Print(f\"Fibonacci arc levels: {arc.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci arc lines thickness."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arc = Chart.DrawFibonacciArc(\"arc\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2);\nPrint(\"Fibonacci arc thickness: {0}\", arc.Thickness);","python":"index = api.Bars.Count - 1\narc = api.Chart.DrawFibonacciArc(\"arc\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2)\napi.Print(f\"Fibonacci arc thickness: {arc.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciArc(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciArc","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciArc","summary":"Draws a Fibonacci arc.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci arc end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci arc end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci arc lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci arc lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci arc lines style."}],"returns":{"csharpType":"ChartFibonacciArc","pythonType":"ChartFibonacciArc","summary":"ChartFibonacciArc.","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar arc = Chart.DrawFibonacciArc(\"arc\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci arc style: {0}\", arc.LineStyle);","python":"index = api.Bars.Count - 1\narc = api.Chart.DrawFibonacciArc(\"arc\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci arc style: {arc.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color)","python":"chartArea.DrawFibonacciExpansion(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nPrint(\"Fibonacci expansion levels: {0}\", expansion.FibonacciLevels.Count);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\napi.Print(f\"Fibonacci expansion levels: {expansion.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness)","python":"chartArea.DrawFibonacciExpansion(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci expansion lines thickness."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2);\nPrint(\"Fibonacci expansion thickness: {0}\", expansion.Thickness);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2)\napi.Print(f\"Fibonacci expansion thickness: {expansion.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciExpansion(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci expansion lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci expansion lines style."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci expansion style: {0}\", expansion.LineStyle);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci expansion style: {expansion.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color)","python":"chartArea.DrawFibonacciExpansion(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar expansion = Chart.DrawFibonacciExpansion(\"expansion\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red);\nPrint(\"Fibonacci expansion levels: {0}\", expansion.FibonacciLevels.Count);","python":"index = api.Bars.Count - 1\nexpansion = api.Chart.DrawFibonacciExpansion(\"expansion\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red)\napi.Print(f\"Fibonacci expansion levels: {expansion.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness)","python":"chartArea.DrawFibonacciExpansion(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci expansion lines thickness."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar expansion = Chart.DrawFibonacciExpansion(\"expansion\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2);\nPrint(\"Fibonacci expansion thickness: {0}\", expansion.Thickness);","python":"index = api.Bars.Count - 1\nexpansion = api.Chart.DrawFibonacciExpansion(\"expansion\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2)\napi.Print(f\"Fibonacci expansion thickness: {expansion.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciExpansion(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciExpansion","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciExpansion(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciExpansion","summary":"Draws a Fibonacci expansion.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion central point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion central point location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci expansion end point location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci expansion end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci expansion lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci expansion lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci expansion lines style."}],"returns":{"csharpType":"ChartFibonacciExpansion","pythonType":"ChartFibonacciExpansion","summary":"ChartFibonacciExpansion.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar expansion = Chart.DrawFibonacciExpansion(\"expansion\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci expansion style: {0}\", expansion.LineStyle);","python":"index = api.Bars.Count - 1\nexpansion = api.Chart.DrawFibonacciExpansion(\"expansion\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci expansion style: {expansion.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawFibonacciFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nPrint(\"Fibonacci fan levels: {0}\", fan.FibonacciLevels.Count);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\napi.Print(f\"Fibonacci fan levels: {fan.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci fan lines thickness."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);\nPrint(\"Fibonacci fan thickness: {0}\", fan.Thickness);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2)\napi.Print(f\"Fibonacci fan thickness: {fan.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci fan lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci fan lines style."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci fan style: {0}\", fan.LineStyle);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci fan style: {fan.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawFibonacciFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar fan = Chart.DrawFibonacciFan(\"fan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red);\nPrint(\"Fibonacci fan levels: {0}\", fan.FibonacciLevels.Count);","python":"index = api.Bars.Count - 1\nfan = api.Chart.DrawFibonacciFan(\"fan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red)\napi.Print(f\"Fibonacci fan levels: {fan.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci fan lines thickness."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar fan = Chart.DrawFibonacciFan(\"fan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2);\nPrint(\"Fibonacci fan thickness: {0}\", fan.Thickness);","python":"index = api.Bars.Count - 1\nfan = api.Chart.DrawFibonacciFan(\"fan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2)\napi.Print(f\"Fibonacci fan thickness: {fan.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciFan","summary":"Draws a Fibonacci fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci fan lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci fan lines style."}],"returns":{"csharpType":"ChartFibonacciFan","pythonType":"ChartFibonacciFan","summary":"ChartFibonacciFan.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar fan = Chart.DrawFibonacciFan(\"fan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci fan style: {0}\", fan.LineStyle);","python":"index = api.Bars.Count - 1\nfan = api.Chart.DrawFibonacciFan(\"fan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci fan style: {fan.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawFibonacciRetracement(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nPrint(\"Fibonacci retracement levels: {0}\", retracement.FibonacciLevels.Count);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\napi.Print(f\"Fibonacci retracement levels: {retracement.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciRetracement(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci retracement lines thickness."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red, 2);\nPrint(\"Fibonacci retracement thickness: {0}\", retracement.Thickness);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red, 2)\napi.Print(f\"Fibonacci retracement thickness: {retracement.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciRetracement(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci retracement lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci retracement lines style."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci retracement style: {0}\", retracement.LineStyle);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci retracement style: {retracement.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawFibonacciRetracement(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar retracement = Chart.DrawFibonacciRetracement(\"retracement\", index - 50, Bars.HighPrices[index - 50], index, Bars.LowPrices[index], Color.Red);\nPrint(\"Fibonacci retracement levels: {0}\", retracement.FibonacciLevels.Count);","python":"index = api.Bars.Count - 1\nretracement = api.Chart.DrawFibonacciRetracement(\"retracement\", index - 50, api.Bars.HighPrices[index - 50], index, api.Bars.LowPrices[index], Color.Red)\napi.Print(f\"Fibonacci retracement levels: {retracement.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciRetracement(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci retracement lines thickness."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar retracement = Chart.DrawFibonacciRetracement(\"retracement\", index - 50, Bars.HighPrices[index - 50], index, Bars.LowPrices[index], Color.Red, 2);\nPrint(\"Fibonacci retracement thickness: {0}\", retracement.Thickness);","python":"index = api.Bars.Count - 1\nretracement = api.Chart.DrawFibonacciRetracement(\"retracement\", index - 50, api.Bars.HighPrices[index - 50], index, api.Bars.LowPrices[index], Color.Red, 2)\napi.Print(f\"Fibonacci retracement thickness: {retracement.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciRetracement(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciRetracement","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciRetracement(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciRetracement","summary":"Draws a Fibonacci retracement.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci retracement end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci retracement end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci retracement lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci retracement lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci retracement lines style."}],"returns":{"csharpType":"ChartFibonacciRetracement","pythonType":"ChartFibonacciRetracement","summary":"ChartFibonacciRetracement.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar retracement = Chart.DrawFibonacciRetracement(\"retracement\", index - 50, Bars.HighPrices[index - 50], index, Bars.LowPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci retracement style: {0}\", retracement.LineStyle);","python":"index = api.Bars.Count - 1\nretracement = api.Chart.DrawFibonacciRetracement(\"retracement\", index - 50, api.Bars.HighPrices[index - 50], index, api.Bars.LowPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci retracement style: {retracement.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawFibonacciTimezones(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\nPrint(\"Fibonacci timezones levels: {0}\", timezones.FibonacciLevels.Count);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\napi.Print(f\"Fibonacci timezones levels: {timezones.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciTimezones(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci timezones lines thickness."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red, 2);\nPrint(\"Fibonacci timezones thickness: {0}\", timezones.Thickness);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red, 2)\napi.Print(f\"Fibonacci timezones thickness: {timezones.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciTimezones(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Fibonacci timezones end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci timezones lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci timezones lines style."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci timezones style: {0}\", timezones.LineStyle);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci timezones style: {timezones.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawFibonacciTimezones(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar timezones = Chart.DrawFibonacciTimezones(\"timezones\", index - 30, Bars.LowPrices[index - 30], index - 25, Bars.HighPrices[index - 25], Color.Red);\nPrint(\"Fibonacci timezones levels: {0}\", timezones.FibonacciLevels.Count);","python":"index = api.Bars.Count - 1\ntimezones = api.Chart.DrawFibonacciTimezones(\"timezones\", index - 30, api.Bars.LowPrices[index - 30], index - 25, api.Bars.HighPrices[index - 25], Color.Red)\napi.Print(f\"Fibonacci timezones levels: {timezones.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawFibonacciTimezones(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci timezones lines thickness."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar timezones = Chart.DrawFibonacciTimezones(\"timezones\", index - 30, Bars.LowPrices[index - 30], index - 25, Bars.HighPrices[index - 25], Color.Red, 2);\nPrint(\"Fibonacci timezones thickness: {0}\", timezones.Thickness);","python":"index = api.Bars.Count - 1\ntimezones = api.Chart.DrawFibonacciTimezones(\"timezones\", index - 30, api.Bars.LowPrices[index - 30], index - 25, api.Bars.HighPrices[index - 25], Color.Red, 2)\napi.Print(f\"Fibonacci timezones thickness: {timezones.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawFibonacciTimezones(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawFibonacciTimezones","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawFibonacciTimezones(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciTimezones","summary":"Draws a Fibonacci timezones.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Fibonacci timezones start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Fibonacci timezones end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Fibonacci timezones lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Fibonacci timezones lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Fibonacci timezones lines style."}],"returns":{"csharpType":"ChartFibonacciTimezones","pythonType":"ChartFibonacciTimezones","summary":"ChartFibonacciTimezones.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar timezones = Chart.DrawFibonacciTimezones(\"timezones\", index - 30, Bars.LowPrices[index - 30], index - 25, Bars.HighPrices[index - 25], Color.Red, 2, LineStyle.Dots);\nPrint(\"Fibonacci timezones style: {0}\", timezones.LineStyle);","python":"index = api.Bars.Count - 1\ntimezones = api.Chart.DrawFibonacciTimezones(\"timezones\", index - 30, api.Bars.LowPrices[index - 30], index - 25, api.Bars.HighPrices[index - 25], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Fibonacci timezones style: {timezones.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawGannBox(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nPrint(\"Gann box levels: {0}\", gannBox.GannLevels.Count);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\napi.Print(f\"Gann box levels: {gannBox.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawGannBox(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann box lines thickness."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);\nPrint(\"Gann box thickness: {0}\", gannBox.Thickness);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)\napi.Print(f\"Gann box thickness: {gannBox.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannBox(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann box lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann box lines style."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann box style: {0}\", gannBox.LineStyle);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann box style: {gannBox.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawGannBox(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannBox = Chart.DrawGannBox(\"gannBox\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue);\nPrint(\"Gann box levels: {0}\", gannBox.GannLevels.Count);","python":"index = api.Bars.Count - 1\ngannBox = api.Chart.DrawGannBox(\"gannBox\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue)\napi.Print(f\"Gann box levels: {gannBox.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawGannBox(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann box lines thickness."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannBox = Chart.DrawGannBox(\"gannBox\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2);\nPrint(\"Gann box thickness: {0}\", gannBox.Thickness);","python":"index = api.Bars.Count - 1\ngannBox = api.Chart.DrawGannBox(\"gannBox\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2)\napi.Print(f\"Gann box thickness: {gannBox.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannBox(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannBox","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannBox(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannBox","summary":"Draws a Gann box.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann box end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann box end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann box lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann box lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann box lines style."}],"returns":{"csharpType":"ChartGannBox","pythonType":"ChartGannBox","summary":"ChartGannBox.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannBox = Chart.DrawGannBox(\"gannBox\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann box style: {0}\", gannBox.LineStyle);","python":"index = api.Bars.Count - 1\ngannBox = api.Chart.DrawGannBox(\"gannBox\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann box style: {gannBox.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawGannFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nPrint(\"Gann fan levels: {0}\", gannFan.GannLevels.Count);","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\napi.Print(f\"Gann fan levels: {gannFan.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawGannFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann fan lines thickness."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);\nPrint(\"Gann fan thickness: {0}\", gannFan.Thickness);","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)\napi.Print(f\"Gann fan thickness: {gannFan.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannFan(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann fan end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann fan lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann fan lines style."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann fan style: {0}\", gannFan.LineStyle);","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann fan style: {gannFan.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawGannFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Gann fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannFan = Chart.DrawGannFan(\"gannFan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue);\nPrint(\"Gann fan levels: {0}\", gannFan.GannLevels.Count);","python":"index = api.Bars.Count - 1\ngannFan = api.Chart.DrawGannFan(\"gannFan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue)\napi.Print(f\"Gann fan levels: {gannFan.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawGannFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Gann fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann fan lines thickness."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannFan = Chart.DrawGannFan(\"gannFan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2);\nPrint(\"Gann fan thickness: {0}\", gannFan.Thickness);","python":"index = api.Bars.Count - 1\ngannFan = api.Chart.DrawGannFan(\"gannFan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2)\napi.Print(f\"Gann fan thickness: {gannFan.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannFan(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannFan","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannFan(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannFan","summary":"Draws a Gann fan.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann fan start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The Y-axis value of the Gann fan end point location."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann fan end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann fan lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann fan lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann fan lines style."}],"returns":{"csharpType":"ChartGannFan","pythonType":"ChartGannFan","summary":"ChartGannFan.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannFan = Chart.DrawGannFan(\"gannFan\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann fan style: {0}\", gannFan.LineStyle);","python":"index = api.Bars.Count - 1\ngannFan = api.Chart.DrawGannFan(\"gannFan\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann fan style: {gannFan.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawGannSquare(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquare(\"gannSquare\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nPrint(\"Gann square levels: {0}\", gannSquare.GannLevels.Count);","python":"gannSquare = api.Chart.DrawGannSquare(\"gannSquare\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\napi.Print(f\"Gann square levels: {gannSquare.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawGannSquare(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square lines thickness."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquare(\"gannSquare\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);\nPrint(\"Gann square thickness: {0}\", gannSquare.Thickness);","python":"gannSquare = api.Chart.DrawGannSquare(\"gannSquare\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)\napi.Print(f\"Gann square thickness: {gannSquare.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannSquare(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann square lines style."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquare(\"gannSquare\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann square style: {0}\", gannSquare.LineStyle);","python":"gannSquare = api.Chart.DrawGannSquare(\"gannSquare\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann square style: {gannSquare.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawGannSquare(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquare = Chart.DrawGannSquare(\"gannSquare\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue);\nPrint(\"Gann square levels: {0}\", gannSquare.GannLevels.Count);","python":"index = api.Bars.Count - 1\ngannSquare = api.Chart.DrawGannSquare(\"gannSquare\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue)\napi.Print(f\"Gann square levels: {gannSquare.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawGannSquare(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square lines thickness."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquare = Chart.DrawGannSquare(\"gannSquare\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2);\nPrint(\"Gann square thickness: {0}\", gannSquare.Thickness);","python":"index = api.Bars.Count - 1\ngannSquare = api.Chart.DrawGannSquare(\"gannSquare\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2)\napi.Print(f\"Gann square thickness: {gannSquare.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquare(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannSquare","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannSquare(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannSquare","summary":"Draws a Gann square.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square start point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square end point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann square lines style."}],"returns":{"csharpType":"ChartGannSquare","pythonType":"ChartGannSquare","summary":"ChartGannSquare.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquare = Chart.DrawGannSquare(\"gannSquare\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann square style: {0}\", gannSquare.LineStyle);","python":"index = api.Bars.Count - 1\ngannSquare = api.Chart.DrawGannSquare(\"gannSquare\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann square style: {gannSquare.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawGannSquareFixed(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nPrint(\"Gann square fixed levels: {0}\", gannSquareFixed.GannLevels.Count);","python":"gannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\napi.Print(f\"Gann square fixed levels: {gannSquareFixed.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawGannSquareFixed(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square fixed lines thickness."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);\nPrint(\"Gann square fixed thickness: {0}\", gannSquareFixed.Thickness);","python":"gannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)\napi.Print(f\"Gann square fixed thickness: {gannSquareFixed.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannSquareFixed(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square fixed lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann square fixed lines style."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann square fixed style: {0}\", gannSquareFixed.LineStyle);","python":"gannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann square fixed style: {gannSquareFixed.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawGannSquareFixed(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue);\nPrint(\"Gann square fixed levels: {0}\", gannSquareFixed.GannLevels.Count);","python":"index = api.Bars.Count - 1\ngannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue)\napi.Print(f\"Gann square fixed levels: {gannSquareFixed.GannLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawGannSquareFixed(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square fixed lines thickness."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2);\nPrint(\"Gann square fixed thickness: {0}\", gannSquareFixed.Thickness);","python":"index = api.Bars.Count - 1\ngannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2)\napi.Print(f\"Gann square fixed thickness: {gannSquareFixed.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawGannSquareFixed(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawGannSquareFixed","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawGannSquareFixed(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartGannSquareFixed","summary":"Draws a Gann square fixed.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed anchor point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed anchor point location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the Gann square fixed control point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the Gann square fixed control point location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The Gann square fixed lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The Gann square fixed lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The Gann square fixed lines style."}],"returns":{"csharpType":"ChartGannSquareFixed","pythonType":"ChartGannSquareFixed","summary":"ChartGannSquareFixed.","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar gannSquareFixed = Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);\nPrint(\"Gann square fixed style: {0}\", gannSquareFixed.LineStyle);","python":"index = api.Bars.Count - 1\ngannSquareFixed = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Gann square fixed style: {gannSquareFixed.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawHorizontalLine(System.String,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawHorizontalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color)","python":"chartArea.DrawHorizontalLine(name: str, y: float, color: Color) -> ChartHorizontalLine","summary":"Draws a horizontal line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once on a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the line location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."}],"returns":{"csharpType":"ChartHorizontalLine","pythonType":"ChartHorizontalLine","summary":"ChartHorizontalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.Minimum(50), Color.Green);\nPrint(\"Support line drawn at {0}\", line.Y);","python":"line = api.Chart.DrawHorizontalLine(\"support\", Functions.Minimum(api.Bars.LowPrices, 50), Color.Green)\napi.Print(f\"Support line drawn at {line.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawHorizontalLine(System.String,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawHorizontalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color, int thickness)","python":"chartArea.DrawHorizontalLine(name: str, y: float, color: Color, thickness: int) -> ChartHorizontalLine","summary":"Draws a horizontal line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the line location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."}],"returns":{"csharpType":"ChartHorizontalLine","pythonType":"ChartHorizontalLine","summary":"ChartHorizontalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"resistance\", Bars.HighPrices.Maximum(50), Color.Red, 2);\nPrint(\"Resistance line drawn at {0} with thickness {1}\", line.Y, line.Thickness);","python":"line = api.Chart.DrawHorizontalLine(\"resistance\", Functions.Maximum(api.Bars.HighPrices, 50), Color.Red, 2)\napi.Print(f\"Resistance line drawn at {line.Y} with thickness {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawHorizontalLine(System.String,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawHorizontalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawHorizontalLine(name: str, y: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartHorizontalLine","summary":"Draws a horizontal line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the line location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The line style."}],"returns":{"csharpType":"ChartHorizontalLine","pythonType":"ChartHorizontalLine","summary":"ChartHorizontalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"target\", Symbol.Bid + 50 * Symbol.PipSize, Color.Gold, 1, LineStyle.Dots);\nPrint(\"Target line drawn at {0} with style {1}\", line.Y, line.LineStyle);","python":"line = api.Chart.DrawHorizontalLine(\"target\", api.Symbol.Bid + 50 * api.Symbol.PipSize, Color.Gold, 1, LineStyle.Dots)\napi.Print(f\"Target line drawn at {line.Y} with style {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawHorizontalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawIcon(System.String,cAlgo.API.ChartIconType,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawIcon","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartIcon DrawIcon(string name, ChartIconType iconType, DateTime time, double y, Color color)","python":"chartArea.DrawIcon(name: str, iconType: ChartIconType, time: DateTime, y: float, color: Color) -> ChartIcon","summary":"Draws an icon.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"iconType","csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"The type of the icon."},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the icon location on the X-axis."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the icon location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the icon."}],"returns":{"csharpType":"ChartIcon","pythonType":"ChartIcon","summary":"ChartIcon.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = Chart.DrawIcon(\"buySignal\", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);\nPrint(\"Icon drawn at {0}\", icon.Time);","python":"icon = api.Chart.DrawIcon(\"buySignal\", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)\napi.Print(f\"Icon drawn at {icon.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawIcon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawIcon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawIcon(System.String,cAlgo.API.ChartIconType,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawIcon","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartIcon DrawIcon(string name, ChartIconType iconType, int barIndex, double y, Color color)","python":"chartArea.DrawIcon(name: str, iconType: ChartIconType, barIndex: int, y: float, color: Color) -> ChartIcon","summary":"Draws an icon.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"iconType","csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"Type of the icon."},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The bar index of the icon location on the X-axis."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the icon location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the icon."}],"returns":{"csharpType":"ChartIcon","pythonType":"ChartIcon","summary":"ChartIcon.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"// Draw an icon on the last bar high.\nvar index = Bars.Count - 1;\nvar icon = Chart.DrawIcon(\"highIcon\", ChartIconType.Star, index, Bars.HighPrices[index], Color.Gold);\n\nPrint(\"Icon drawn at {0}\", icon.Y);","python":"index = api.Bars.Count - 1\nicon = api.Chart.DrawIcon(\"highIcon\", ChartIconType.Star, index, api.Bars.HighPrices[index], Color.Gold)\napi.Print(f\"Icon drawn at {icon.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawIcon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawIcon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawRectangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nrectangle.IsFilled = true;\nPrint(\"Zone from {0} to {1}\", rectangle.Y1, rectangle.Y2);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nrectangle.IsFilled = True\napi.Print(f\"Zone from {rectangle.Y1} to {rectangle.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawRectangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The rectangle lines thickness."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);\nPrint(\"Zone border thickness: {0}\", rectangle.Thickness);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)\napi.Print(f\"Zone border thickness: {rectangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawRectangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The rectangle lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The rectangle lines style."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);\nPrint(\"Zone border style: {0}\", rectangle.LineStyle);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Zone border style: {rectangle.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawRectangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar rectangle = Chart.DrawRectangle(\"zone\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.FromArgb(80, Color.Blue));\nrectangle.IsFilled = true;\nPrint(\"Zone from {0} to {1}\", rectangle.Y1, rectangle.Y2);","python":"index = api.Bars.Count - 1\nrectangle = api.Chart.DrawRectangle(\"zone\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.FromArgb(80, Color.Blue))\nrectangle.IsFilled = True\napi.Print(f\"Zone from {rectangle.Y1} to {rectangle.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawRectangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The rectangle lines thickness."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar rectangle = Chart.DrawRectangle(\"zone\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Blue, 2);\nPrint(\"Zone border thickness: {0}\", rectangle.Thickness);","python":"index = api.Bars.Count - 1\nrectangle = api.Chart.DrawRectangle(\"zone\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Blue, 2)\napi.Print(f\"Zone border thickness: {rectangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawRectangle(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawRectangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawRectangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartRectangle","summary":"Draws a rectangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the rectangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the rectangle point 2 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The rectangle lines color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The rectangle lines thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The rectangle lines style."}],"returns":{"csharpType":"ChartRectangle","pythonType":"ChartRectangle","summary":"ChartRectangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar rectangle = Chart.DrawRectangle(\"zone\", index - 20, Bars.LowPrices[index - 20], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);\nPrint(\"Zone border style: {0}\", rectangle.LineStyle);","python":"index = api.Bars.Count - 1\nrectangle = api.Chart.DrawRectangle(\"zone\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)\napi.Print(f\"Zone border style: {rectangle.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawStaticText(System.String,System.String,cAlgo.API.VerticalAlignment,cAlgo.API.HorizontalAlignment,cAlgo.API.Color)","kind":"method","name":"DrawStaticText","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartStaticText DrawStaticText(string name, string text, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, Color color)","python":"chartArea.DrawStaticText(name: str, text: str, verticalAlignment: VerticalAlignment, horizontalAlignment: HorizontalAlignment, color: Color) -> ChartStaticText","summary":"Draws the static text.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"text","csharpType":"string","pythonType":"str","summary":"The text content."},{"name":"verticalAlignment","csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"The vertical alignment."},{"name":"horizontalAlignment","csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"The horizontal alignment."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the text."}],"returns":{"csharpType":"ChartStaticText","pythonType":"ChartStaticText","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", string.Format(\"{0} | Spread: {1} pips\", SymbolName, Symbol.Spread / Symbol.PipSize), VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\nPrint(\"Static text: {0}\", text.Text);","python":"text = api.Chart.DrawStaticText(\"info\", f\"{api.SymbolName} | Spread: {api.Symbol.Spread / api.Symbol.PipSize} pips\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\napi.Print(f\"Static text: {text.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawStaticText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawStaticText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawText(System.String,System.String,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawText","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartText DrawText(string name, string text, DateTime time, double y, Color color)","python":"chartArea.DrawText(name: str, text: str, time: DateTime, y: float, color: Color) -> ChartText","summary":"Draws the text.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"text","csharpType":"string","pythonType":"str","summary":"The text content."},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the text object location on the X-axis."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the text object location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the text."}],"returns":{"csharpType":"ChartText","pythonType":"ChartText","summary":"ChartText.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"// Draw the text on the last bar high.\nvar highPrice = Bars.HighPrices.LastValue;\nvar openTime = Bars.OpenTimes.LastValue;\nvar text = Chart.DrawText(\"text1\", \"High is here\", openTime, highPrice, Color.Red);\ntext.VerticalAlignment = VerticalAlignment.Bottom;\ntext.HorizontalAlignment = HorizontalAlignment.Center;","python":"highPrice = api.Bars.HighPrices.LastValue\nopenTime = api.Bars.OpenTimes.LastValue\ntext = api.Chart.DrawText(\"text1\", \"High is here\", openTime, highPrice, Color.Red)\ntext.VerticalAlignment = VerticalAlignment.Bottom\ntext.HorizontalAlignment = HorizontalAlignment.Center"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawText(System.String,System.String,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawText","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartText DrawText(string name, string text, int barIndex, double y, Color color)","python":"chartArea.DrawText(name: str, text: str, barIndex: int, y: float, color: Color) -> ChartText","summary":"Draws the text.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"text","csharpType":"string","pythonType":"str","summary":"The text content."},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The bar index of the text object location on the X-axis."},{"name":"y","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the text object location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the text."}],"returns":{"csharpType":"ChartText","pythonType":"ChartText","summary":"ChartText.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar text = Chart.DrawText(\"lowLabel\", \"Low\", index, Bars.LowPrices[index], Color.Orange);\ntext.VerticalAlignment = VerticalAlignment.Top;\nPrint(\"Text drawn at {0}\", text.Time);","python":"index = api.Bars.Count - 1\ntext = api.Chart.DrawText(\"lowLabel\", \"Low\", index, api.Bars.LowPrices[index], Color.Orange)\ntext.VerticalAlignment = VerticalAlignment.Top\napi.Print(f\"Text drawn at {text.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)","python":"chartArea.DrawTrendLine(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trendLine\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nPrint(\"Trend line drawn from {0} to {1}\", trendLine.Time1, trendLine.Time2);","python":"trendLine = api.Chart.DrawTrendLine(\"trendLine\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\napi.Print(f\"Trend line drawn from {trendLine.Time1} to {trendLine.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)","python":"chartArea.DrawTrendLine(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trendLine\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red, 2);\nPrint(\"Trend line thickness: {0}\", trendLine.Thickness);","python":"trendLine = api.Chart.DrawTrendLine(\"trendLine\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red, 2)\napi.Print(f\"Trend line thickness: {trendLine.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawTrendLine(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The trend line style."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trendLine\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red, 2, LineStyle.Dots);\ntrendLine.IsInteractive = true;\nPrint(\"Trend line style: {0}\", trendLine.LineStyle);","python":"trendLine = api.Chart.DrawTrendLine(\"trendLine\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red, 2, LineStyle.Dots)\ntrendLine.IsInteractive = True\napi.Print(f\"Trend line style: {trendLine.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)","python":"chartArea.DrawTrendLine(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar trendLine = Chart.DrawTrendLine(\"trendLine\", index - 20, Bars.LowPrices[index - 20], index, Bars.LowPrices[index], Color.Red);\nPrint(\"Trend line drawn from {0} to {1}\", trendLine.Time1, trendLine.Time2);","python":"index = api.Bars.Count - 1\ntrendLine = api.Chart.DrawTrendLine(\"trendLine\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.LowPrices[index], Color.Red)\napi.Print(f\"Trend line drawn from {trendLine.Time1} to {trendLine.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)","python":"chartArea.DrawTrendLine(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar trendLine = Chart.DrawTrendLine(\"trendLine\", index - 20, Bars.LowPrices[index - 20], index, Bars.LowPrices[index], Color.Red, 2);\nPrint(\"Trend line thickness: {0}\", trendLine.Thickness);","python":"index = api.Bars.Count - 1\ntrendLine = api.Chart.DrawTrendLine(\"trendLine\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.LowPrices[index], Color.Red, 2)\napi.Print(f\"Trend line thickness: {trendLine.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTrendLine(System.String,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawTrendLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawTrendLine(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartTrendLine","summary":"Draws a trend line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line start point location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line start location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the trend line end point location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the trend line end location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The color of the trend line."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The thickness of the trend line."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The trend line style."}],"returns":{"csharpType":"ChartTrendLine","pythonType":"ChartTrendLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar trendLine = Chart.DrawTrendLine(\"trendLine\", index - 20, Bars.LowPrices[index - 20], index, Bars.LowPrices[index], Color.Red, 2, LineStyle.Dots);\nPrint(\"Trend line style: {0}\", trendLine.LineStyle);","python":"index = api.Bars.Count - 1\ntrendLine = api.Chart.DrawTrendLine(\"trendLine\", index - 20, api.Bars.LowPrices[index - 20], index, api.Bars.LowPrices[index], Color.Red, 2, LineStyle.Dots)\napi.Print(f\"Trend line style: {trendLine.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color)","python":"chartArea.DrawTriangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.FromArgb(80, Color.Orange));\ntriangle.IsFilled = true;\nPrint(\"Triangle drawn from {0} to {1}\", triangle.Time1, triangle.Time3);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.FromArgb(80, Color.Orange))\ntriangle.IsFilled = True\napi.Print(f\"Triangle drawn from {triangle.Time1} to {triangle.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness)","python":"chartArea.DrawTriangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The triangle line thickness."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange, 2);\nPrint(\"Triangle thickness: {0}\", triangle.Thickness);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange, 2)\napi.Print(f\"Triangle thickness: {triangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.DateTime,System.Double,System.DateTime,System.Double,System.DateTime,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawTriangle(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, time3: DateTime, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time1","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"time2","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"time3","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The triangle line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The triangle line style."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange, 2, LineStyle.Dots);\nPrint(\"Triangle style: {0}\", triangle.LineStyle);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange, 2, LineStyle.Dots)\napi.Print(f\"Triangle style: {triangle.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color)","python":"chartArea.DrawTriangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar triangle = Chart.DrawTriangle(\"triangle\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.FromArgb(80, Color.Orange));\ntriangle.IsFilled = true;\nPrint(\"Triangle drawn from {0} to {1}\", triangle.Time1, triangle.Time3);","python":"index = api.Bars.Count - 1\ntriangle = api.Chart.DrawTriangle(\"triangle\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.FromArgb(80, Color.Orange))\ntriangle.IsFilled = True\napi.Print(f\"Triangle drawn from {triangle.Time1} to {triangle.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness)","python":"chartArea.DrawTriangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The triangle line thickness."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar triangle = Chart.DrawTriangle(\"triangle\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Orange, 2);\nPrint(\"Triangle thickness: {0}\", triangle.Thickness);","python":"index = api.Bars.Count - 1\ntriangle = api.Chart.DrawTriangle(\"triangle\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Orange, 2)\napi.Print(f\"Triangle thickness: {triangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawTriangle(System.String,System.Int32,System.Double,System.Int32,System.Double,System.Int32,System.Double,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawTriangle","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawTriangle(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, barIndex3: int, y3: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartTriangle","summary":"Draws a triangle.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex1","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 1 location on the X-axis."},{"name":"y1","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 1 location."},{"name":"barIndex2","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 2 location on the X-axis."},{"name":"y2","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 2 location."},{"name":"barIndex3","csharpType":"int","pythonType":"int","summary":"The bar index of the triangle point 3 location on the X-axis."},{"name":"y3","csharpType":"double","pythonType":"float","summary":"The Y-axis value of the triangle point 3 location."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The triangle line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The triangle line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The triangle line style."}],"returns":{"csharpType":"ChartTriangle","pythonType":"ChartTriangle","summary":"ChartTriangle.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var index = Bars.Count - 1;\nvar triangle = Chart.DrawTriangle(\"triangle\", index - 30, Bars.LowPrices[index - 30], index - 20, Bars.HighPrices[index - 20], index - 10, Bars.LowPrices[index - 10], Color.Orange, 2, LineStyle.Dots);\nPrint(\"Triangle style: {0}\", triangle.LineStyle);","python":"index = api.Bars.Count - 1\ntriangle = api.Chart.DrawTriangle(\"triangle\", index - 30, api.Bars.LowPrices[index - 30], index - 20, api.Bars.HighPrices[index - 20], index - 10, api.Bars.LowPrices[index - 10], Color.Orange, 2, LineStyle.Dots)\napi.Print(f\"Triangle style: {triangle.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.DateTime,cAlgo.API.Color)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color)","python":"chartArea.DrawVerticalLine(name: str, time: DateTime, color: Color) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"ChartVerticalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"today\", Server.Time.Date, Color.Gray);\nPrint(\"Vertical line drawn at {0}\", line.Time);","python":"line = api.Chart.DrawVerticalLine(\"today\", api.Server.Time.Date, Color.Gray)\napi.Print(f\"Vertical line drawn at {line.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.DateTime,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color, int thickness)","python":"chartArea.DrawVerticalLine(name: str, time: DateTime, color: Color, thickness: int) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the line location on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"ChartVerticalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"today\", Server.Time.Date, Color.Gray, 2);\nPrint(\"Vertical line drawn at {0} with thickness {1}\", line.Time, line.Thickness);","python":"line = api.Chart.DrawVerticalLine(\"today\", api.Server.Time.Date, Color.Gray, 2)\napi.Print(f\"Vertical line drawn at {line.Time} with thickness {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.DateTime,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawVerticalLine(name: str, time: DateTime, color: Color, thickness: int, lineStyle: LineStyle) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value of the line location on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The line style."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"ChartVerticalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"today\", Server.Time.Date, Color.Gray, 1, LineStyle.DotsRare);\nPrint(\"Vertical line drawn at {0} with style {1}\", line.Time, line.LineStyle);","python":"line = api.Chart.DrawVerticalLine(\"today\", api.Server.Time.Date, Color.Gray, 1, LineStyle.DotsRare)\napi.Print(f\"Vertical line drawn at {line.Time} with style {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.Int32,cAlgo.API.Color)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color)","python":"chartArea.DrawVerticalLine(name: str, barIndex: int, color: Color) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The bar index of the line location on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"ChartVerticalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"lastBar\", Bars.Count - 1, Color.Gray);\nPrint(\"Vertical line drawn at {0}\", line.Time);","python":"line = api.Chart.DrawVerticalLine(\"lastBar\", api.Bars.Count - 1, Color.Gray)\napi.Print(f\"Vertical line drawn at {line.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.Int32,cAlgo.API.Color,System.Int32)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color, int thickness)","python":"chartArea.DrawVerticalLine(name: str, barIndex: int, color: Color, thickness: int) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The bar index of the line location on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"ChartVerticalLine.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"lastBar\", Bars.Count - 1, Color.Gray, 2);\nPrint(\"Vertical line drawn at {0} with thickness {1}\", line.Time, line.Thickness);","python":"line = api.Chart.DrawVerticalLine(\"lastBar\", api.Bars.Count - 1, Color.Gray, 2)\napi.Print(f\"Vertical line drawn at {line.Time} with thickness {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.DrawVerticalLine(System.String,System.Int32,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"DrawVerticalLine","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color, int thickness, LineStyle lineStyle)","python":"chartArea.DrawVerticalLine(name: str, barIndex: int, color: Color, thickness: int, lineStyle: LineStyle) -> ChartVerticalLine","summary":"Draws a vertical line.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name."},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"The bar index of the line location on the X-axis."},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"The line color."},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"The line thickness."},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"The line style."}],"returns":{"csharpType":"ChartVerticalLine","pythonType":"ChartVerticalLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"lastBar\", Bars.Count - 1, Color.Gray, 1, LineStyle.Dots);\nPrint(\"Vertical line drawn at {0} with style {1}\", line.Time, line.LineStyle);","python":"line = api.Chart.DrawVerticalLine(\"lastBar\", api.Bars.Count - 1, Color.Gray, 1, LineStyle.Dots)\napi.Print(f\"Vertical line drawn at {line.Time} with style {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DrawVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The object is created and returned, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"The object is created and returned, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArea.FindAllObjects``1","kind":"method","name":"FindAllObjects","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"T[] FindAllObjects()","python":"chartArea.FindAllObjects() -> list[T]","summary":"Finds all the chart objects of the specified type.","remarks":null,"parameters":[],"returns":{"csharpType":"T[]","pythonType":"list[T]","summary":"T[].","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var line in Chart.FindAllObjects<ChartHorizontalLine>())\n    Print(\"Horizontal line {0} at {1}\", line.Name, line.Y);","python":"# Not available in Python: generic type arguments cannot be passed, use FindAllObjects(ChartObjectType) instead\nfor line in api.Chart.FindAllObjects(ChartObjectType.HorizontalLine):\n    api.Print(f\"Horizontal line {line.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindAllObjects/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindAllObjects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.FindAllObjects(cAlgo.API.ChartObjectType)","kind":"method","name":"FindAllObjects","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartObject[] FindAllObjects(ChartObjectType objectType)","python":"chartArea.FindAllObjects(objectType: ChartObjectType) -> list[ChartObject]","summary":"Finds all the chart objects of the specified type.","remarks":null,"parameters":[{"name":"objectType","csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"Type of the object."}],"returns":{"csharpType":"ChartObject[]","pythonType":"list[ChartObject]","summary":"ChartObject[].","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLines = Chart.FindAllObjects(ChartObjectType.TrendLine);\nPrint(\"Trend lines on the chart: {0}\", trendLines.Length);","python":"trendLines = api.Chart.FindAllObjects(ChartObjectType.TrendLine)\napi.Print(f\"Trend lines on the chart: {trendLines.Length}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindAllObjects/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindAllObjects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.FindObject(System.String)","kind":"method","name":"FindObject","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartObject FindObject(string objectName)","python":"chartArea.FindObject(objectName: str) -> ChartObject","summary":"Finds the chart object of the specified name.","remarks":null,"parameters":[{"name":"objectName","csharpType":"string","pythonType":"str","summary":"The name of the object."}],"returns":{"csharpType":"ChartObject","pythonType":"ChartObject","summary":"ChartObject.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"// Draw a horizontal line.\nChart.DrawHorizontalLine(\"hLine\", Symbol.Ask, Color.Red);\n\n// Find the line that was drawn.\nvar obj = Chart.FindObject(\"hLine\");\nPrint(\"Found object with name {0}\", obj.Name);","python":"api.Chart.DrawHorizontalLine(\"hLine\", api.Symbol.Ask, Color.Red)\nobj = api.Chart.FindObject(\"hLine\")\nif obj is not None:\n    api.Print(f\"Found object with name {obj.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/FindObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.MoveControl(cAlgo.API.ControlBase,System.Int32,System.Double)","kind":"method","name":"MoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void MoveControl(ControlBase control, int barIndex, double y)","python":"chartArea.MoveControl(control: ControlBase, barIndex: int, y: float) -> None","summary":"Moves a chart control to chart / indicator area on absolute bar index and price (x,y) coordinates.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"High\", ForegroundColor = Color.Yellow };\nChart.AddControl(label, Bars.Count - 2, Bars.HighPrices.Last(1));\nChart.MoveControl(label, Bars.Count - 1, Bars.HighPrices.LastValue);","python":"label = TextBlock()\nlabel.Text = \"High\"\napi.Chart.AddControl(label, api.Bars.Count - 2, api.Bars.HighPrices.Last(1))\napi.Chart.MoveControl(label, api.Bars.Count - 1, api.Bars.HighPrices.LastValue)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.MoveControl(cAlgo.API.ControlBase,System.DateTime,System.Double)","kind":"method","name":"MoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void MoveControl(ControlBase control, DateTime time, double y)","python":"chartArea.MoveControl(control: ControlBase, time: DateTime, y: float) -> None","summary":"Moves a chart control to chart / indicator area on absolute time and price (x,y) coordinates.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Time"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Close\", ForegroundColor = Color.White };\nChart.AddControl(label, Bars.OpenTimes.Last(1), Bars.ClosePrices.Last(1));\nChart.MoveControl(label, Bars.OpenTimes.LastValue, Bars.ClosePrices.LastValue);","python":"label = TextBlock()\nlabel.Text = \"Close\"\napi.Chart.AddControl(label, api.Bars.OpenTimes.Last(1), api.Bars.ClosePrices.Last(1))\napi.Chart.MoveControl(label, api.Bars.OpenTimes.LastValue, api.Bars.ClosePrices.LastValue)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.MoveControl(cAlgo.API.ControlBase,System.DateTime)","kind":"method","name":"MoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void MoveControl(ControlBase control, DateTime time)","python":"chartArea.MoveControl(control: ControlBase, time: DateTime) -> None","summary":"Moves a chart control to chart / indicator area on absolute time (x) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Time"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Now\", VerticalAlignment = VerticalAlignment.Top };\nChart.AddControl(label, Bars.OpenTimes.Last(1));\nChart.MoveControl(label, Bars.OpenTimes.LastValue);","python":"label = TextBlock()\nlabel.Text = \"Now\"\napi.Chart.AddControl(label, api.Bars.OpenTimes.Last(1))\napi.Chart.MoveControl(label, api.Bars.OpenTimes.LastValue)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.MoveControl(cAlgo.API.ControlBase,System.Int32)","kind":"method","name":"MoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void MoveControl(ControlBase control, int barIndex)","python":"chartArea.MoveControl(control: ControlBase, barIndex: int) -> None","summary":"Moves a chart control to chart / indicator area on absolute bar index (x) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Last bar\", VerticalAlignment = VerticalAlignment.Bottom };\nChart.AddControl(label, Bars.Count - 2);\nChart.MoveControl(label, Bars.Count - 1);","python":"label = TextBlock()\nlabel.Text = \"Last bar\"\napi.Chart.AddControl(label, api.Bars.Count - 2)\napi.Chart.MoveControl(label, api.Bars.Count - 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.MoveControl(cAlgo.API.ControlBase,System.Double)","kind":"method","name":"MoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void MoveControl(ControlBase control, double y)","python":"chartArea.MoveControl(control: ControlBase, y: float) -> None","summary":"Moves a chart control to chart / indicator area on absolute price (y) coordinate.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The control that will be added"},{"name":"y","csharpType":"double","pythonType":"float","summary":"Price"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Bid\", HorizontalAlignment = HorizontalAlignment.Right };\nChart.AddControl(label, Symbol.Bid);\nChart.MoveControl(label, Symbol.Ask);","python":"label = TextBlock()\nlabel.Text = \"Bid\"\napi.Chart.AddControl(label, api.Symbol.Bid)\napi.Chart.MoveControl(label, api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.RemoveAllObjects","kind":"method","name":"RemoveAllObjects","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void RemoveAllObjects()","python":"chartArea.RemoveAllObjects() -> None","summary":"Removes all interactive and non-interactive objects available for the cBot or Indicator.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.RemoveAllObjects();\nPrint(\"Objects left on the chart: {0}\", Chart.Objects.Count);","python":"api.Chart.RemoveAllObjects()\napi.Print(f\"Objects left on the chart: {api.Chart.Objects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveAllObjects/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveAllObjects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.RemoveControl(cAlgo.API.ControlBase)","kind":"method","name":"RemoveControl","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void RemoveControl(ControlBase control)","python":"chartArea.RemoveControl(control: ControlBase) -> None","summary":"Remove a chart control from the chart area.","remarks":null,"parameters":[{"name":"control","csharpType":"ControlBase","pythonType":"ControlBase","summary":"An existing control that will be removed"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Loading...\", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };\nChart.AddControl(textBlock);\nChart.RemoveControl(textBlock);\nPrint(\"Loading message removed\");","python":"textBlock = TextBlock()\ntextBlock.Text = \"Loading...\"\napi.Chart.AddControl(textBlock)\napi.Chart.RemoveControl(textBlock)\napi.Print(\"Loading message removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Has no visible effect: the CLI displays no chart, so no control was ever shown."},{"name":"Cloud","support":"None","behaviour":"Has no visible effect: the cloud displays no chart, so no control was ever shown."}]}
{"id":"M:cAlgo.API.ChartArea.RemoveObject(System.String)","kind":"method","name":"RemoveObject","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void RemoveObject(string objectName)","python":"chartArea.RemoveObject(objectName: str) -> None","summary":"Removes the chart object of the specified name.","remarks":null,"parameters":[{"name":"objectName","csharpType":"string","pythonType":"str","summary":"The name of the object."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"target\", Symbol.Bid + 20 * Symbol.PipSize, Color.Green);\nChart.RemoveObject(\"target\");\nPrint(\"Target line exists: {0}\", Chart.FindObject(\"target\") != null);","python":"api.Chart.DrawHorizontalLine(\"target\", api.Symbol.Bid + 20 * api.Symbol.PipSize, Color.Green)\napi.Chart.RemoveObject(\"target\")\napi.Print(f\"Target line exists: {api.Chart.FindObject('target') is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.ResetPriceScale","kind":"method","name":"ResetPriceScale","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void ResetPriceScale()","python":"chartArea.ResetPriceScale() -> None","summary":"Resets the price scale of the chart area to its default state: enables the auto scale and fits the Y-axis range to the visible bars and outputs. Does not change the price scale mode, the inversion or the price axis position. Ignored on the main chart area while the price to bar ratio is locked. Does nothing in the silent backtesting, the CLI and the cloud.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.SetYRange(Chart.BottomY, Chart.TopY + Symbol.PipSize * 100);\n\nChart.ResetPriceScale();\n\nPrint(\"Auto scale after reset: {0} | Bottom Y: {1} | Top Y: {2}\", Chart.IsAutoScaleEnabled, Chart.BottomY, Chart.TopY);","python":"api.Chart.SetYRange(api.Chart.BottomY, api.Chart.TopY + api.Symbol.PipSize * 100)\n\napi.Chart.ResetPriceScale()\n\nprint(f\"Auto scale after reset: {api.Chart.IsAutoScaleEnabled} | Bottom Y: {api.Chart.BottomY} | Top Y: {api.Chart.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ResetPriceScale/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ResetPriceScale/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.SetYRange(System.Double,System.Double)","kind":"method","name":"SetYRange","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"void SetYRange(double bottomY, double topY)","python":"chartArea.SetYRange(bottomY: float, topY: float) -> None","summary":"Sets the Y-axis lowest and highest values range. Allows scrolling the chart by the Y-axis. If only one of the values is set, then the chart will be expanded regarding the lowest or highest value respectively. A range whose lowest value is not lower than its highest value is ignored, and so is any range on the main chart area while the price scale mode is Percent or IndexedTo100.","remarks":null,"parameters":[{"name":"bottomY","csharpType":"double","pythonType":"float","summary":"The lowest visible Y-axis value."},{"name":"topY","csharpType":"double","pythonType":"float","summary":"The highest visible Y-axis value."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var margin = 50 * Symbol.PipSize;\nChart.SetYRange(Bars.LowPrices.LastValue - margin, Bars.HighPrices.LastValue + margin);\nPrint(\"Visible Y range: {0} - {1}\", Chart.BottomY, Chart.TopY);","python":"margin = 50 * api.Symbol.PipSize\napi.Chart.SetYRange(api.Bars.LowPrices.LastValue - margin, api.Bars.HighPrices.LastValue + margin)\napi.Print(f\"Visible Y range: {api.Chart.BottomY} - {api.Chart.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SetYRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SetYRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartArea.TimeToX(System.DateTime)","kind":"method","name":"TimeToX","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double TimeToX(DateTime time)","python":"chartArea.TimeToX(time: DateTime) -> float","summary":"Converts area Time coordinate to Mouse X coordinate value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Time"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Mouse X coordinate","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var x = Chart.TimeToX(Bars.OpenTimes.LastValue);\nPrint(\"Last bar is at X: {0}\", x);","python":"x = api.Chart.TimeToX(api.Bars.OpenTimes.LastValue)\napi.Print(f\"Last bar is at X: {x}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/TimeToX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/TimeToX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns 0; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns 0; no conversion is done."}]}
{"id":"M:cAlgo.API.ChartArea.XToBarIndex(System.Double)","kind":"method","name":"XToBarIndex","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double XToBarIndex(double x)","python":"chartArea.XToBarIndex(x: float) -> float","summary":"Converts X coordinate to bar index.","remarks":null,"parameters":[{"name":"x","csharpType":"double","pythonType":"float","summary":"X coordinate"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Bar Index","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var barIndex = Chart.XToBarIndex(Chart.Width / 2);\nPrint(\"Bar index at the chart center: {0}\", barIndex);","python":"barIndex = api.Chart.XToBarIndex(api.Chart.Width / 2)\napi.Print(f\"Bar index at the chart center: {barIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/XToBarIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/XToBarIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns 0; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns 0; no conversion is done."}]}
{"id":"M:cAlgo.API.ChartArea.XToTime(System.Double)","kind":"method","name":"XToTime","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"DateTime XToTime(double x)","python":"chartArea.XToTime(x: float) -> DateTime","summary":"Converts Mouse X coordinate to area Time coordinate value.","remarks":null,"parameters":[{"name":"x","csharpType":"double","pythonType":"float","summary":"Mouse X"}],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"Time","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timeAtCenter = Chart.XToTime(Chart.Width / 2);\nPrint(\"Time at the chart center: {0}\", timeAtCenter);","python":"timeAtCenter = api.Chart.XToTime(api.Chart.Width / 2)\napi.Print(f\"Time at the chart center: {timeAtCenter}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/XToTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/XToTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns DateTime.MinValue; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns DateTime.MinValue; no conversion is done."}]}
{"id":"M:cAlgo.API.ChartArea.YToYValue(System.Double)","kind":"method","name":"YToYValue","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double YToYValue(double y)","python":"chartArea.YToYValue(y: float) -> float","summary":"Converts Mouse Y coordinate to area Y axis coordinate value.","remarks":null,"parameters":[{"name":"y","csharpType":"double","pythonType":"float","summary":"Mouse Y coordinate"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Area Y axis coordinate value","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var priceAtCenter = Chart.YToYValue(Chart.Height / 2);\nPrint(\"Price at the chart center: {0}\", priceAtCenter);","python":"priceAtCenter = api.Chart.YToYValue(api.Chart.Height / 2)\napi.Print(f\"Price at the chart center: {priceAtCenter}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/YToYValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/YToYValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns 0; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns 0; no conversion is done."}]}
{"id":"M:cAlgo.API.ChartArea.YValueToY(System.Double)","kind":"method","name":"YValueToY","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double YValueToY(double yValue)","python":"chartArea.YValueToY(yValue: float) -> float","summary":"Converts Area Y axis coordinate value to mouse Y coordinate.","remarks":null,"parameters":[{"name":"yValue","csharpType":"double","pythonType":"float","summary":"Y value"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Mouse Y coordinate","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var y = Chart.YValueToY(Symbol.Bid);\nPrint(\"Bid price is at Y: {0}\", y);","python":"y = api.Chart.YValueToY(api.Symbol.Bid)\napi.Print(f\"Bid price is at Y: {y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/YValueToY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/YValueToY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always returns 0; no conversion is done."},{"name":"Cloud","support":"None","behaviour":"Always returns 0; no conversion is done."}]}
{"id":"P:cAlgo.API.ChartArea.BottomY","kind":"property","name":"BottomY","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double BottomY {get;}","python":"chartArea.BottomY: float","summary":"Gets the lowest visible Y-axis value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Lowest visible price: {0}\", Chart.BottomY);","python":"api.Print(f\"Lowest visible price: {api.Chart.BottomY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/BottomY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/BottomY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.Draggables","kind":"property","name":"Draggables","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"ChartDraggables Draggables {get;}","python":"chartArea.Draggables: ChartDraggables","summary":"Gets chart area draggables.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartDraggables","pythonType":"ChartDraggables","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\nPrint(\"Draggables on the chart area: {0}\", Chart.Draggables.Count);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\napi.Print(f\"Draggables on the chart area: {api.Chart.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Draggables/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Draggables/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.Height","kind":"property","name":"Height","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double Height {get;}","python":"chartArea.Height: float","summary":"Gets the hight of the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart area height: {0} pixels\", Chart.Height);","python":"api.Print(f\"Chart area height: {api.Chart.Height} pixels\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.IsAlive","kind":"property","name":"IsAlive","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsAlive {get;}","python":"chartArea.IsAlive: bool","summary":"Checks whether the instance is still on the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var area in Chart.IndicatorAreas)\n{\n    if (area.IsAlive)\n        Print(\"Indicator area is still on the chart, height: {0}\", area.Height);\n}","python":"for area in api.Chart.IndicatorAreas:\n    if area.IsAlive:\n        api.Print(f\"Indicator area is still on the chart, height: {area.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/IsAlive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/IsAlive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.IsAutoScaleEnabled","kind":"property","name":"IsAutoScaleEnabled","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsAutoScaleEnabled {get; set;}","python":"chartArea.IsAutoScaleEnabled: bool","summary":"Gets or sets the value indicating whether the auto scale is enabled for the chart area. When enabled, the Y-axis range is fitted automatically to the visible bars and outputs while the chart scrolls. Setting the Y-axis range with SetYRange, or dragging the price axis, disables the auto scale. On the main chart area the auto scale is always enabled while the price scale mode is Percent or IndexedTo100, and is always disabled while the price to bar ratio is locked; setting it to a conflicting value in these states is ignored. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.SetYRange(Chart.BottomY, Chart.TopY);\nPrint(\"Auto scale after SetYRange: {0}\", Chart.IsAutoScaleEnabled);\n\nChart.IsAutoScaleEnabled = true;\nPrint(\"Auto scale: {0}\", Chart.IsAutoScaleEnabled);","python":"api.Chart.SetYRange(api.Chart.BottomY, api.Chart.TopY)\nprint(f\"Auto scale after SetYRange: {api.Chart.IsAutoScaleEnabled}\")\n\napi.Chart.IsAutoScaleEnabled = True\nprint(f\"Auto scale: {api.Chart.IsAutoScaleEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/IsAutoScaleEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/IsAutoScaleEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.Objects","kind":"property","name":"Objects","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"IReadonlyList<ChartObject> Objects {get;}","python":"chartArea.Objects: IReadonlyList[ChartObject]","summary":"Gets the chart objects collection.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartObject>","pythonType":"IReadonlyList[ChartObject]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Objects on the chart: {0}\", Chart.Objects.Count);\nforeach (var chartObject in Chart.Objects)\n    Print(\"{0} ({1})\", chartObject.Name, chartObject.ObjectType);","python":"api.Print(f\"Objects on the chart: {api.Chart.Objects.Count}\")\nfor chartObject in api.Chart.Objects:\n    api.Print(f\"{chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Objects/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Objects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.SelectedObjects","kind":"property","name":"SelectedObjects","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"IReadonlyList<ChartObject> SelectedObjects {get;}","python":"chartArea.SelectedObjects: IReadonlyList[ChartObject]","summary":"Gets the list of currently selected objects if any.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartObject>","pythonType":"IReadonlyList[ChartObject]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartObject in Chart.SelectedObjects)\n    Print(\"Selected object: {0}\", chartObject.Name);","python":"for chartObject in api.Chart.SelectedObjects:\n    api.Print(f\"Selected object: {chartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SelectedObjects/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SelectedObjects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Always empty: chart objects cannot be selected in the CLI."},{"name":"Cloud","support":"None","behaviour":"Always empty: chart objects cannot be selected in the cloud."}]}
{"id":"P:cAlgo.API.ChartArea.TopY","kind":"property","name":"TopY","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double TopY {get;}","python":"chartArea.TopY: float","summary":"Gets the highest visible Y-axis value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Highest visible price: {0} | Visible range: {1}\", Chart.TopY, Chart.TopY - Chart.BottomY);","python":"api.Print(f\"Highest visible price: {api.Chart.TopY} | Visible range: {api.Chart.TopY - api.Chart.BottomY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/TopY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/TopY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartArea.Width","kind":"property","name":"Width","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"double Width {get;}","python":"chartArea.Width: float","summary":"Gets the width of the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart area width: {0} pixels\", Chart.Width);","python":"api.Print(f\"Chart area width: {api.Chart.Width} pixels\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.Drag","kind":"event","name":"Drag","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartDragEventArgs> Drag;","python":"chartArea.Drag += handler  # handler(obj: ChartDragEventArgs)","summary":"Occurs when dragging a chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartDragEventArgs>","pythonType":"Callable[[ChartDragEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Drag += OnChartDrag;\n}\n\nprivate void OnChartDrag(ChartDragEventArgs args)\n{\n    Print(\"Dragging at {0}, {1}\", args.MouseX, args.MouseY);\n}","python":"def on_start(self):\n    api.Chart.Drag += self.on_chart_drag\n\ndef on_chart_drag(self, args):\n    api.Print(f\"Dragging at {args.MouseX}, {args.MouseY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Drag/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/Drag/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.DragEnd","kind":"event","name":"DragEnd","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartDragEventArgs> DragEnd;","python":"chartArea.DragEnd += handler  # handler(obj: ChartDragEventArgs)","summary":"Occurs when mouse button is released while dragging a chart area or a chart area loses mouse capture.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartDragEventArgs>","pythonType":"Callable[[ChartDragEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.DragEnd += OnChartDragEnd;\n}\n\nprivate void OnChartDragEnd(ChartDragEventArgs args)\n{\n    Print(\"Drag ended at {0}, {1}\", args.TimeValue, args.YValue);\n}","python":"def on_start(self):\n    api.Chart.DragEnd += self.on_chart_drag_end\n\ndef on_chart_drag_end(self, args):\n    api.Print(f\"Drag ended at {args.TimeValue}, {args.YValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DragEnd/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DragEnd/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.DragStart","kind":"event","name":"DragStart","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartDragEventArgs> DragStart;","python":"chartArea.DragStart += handler  # handler(obj: ChartDragEventArgs)","summary":"Occurs when MouseDown event is happening on a chart area and a mouse is captured for dragging.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartDragEventArgs>","pythonType":"Callable[[ChartDragEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.DragStart += OnChartDragStart;\n}\n\nprivate void OnChartDragStart(ChartDragEventArgs args)\n{\n    Print(\"Drag started at {0}, {1}\", args.TimeValue, args.YValue);\n}","python":"def on_start(self):\n    api.Chart.DragStart += self.on_chart_drag_start\n\ndef on_chart_drag_start(self, args):\n    api.Print(f\"Drag started at {args.TimeValue}, {args.YValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DragStart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/DragStart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseDown","kind":"event","name":"MouseDown","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseEventArgs> MouseDown;","python":"chartArea.MouseDown += handler  # handler(obj: ChartMouseEventArgs)","summary":"Occurs when the left mouse button is pressed down.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseEventArgs>","pythonType":"Callable[[ChartMouseEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    if (args.CtrlKey)\n        Chart.DrawHorizontalLine(\"clickLevel\", args.YValue, Color.Yellow);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    if args.CtrlKey:\n        api.Chart.DrawHorizontalLine(\"clickLevel\", args.YValue, Color.Yellow)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseDown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseDown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseEnter","kind":"event","name":"MouseEnter","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseEventArgs> MouseEnter;","python":"chartArea.MouseEnter += handler  # handler(obj: ChartMouseEventArgs)","summary":"Occurs when the cursor hover over the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseEventArgs>","pythonType":"Callable[[ChartMouseEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseEnter += OnChartMouseEnter;\n}\n\nprivate void OnChartMouseEnter(ChartMouseEventArgs args)\n{\n    Print(\"Mouse entered at {0}, {1}\", args.MouseX, args.MouseY);\n}","python":"def on_start(self):\n    api.Chart.MouseEnter += self.on_chart_mouse_enter\n\ndef on_chart_mouse_enter(self, args):\n    api.Print(f\"Mouse entered at {args.MouseX}, {args.MouseY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseEnter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseEnter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseLeave","kind":"event","name":"MouseLeave","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseEventArgs> MouseLeave;","python":"chartArea.MouseLeave += handler  # handler(obj: ChartMouseEventArgs)","summary":"Occurs when the cursor leaves the chart area","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseEventArgs>","pythonType":"Callable[[ChartMouseEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseLeave += OnChartMouseLeave;\n}\n\nprivate void OnChartMouseLeave(ChartMouseEventArgs args)\n{\n    Print(\"Mouse left the chart at {0}, {1}\", args.MouseX, args.MouseY);\n}","python":"def on_start(self):\n    api.Chart.MouseLeave += self.on_chart_mouse_leave\n\ndef on_chart_mouse_leave(self, args):\n    api.Print(f\"Mouse left the chart at {args.MouseX}, {args.MouseY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseLeave/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseLeave/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseMove","kind":"event","name":"MouseMove","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseEventArgs> MouseMove;","python":"chartArea.MouseMove += handler  # handler(obj: ChartMouseEventArgs)","summary":"Occurs when the cursor moves over the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseEventArgs>","pythonType":"Callable[[ChartMouseEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseMove += OnChartMouseMove;\n}\n\nprivate void OnChartMouseMove(ChartMouseEventArgs args)\n{\n    Chart.DrawStaticText(\"cursor\", string.Format(\"{0} | {1}\", args.TimeValue, args.YValue), VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);\n}","python":"def on_start(self):\n    api.Chart.MouseMove += self.on_chart_mouse_move\n\ndef on_chart_mouse_move(self, args):\n    api.Chart.DrawStaticText(\"cursor\", f\"{args.TimeValue} | {args.YValue}\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseMove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseMove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseUp","kind":"event","name":"MouseUp","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseEventArgs> MouseUp;","python":"chartArea.MouseUp += handler  # handler(obj: ChartMouseEventArgs)","summary":"Occurs when the left mouse button is released.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseEventArgs>","pythonType":"Callable[[ChartMouseEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseUp += OnChartMouseUp;\n}\n\nprivate void OnChartMouseUp(ChartMouseEventArgs args)\n{\n    Print(\"Mouse released at bar {0}, price {1}\", args.BarIndex, args.YValue);\n}","python":"def on_start(self):\n    api.Chart.MouseUp += self.on_chart_mouse_up\n\ndef on_chart_mouse_up(self, args):\n    api.Print(f\"Mouse released at bar {args.BarIndex}, price {args.YValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseUp/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseUp/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.MouseWheel","kind":"event","name":"MouseWheel","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartMouseWheelEventArgs> MouseWheel;","python":"chartArea.MouseWheel += handler  # handler(obj: ChartMouseWheelEventArgs)","summary":"Occurs when the mouse wheel button is rotated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartMouseWheelEventArgs>","pythonType":"Callable[[ChartMouseWheelEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseWheel += OnChartMouseWheel;\n}\n\nprivate void OnChartMouseWheel(ChartMouseWheelEventArgs args)\n{\n    Print(\"Mouse wheel delta: {0}\", args.Delta);\n}","python":"def on_start(self):\n    api.Chart.MouseWheel += self.on_chart_mouse_wheel\n\ndef on_chart_mouse_wheel(self, args):\n    api.Print(f\"Mouse wheel delta: {args.Delta}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseWheel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseWheel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."},{"name":"Cloud","support":"None","behaviour":"Never raised: no chart is displayed, so there is nothing to interact with."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectHoverChanged","kind":"event","name":"ObjectHoverChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectHoverChangedEventArgs> ObjectHoverChanged;","python":"chartArea.ObjectHoverChanged += handler  # handler(obj: ChartObjectHoverChangedEventArgs)","summary":"Occurs when the cursor hovers over or leaves the object.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectHoverChangedEventArgs>","pythonType":"Callable[[ChartObjectHoverChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectHoverChanged += OnObjectHoverChanged;\n}\n\nprivate void OnObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    if (args.IsObjectHovered)\n        Print(\"Hovering over {0}\", args.ChartObject.Name);\n}","python":"def on_start(self):\n    api.Chart.ObjectHoverChanged += self.on_object_hover_changed\n\ndef on_object_hover_changed(self, args):\n    if args.IsObjectHovered:\n        api.Print(f\"Hovering over {args.ChartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectHoverChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectHoverChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: chart objects cannot be hovered."},{"name":"Cloud","support":"None","behaviour":"Never raised: chart objects cannot be hovered."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsAdded","kind":"event","name":"ObjectsAdded","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsAddedEventArgs> ObjectsAdded;","python":"chartArea.ObjectsAdded += handler  # handler(obj: ChartObjectsAddedEventArgs)","summary":"Occurs when one or several chart objects are added to the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsAddedEventArgs>","pythonType":"Callable[[ChartObjectsAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsAdded += OnChartObjectsAdded;\n}\n\nprivate void OnChartObjectsAdded(ChartObjectsAddedEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Object added: {0} ({1})\", chartObject.Name, chartObject.ObjectType);\n}","python":"def on_start(self):\n    api.Chart.ObjectsAdded += self.on_chart_objects_added\n\ndef on_chart_objects_added(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Object added: {chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsMoveEnded","kind":"event","name":"ObjectsMoveEnded","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsMoveEndedEventArgs> ObjectsMoveEnded;","python":"chartArea.ObjectsMoveEnded += handler  # handler(obj: ChartObjectsMoveEndedEventArgs)","summary":"Occurs when one or several chart objects are moved.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsMoveEndedEventArgs>","pythonType":"Callable[[ChartObjectsMoveEndedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoveEnded += OnObjectsMoveEnded;\n}\n\nprivate void OnObjectsMoveEnded(ChartObjectsMoveEndedEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Finished moving {0}\", chartObject.Name);\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoveEnded += self.on_objects_move_ended\n\ndef on_objects_move_ended(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Finished moving {chartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoveEnded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoveEnded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: chart objects cannot be moved."},{"name":"Cloud","support":"None","behaviour":"Never raised: chart objects cannot be moved."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsMoveStarted","kind":"event","name":"ObjectsMoveStarted","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsMoveStartedEventArgs> ObjectsMoveStarted;","python":"chartArea.ObjectsMoveStarted += handler  # handler(obj: ChartObjectsMoveStartedEventArgs)","summary":"Occurs when one or several chart objects move started.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsMoveStartedEventArgs>","pythonType":"Callable[[ChartObjectsMoveStartedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoveStarted += OnObjectsMoveStarted;\n}\n\nprivate void OnObjectsMoveStarted(ChartObjectsMoveStartedEventArgs args)\n{\n    Print(\"Started moving {0} objects\", args.ChartObjects.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoveStarted += self.on_objects_move_started\n\ndef on_objects_move_started(self, args):\n    api.Print(f\"Started moving {args.ChartObjects.Count} objects\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoveStarted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoveStarted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: chart objects cannot be moved."},{"name":"Cloud","support":"None","behaviour":"Never raised: chart objects cannot be moved."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsMoving","kind":"event","name":"ObjectsMoving","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsMovingEventArgs> ObjectsMoving;","python":"chartArea.ObjectsMoving += handler  # handler(obj: ChartObjectsMovingEventArgs)","summary":"Occurs when one or several chart objects are moving.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsMovingEventArgs>","pythonType":"Callable[[ChartObjectsMovingEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoving += OnObjectsMoving;\n}\n\nprivate void OnObjectsMoving(ChartObjectsMovingEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Moving {0}\", chartObject.Name);\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoving += self.on_objects_moving\n\ndef on_objects_moving(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Moving {chartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoving/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsMoving/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: chart objects cannot be moved."},{"name":"Cloud","support":"None","behaviour":"Never raised: chart objects cannot be moved."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsRemoved","kind":"event","name":"ObjectsRemoved","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsRemovedEventArgs> ObjectsRemoved;","python":"chartArea.ObjectsRemoved += handler  # handler(obj: ChartObjectsRemovedEventArgs)","summary":"Occurs when one or several chart object are removed from the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsRemovedEventArgs>","pythonType":"Callable[[ChartObjectsRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsRemoved += OnChartObjectsRemoved;\n}\n\nprivate void OnChartObjectsRemoved(ChartObjectsRemovedEventArgs args)\n{\n    Print(\"{0} objects removed | Remaining: {1}\", args.ChartObjects.Count, args.Area.Objects.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsRemoved += self.on_chart_objects_removed\n\ndef on_chart_objects_removed(self, args):\n    api.Print(f\"{args.ChartObjects.Count} objects removed | Remaining: {args.Area.Objects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsSelectionChanged","kind":"event","name":"ObjectsSelectionChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsSelectionChangedEventArgs> ObjectsSelectionChanged;","python":"chartArea.ObjectsSelectionChanged += handler  # handler(obj: ChartObjectsSelectionChangedEventArgs)","summary":"Occurs when chart objects are selected or deselected.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsSelectionChangedEventArgs>","pythonType":"Callable[[ChartObjectsSelectionChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsSelectionChanged += OnObjectsSelectionChanged;\n}\n\nprivate void OnObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs args)\n{\n    Print(\"Selected: {0} | Deselected: {1}\", args.ObjectsAddedToSelection.Count, args.ObjectsRemovedFromSelection.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsSelectionChanged += self.on_objects_selection_changed\n\ndef on_objects_selection_changed(self, args):\n    api.Print(f\"Selected: {args.ObjectsAddedToSelection.Count} | Deselected: {args.ObjectsRemovedFromSelection.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsSelectionChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsSelectionChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised: chart objects cannot be selected."},{"name":"Cloud","support":"None","behaviour":"Never raised: chart objects cannot be selected."}]}
{"id":"E:cAlgo.API.ChartArea.ObjectsUpdated","kind":"event","name":"ObjectsUpdated","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectsUpdatedEventArgs> ObjectsUpdated;","python":"chartArea.ObjectsUpdated += handler  # handler(obj: ChartObjectsUpdatedEventArgs)","summary":"Occurs when one or several chart objects are updated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectsUpdatedEventArgs>","pythonType":"Callable[[ChartObjectsUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsUpdated += OnChartObjectsUpdated;\n}\n\nprivate void OnChartObjectsUpdated(ChartObjectsUpdatedEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Object updated: {0}\", chartObject.Name);\n}","python":"def on_start(self):\n    api.Chart.ObjectsUpdated += self.on_chart_objects_updated\n\ndef on_chart_objects_updated(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Object updated: {chartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsUpdated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ObjectsUpdated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.PriceScaleChanged","kind":"event","name":"PriceScaleChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartPriceScaleEventArgs> PriceScaleChanged;","python":"chartArea.PriceScaleChanged += handler  # handler(obj: ChartPriceScaleEventArgs)","summary":"Occurs when the price scale state of the chart area changes: the auto scale is enabled or disabled, or the price scale is reset. On the main chart area it also occurs when any chart level price scale setting changes: the price scale mode, the inversion, the price to bar ratio lock or value, the scale price chart only option or the price axis position. Not raised in the silent backtesting, the CLI and the cloud.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartPriceScaleEventArgs>","pythonType":"Callable[[ChartPriceScaleEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceScaleChanged += args => Print(\"Price scale changed | Auto scale: {0} | Price scale mode: {1}\", args.ChartArea.IsAutoScaleEnabled, args.Chart.PriceScaleMode);","python":"api.Chart.PriceScaleChanged += lambda args: print(f\"Price scale changed | Auto scale: {args.ChartArea.IsAutoScaleEnabled} | Price scale mode: {args.Chart.PriceScaleMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/PriceScaleChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/PriceScaleChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ScrollChanged","kind":"event","name":"ScrollChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartScrollEventArgs> ScrollChanged;","python":"chartArea.ScrollChanged += handler  # handler(obj: ChartScrollEventArgs)","summary":"Occurs when the X-axis position value or the Y-axis position value changes while scrolling.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartScrollEventArgs>","pythonType":"Callable[[ChartScrollEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    Print(\"Scrolled by {0} bars | Top Y delta: {1}\", args.BarsDelta, args.TopYDelta);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    api.Print(f\"Scrolled by {args.BarsDelta} bars | Top Y delta: {args.TopYDelta}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ScrollChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ScrollChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Only the cBot's own scrolling can raise it; no user can scroll a chart in the CLI."},{"name":"Cloud","support":"None","behaviour":"Never raised: the cloud host does not report viewport changes."}]}
{"id":"E:cAlgo.API.ChartArea.SizeChanged","kind":"event","name":"SizeChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartSizeEventArgs> SizeChanged;","python":"chartArea.SizeChanged += handler  # handler(obj: ChartSizeEventArgs)","summary":"Occurs when the chart area size has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartSizeEventArgs>","pythonType":"Callable[[ChartSizeEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.SizeChanged += OnChartSizeChanged;\n}\n\nprivate void OnChartSizeChanged(ChartSizeEventArgs args)\n{\n    Print(\"Chart area resized to {0}x{1}\", args.Area.Width, args.Area.Height);\n}","python":"def on_start(self):\n    api.Chart.SizeChanged += self.on_chart_size_changed\n\ndef on_chart_size_changed(self, args):\n    api.Print(f\"Chart area resized to {args.Area.Width}x{args.Area.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SizeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/SizeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectAdded","kind":"event","name":"ObjectAdded","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectAddedEventArgs> ObjectAdded;","python":"chartArea.ObjectAdded += handler  # handler(obj: ChartObjectAddedEventArgs)","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectAddedEventArgs>","pythonType":"Callable[[ChartObjectAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use ObjectsAdded instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectUpdated","kind":"event","name":"ObjectUpdated","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectUpdatedEventArgs> ObjectUpdated;","python":"chartArea.ObjectUpdated += handler  # handler(obj: ChartObjectUpdatedEventArgs)","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectUpdatedEventArgs>","pythonType":"Callable[[ChartObjectUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use ObjectsUpdated instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectRemoved","kind":"event","name":"ObjectRemoved","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectRemovedEventArgs> ObjectRemoved;","python":"chartArea.ObjectRemoved += handler  # handler(obj: ChartObjectRemovedEventArgs)","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectRemovedEventArgs>","pythonType":"Callable[[ChartObjectRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use ObjectsRemoved instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.ChartArea.ObjectSelectionChanged","kind":"event","name":"ObjectSelectionChanged","type":"T:cAlgo.API.ChartArea","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartObjectSelectionChangedEventArgs> ObjectSelectionChanged;","python":"chartArea.ObjectSelectionChanged += handler  # handler(obj: ChartObjectSelectionChangedEventArgs)","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartObjectSelectionChangedEventArgs>","pythonType":"Callable[[ChartObjectSelectionChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use ObjectsSelectionChanged instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartArrow","kind":"interface","name":"ChartArrow","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartArrow","python":"ChartArrow","summary":"Represents the arrow chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        var chartArrow = Chart.DrawArrow(\"Test Arrow\", Chart.LastVisibleBarIndex, Bars.LowPrices[Chart.LastVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], Color.Red, 2, LineStyle.Dots);\n        chartArrow.IsInteractive = true;\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        chartArrow = api.Chart.DrawArrow(\"Test Arrow\", api.Chart.LastVisibleBarIndex, api.Bars.LowPrices[api.Chart.LastVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.HighPrices[api.Chart.LastVisibleBarIndex], Color.Red, 2, LineStyle.Dots)\n        chartArrow.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArrow.CalculateY(System.Int32)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(int barIndex)","python":"chartArrow.CalculateY(barIndex: int) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."}],"returns":{"csharpType":"double","pythonType":"float","summary":"System.Double.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Red);\narrow.ExtendToInfinity = true;\nPrint(\"Arrow value at the last bar: {0}\", arrow.CalculateY(Bars.Count - 1));","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Red)\narrow.ExtendToInfinity = True\napi.Print(f\"Arrow value at the last bar: {arrow.CalculateY(api.Bars.Count - 1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartArrow.CalculateY(System.DateTime)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(DateTime time)","python":"chartArrow.CalculateY(time: DateTime) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."}],"returns":{"csharpType":"double","pythonType":"float","summary":"System.Double.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Red);\narrow.ExtendToInfinity = true;\nPrint(\"Arrow value at {0}: {1}\", Bars.OpenTimes.LastValue, arrow.CalculateY(Bars.OpenTimes.LastValue));","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Red)\narrow.ExtendToInfinity = True\napi.Print(f\"Arrow value at {api.Bars.OpenTimes.LastValue}: {arrow.CalculateY(api.Bars.OpenTimes.LastValue)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartArrow.Color: Color","summary":"Gets or sets the color of the Trend Line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Color = Color.Green;\nPrint(\"Arrow color: {0}\", arrow.Color);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Color = Color.Green\napi.Print(f\"Arrow color: {arrow.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.ExtendToInfinity","kind":"property","name":"ExtendToInfinity","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ExtendToInfinity {get; set;}","python":"chartArrow.ExtendToInfinity: bool","summary":"Defines if the Arrow extends to infinity.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.ExtendToInfinity = true;\nPrint(\"Arrow extends to infinity: {0}\", arrow.ExtendToInfinity);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.ExtendToInfinity = True\napi.Print(f\"Arrow extends to infinity: {arrow.ExtendToInfinity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/ExtendToInfinity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/ExtendToInfinity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartArrow.LineStyle: LineStyle","summary":"Gets or sets the Arrow style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.LineStyle = LineStyle.LinesDots;\nPrint(\"Arrow line style: {0}\", arrow.LineStyle);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.LineStyle = LineStyle.LinesDots\napi.Print(f\"Arrow line style: {arrow.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.ShowAngle","kind":"property","name":"ShowAngle","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ShowAngle {get; set;}","python":"chartArrow.ShowAngle: bool","summary":"Defines the arrow angle.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.ShowAngle = true;\nPrint(\"Arrow angle shown: {0}\", arrow.ShowAngle);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.ShowAngle = True\napi.Print(f\"Arrow angle shown: {arrow.ShowAngle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/ShowAngle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/ShowAngle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartArrow.Thickness: int","summary":"Gets or sets the thickness of the Arrow.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Thickness = 3;\nPrint(\"Arrow thickness: {0}\", arrow.Thickness);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Thickness = 3\napi.Print(f\"Arrow thickness: {arrow.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time1 {get; set;}","python":"chartArrow.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Time1 = Bars.OpenTimes.Last(30);\nPrint(\"Arrow start time: {0}\", arrow.Time1);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Time1 = api.Bars.OpenTimes.Last(30)\napi.Print(f\"Arrow start time: {arrow.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time2 {get; set;}","python":"chartArrow.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Arrow end time: {0}\", arrow.Time2);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Arrow end time: {arrow.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y1 {get; set;}","python":"chartArrow.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Y1 = Bars.LowPrices.Last(20) - 5 * Symbol.PipSize;\nPrint(\"Arrow start price: {0}\", arrow.Y1);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Y1 = api.Bars.LowPrices.Last(20) - 5 * api.Symbol.PipSize\napi.Print(f\"Arrow start price: {arrow.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartArrow.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartArrow","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y2 {get; set;}","python":"chartArrow.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var arrow = Chart.DrawArrow(\"arrow\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narrow.Y2 = Bars.HighPrices.LastValue + 5 * Symbol.PipSize;\nPrint(\"Arrow end price: {0}\", arrow.Y2);","python":"arrow = api.Chart.DrawArrow(\"arrow\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narrow.Y2 = api.Bars.HighPrices.LastValue + 5 * api.Symbol.PipSize\napi.Print(f\"Arrow end price: {arrow.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartArrow/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartColorEventArgs","kind":"class","name":"ChartColorEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartColorEventArgs","python":"ChartColorEventArgs","summary":"Provides data for the chart color event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartColorEventArgs\n    public partial class ChartColorEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ColorsChanged += Chart_ColorsChanged;\n        }\n\n        private void Chart_ColorsChanged(ChartColorEventArgs obj)\n        {\n            Print(\"Chart {0} {1} Color changed\", obj.Chart.SymbolName, obj.Chart.TimeFrame);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ColorsChanged += self.on_chart_color_changed\n\n    def on_chart_color_changed(self, args):\n        print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} Color changed\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartColorEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartColorEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ColorsChanged)."}]}
{"id":"P:cAlgo.API.ChartColorEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartColorEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartColorEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ColorsChanged += OnChartColorsChanged;\n}\n\nprivate void OnChartColorsChanged(ChartColorEventArgs args)\n{\n    Print(\"Colors changed on chart {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.ColorsChanged += self.on_chart_colors_changed\n\ndef on_chart_colors_changed(self, args):\n    api.Print(f\"Colors changed on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartColorEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartColorEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ColorsChanged)."}]}
{"id":"T:cAlgo.API.ChartColorSettings","kind":"interface","name":"ChartColorSettings","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartColorSettings","python":"ChartColorSettings","summary":"Represents the charts Color Settings.","remarks":"Use the Color classes to\u00A0set the chart Color Settings.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This indicator allows you to change chart colors via chart controls\n    public partial class ChartColorSettingsSample : Indicator\n    {\n        private TextBox _askPriceLineColorTextBox;\n\n        private TextBox _bidPriceLineColorTextBox;\n\n        private TextBox _backgroundColorTextBox;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(10, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Left,\n                VerticalAlignment = VerticalAlignment.Bottom\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold);\n            style.Set(ControlProperty.ForegroundColor, Color.Red);\n            style.Set(ControlProperty.MinWidth, 100);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Ask Price Line Color\",\n                Style = style\n            }, 0, 0);\n\n            _askPriceLineColorTextBox = new TextBox\n            {\n                Text = Chart.ColorSettings.AskPriceLineColor.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_askPriceLineColorTextBox, 0, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Bid Price Line Color\",\n                Style = style\n            }, 1, 0);\n\n            _bidPriceLineColorTextBox = new TextBox\n            {\n                Text = Chart.ColorSettings.BidPriceLineColor.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_bidPriceLineColorTextBox, 1, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Background Color\",\n                Style = style\n            }, 2, 0);\n\n            _backgroundColorTextBox = new TextBox\n            {\n                Text = Chart.ColorSettings.BackgroundColor.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_backgroundColorTextBox, 2, 1);\n\n            var changeButton = new Button\n            {\n                Text = \"Change\",\n                Style = style\n            };\n\n            changeButton.Click += ChangeButton_Click;\n\n            grid.AddChild(changeButton, 9, 0);\n\n            Chart.AddControl(grid);\n        }\n\n        private void ChangeButton_Click(ButtonClickEventArgs obj)\n        {\n            Chart.ColorSettings.AskPriceLineColor = GetColor(_askPriceLineColorTextBox.Text);\n            Chart.ColorSettings.BidPriceLineColor = GetColor(_bidPriceLineColorTextBox.Text);\n            Chart.ColorSettings.BackgroundColor = GetColor(_backgroundColorTextBox.Text);\n        }\n\n        private Color GetColor(string colorString, int alpha = 255)\n        {\n            var color = colorString[0] == '#' ? Color.FromHex(colorString) : Color.FromName(colorString);\n\n            return Color.FromArgb(alpha, color);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock\n\n    def get_color(self, colorString, alpha = 255):\n        color = Color.FromHex(colorString) if colorString[0] == '#' else Color.FromName(colorString)\n        return Color.FromArgb(alpha, color)\n\n    def on_change_button_clicked(self, args):\n        api.Chart.ColorSettings.AskPriceLineColor = self.get_color(self.askPriceLineColorTextBox.Text)\n        api.Chart.ColorSettings.BidPriceLineColor = self.get_color(self.bidPriceLineColorTextBox.Text)\n        api.Chart.ColorSettings.BackgroundColor = self.get_color(self.backgroundColorTextBox.Text)\n\n    def initialize(self):\n        grid = Grid(10, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Left\n        grid.VerticalAlignment = VerticalAlignment.Bottom\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Margin, 5)\n        self.style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold)\n        self.style.Set(ControlProperty.ForegroundColor, Color.Red)\n        self.style.Set(ControlProperty.MinWidth, 100)\n\n        grid.AddChild(self.get_text_block(\"Ask Price Line Color\"), 0, 0)\n\n        self.askPriceLineColorTextBox = self.get_text_block(str(api.Chart.ColorSettings.AskPriceLineColor))\n\n        grid.AddChild(self.askPriceLineColorTextBox, 0, 1)\n\n        grid.AddChild(self.get_text_block(\"Bid Price Line Color\"), 1, 0)\n\n        self.bidPriceLineColorTextBox = self.get_text_block(str(api.Chart.ColorSettings.BidPriceLineColor))\n        grid.AddChild(self.bidPriceLineColorTextBox, 1, 1)\n\n        grid.AddChild(self.get_text_block(\"Background Color\"), 2, 0)\n\n        self.backgroundColorTextBox = self.get_text_block(str(api.Chart.ColorSettings.BackgroundColor))\n        grid.AddChild(self.backgroundColorTextBox, 2, 1)\n\n        changeButton = Button()\n        changeButton.Text = \"Change\"\n        changeButton.Style = self.style\n        changeButton.Click += self.on_change_button_clicked\n\n        grid.AddChild(changeButton, 9, 0)\n\n        api.Chart.AddControl(grid)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.AreaFillColor","kind":"property","name":"AreaFillColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color AreaFillColor {get; set;}","python":"chartColorSettings.AreaFillColor: Color","summary":"Gets or sets the color of area chart fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"Chart.ChartType = ChartType.Area;\nChart.ColorSettings.AreaFillColor = Color.FromArgb(60, Color.SteelBlue);\nPrint(\"Chart area fill color: {0}\", Chart.ColorSettings.AreaFillColor);","python":"api.Chart.ChartType = ChartType.Area\napi.Chart.ColorSettings.AreaFillColor = Color.FromArgb(60, Color.SteelBlue)\napi.Print(f\"Chart area fill color: {api.Chart.ColorSettings.AreaFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/AreaFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/AreaFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.AskPriceLineColor","kind":"property","name":"AskPriceLineColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color AskPriceLineColor {get; set;}","python":"chartColorSettings.AskPriceLineColor: Color","summary":"Gets or sets the color of the ask price line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.AskPriceLineColor = Color.Tomato;\nPrint(\"Chart ask line color: {0}\", Chart.ColorSettings.AskPriceLineColor);","python":"api.Chart.ColorSettings.AskPriceLineColor = Color.Tomato\napi.Print(f\"Chart ask line color: {api.Chart.ColorSettings.AskPriceLineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/AskPriceLineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/AskPriceLineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BackgroundColor {get; set;}","python":"chartColorSettings.BackgroundColor: Color","summary":"Gets or sets the color of the chart background.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BackgroundColor = Color.FromHex(\"#FF101820\");\nPrint(\"Chart background color: {0}\", Chart.ColorSettings.BackgroundColor);","python":"api.Chart.ColorSettings.BackgroundColor = Color.FromHex(\"#FF101820\")\napi.Print(f\"Chart background color: {api.Chart.ColorSettings.BackgroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BearFillColor","kind":"property","name":"BearFillColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BearFillColor {get; set;}","python":"chartColorSettings.BearFillColor: Color","summary":"Gets or sets the color of the bear candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BearFillColor = Color.OrangeRed;\nPrint(\"Chart bear fill color: {0}\", Chart.ColorSettings.BearFillColor);","python":"api.Chart.ColorSettings.BearFillColor = Color.OrangeRed\napi.Print(f\"Chart bear fill color: {api.Chart.ColorSettings.BearFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BearFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BearFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BearOutlineColor","kind":"property","name":"BearOutlineColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BearOutlineColor {get; set;}","python":"chartColorSettings.BearOutlineColor: Color","summary":"Gets or sets the color of the bear candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BearOutlineColor = Color.Red;\nPrint(\"Chart bear outline color: {0}\", Chart.ColorSettings.BearOutlineColor);","python":"api.Chart.ColorSettings.BearOutlineColor = Color.Red\napi.Print(f\"Chart bear outline color: {api.Chart.ColorSettings.BearOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BearOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BearOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BidPriceLineColor","kind":"property","name":"BidPriceLineColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BidPriceLineColor {get; set;}","python":"chartColorSettings.BidPriceLineColor: Color","summary":"Gets or sets the color of the bid price line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BidPriceLineColor = Color.DodgerBlue;\nPrint(\"Chart bid line color: {0}\", Chart.ColorSettings.BidPriceLineColor);","python":"api.Chart.ColorSettings.BidPriceLineColor = Color.DodgerBlue\napi.Print(f\"Chart bid line color: {api.Chart.ColorSettings.BidPriceLineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BidPriceLineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BidPriceLineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BullFillColor","kind":"property","name":"BullFillColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BullFillColor {get; set;}","python":"chartColorSettings.BullFillColor: Color","summary":"Gets or sets the color of the bull candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BullFillColor = Color.LimeGreen;\nPrint(\"Chart bull fill color: {0}\", Chart.ColorSettings.BullFillColor);","python":"api.Chart.ColorSettings.BullFillColor = Color.LimeGreen\napi.Print(f\"Chart bull fill color: {api.Chart.ColorSettings.BullFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BullFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BullFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BullOutlineColor","kind":"property","name":"BullOutlineColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BullOutlineColor {get; set;}","python":"chartColorSettings.BullOutlineColor: Color","summary":"Gets or sets the color of the bull candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BullOutlineColor = Color.Green;\nPrint(\"Chart bull outline color: {0}\", Chart.ColorSettings.BullOutlineColor);","python":"api.Chart.ColorSettings.BullOutlineColor = Color.Green\napi.Print(f\"Chart bull outline color: {api.Chart.ColorSettings.BullOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BullOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BullOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.BuyColor","kind":"property","name":"BuyColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color BuyColor {get; set;}","python":"chartColorSettings.BuyColor: Color","summary":"Gets or sets the color of Buy positions and orders.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.BuyColor = Color.RoyalBlue;\nPrint(\"Chart buy color: {0}\", Chart.ColorSettings.BuyColor);","python":"api.Chart.ColorSettings.BuyColor = Color.RoyalBlue\napi.Print(f\"Chart buy color: {api.Chart.ColorSettings.BuyColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BuyColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/BuyColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.ForegroundColor","kind":"property","name":"ForegroundColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color ForegroundColor {get; set;}","python":"chartColorSettings.ForegroundColor: Color","summary":"Gets or sets the color of the chart foreground.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.ForegroundColor = Color.WhiteSmoke;\nPrint(\"Chart foreground color: {0}\", Chart.ColorSettings.ForegroundColor);","python":"api.Chart.ColorSettings.ForegroundColor = Color.WhiteSmoke\napi.Print(f\"Chart foreground color: {api.Chart.ColorSettings.ForegroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/ForegroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/ForegroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.GridLinesColor","kind":"property","name":"GridLinesColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color GridLinesColor {get; set;}","python":"chartColorSettings.GridLinesColor: Color","summary":"Gets or sets the color of the grid lines.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.GridLinesColor = Color.FromArgb(40, Color.Gray);\nPrint(\"Chart grid lines color: {0}\", Chart.ColorSettings.GridLinesColor);","python":"api.Chart.ColorSettings.GridLinesColor = Color.FromArgb(40, Color.Gray)\napi.Print(f\"Chart grid lines color: {api.Chart.ColorSettings.GridLinesColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/GridLinesColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/GridLinesColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.LosingDealColor","kind":"property","name":"LosingDealColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color LosingDealColor {get; set;}","python":"chartColorSettings.LosingDealColor: Color","summary":"Gets or sets the color of the losing deal.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.LosingDealColor = Color.Red;\nPrint(\"Chart losing deal color: {0}\", Chart.ColorSettings.LosingDealColor);","python":"api.Chart.ColorSettings.LosingDealColor = Color.Red\napi.Print(f\"Chart losing deal color: {api.Chart.ColorSettings.LosingDealColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/LosingDealColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/LosingDealColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.PeriodSeparatorColor","kind":"property","name":"PeriodSeparatorColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color PeriodSeparatorColor {get; set;}","python":"chartColorSettings.PeriodSeparatorColor: Color","summary":"Gets or sets the color of the period separator.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.PeriodSeparatorColor = Color.DimGray;\nPrint(\"Chart period separator color: {0}\", Chart.ColorSettings.PeriodSeparatorColor);","python":"api.Chart.ColorSettings.PeriodSeparatorColor = Color.DimGray\napi.Print(f\"Chart period separator color: {api.Chart.ColorSettings.PeriodSeparatorColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/PeriodSeparatorColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/PeriodSeparatorColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.SellColor","kind":"property","name":"SellColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color SellColor {get; set;}","python":"chartColorSettings.SellColor: Color","summary":"Gets or sets the color of Sell order positions and orders.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.SellColor = Color.Crimson;\nPrint(\"Chart sell color: {0}\", Chart.ColorSettings.SellColor);","python":"api.Chart.ColorSettings.SellColor = Color.Crimson\napi.Print(f\"Chart sell color: {api.Chart.ColorSettings.SellColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/SellColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/SellColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.TickVolumeColor","kind":"property","name":"TickVolumeColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color TickVolumeColor {get; set;}","python":"chartColorSettings.TickVolumeColor: Color","summary":"Gets or sets the color of the tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.TickVolumeColor = Color.SteelBlue;\nPrint(\"Chart tick volume color: {0}\", Chart.ColorSettings.TickVolumeColor);","python":"api.Chart.ColorSettings.TickVolumeColor = Color.SteelBlue\napi.Print(f\"Chart tick volume color: {api.Chart.ColorSettings.TickVolumeColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/TickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/TickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartColorSettings.WinningDealColor","kind":"property","name":"WinningDealColor","type":"T:cAlgo.API.ChartColorSettings","namespace":"cAlgo.API","group":"Chart","csharp":"Color WinningDealColor {get; set;}","python":"chartColorSettings.WinningDealColor: Color","summary":"Gets or sets the color of the winning deal.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.ColorSettings.WinningDealColor = Color.Green;\nPrint(\"Chart winning deal color: {0}\", Chart.ColorSettings.WinningDealColor);","python":"api.Chart.ColorSettings.WinningDealColor = Color.Green\napi.Print(f\"Chart winning deal color: {api.Chart.ColorSettings.WinningDealColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/WinningDealColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartColorSettings/WinningDealColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartContainer","kind":"interface","name":"ChartContainer","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartContainer","python":"ChartContainer","summary":"Represents a chart frames container.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        // Adding new chart frame to main chart container\n        var chartFrame = ChartManager.AddChartFrame(Symbols.First(), TimeFrame.Daily);\n\n        // Detaching chart frame from main container to\n        // create a new detached chart container\n        chartFrame.Detach();\n\n        // Getting detached chart container\n        var detachedChartContainer = chartFrame.ChartContainer;\n\n        // Setting container window width and height\n        detachedChartContainer.DetachedWindow.Width = 500;\n        detachedChartContainer.DetachedWindow.Height = 300;\n\n        // Adding another chart frame to detached container\n        ChartManager.AddChartFrame(Symbols.Last(), TimeFrame.Hour, detachedChartContainer);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        # Adding new chart frame to main chart container\n        chartFrame = api.ChartManager.AddChartFrame(api.Symbols[0], TimeFrame.Daily)\n\n        # Detaching chart frame from main container to\n        # create a new detached chart container\n        chartFrame.Detach()\n\n        # Getting detached chart container\n        detachedChartContainer = chartFrame.ChartContainer\n\n        # Setting container window width and height\n        detachedChartContainer.DetachedWindow.Width = 500\n        detachedChartContainer.DetachedWindow.Height = 300\n\n        # Adding another chart frame to detached container\n        api.ChartManager.AddChartFrame(api.Symbols[1], TimeFrame.Hour, detachedChartContainer)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartContainer.Close","kind":"method","name":"Close","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"bool Close()","python":"chartContainer.Close() -> bool","summary":"Closes current chart container window.","remarks":"You can't close main chart container.","parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Detach();\nPrint(\"Detached container closed: {0}\", chartFrame.ChartContainer.Close());","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Detach()\napi.Print(f\"Detached container closed: {chartFrame.ChartContainer.Close()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"int Count {get;}","python":"chartContainer.Count: int","summary":"Returns number of frames existing in chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nPrint(\"Frames in main container: {0}\", mainContainer.Count);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\napi.Print(f\"Frames in main container: {mainContainer.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.DetachedWindow","kind":"property","name":"DetachedWindow","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"DetachedWindow DetachedWindow {get;}","python":"chartContainer.DetachedWindow: DetachedWindow","summary":"Returns detached window properties of chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"DetachedWindow","pythonType":"DetachedWindow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Detach();\nchartFrame.ChartContainer.DetachedWindow.Width = 800;\nchartFrame.ChartContainer.DetachedWindow.Height = 500;","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Detach()\nchartFrame.ChartContainer.DetachedWindow.Width = 800\nchartFrame.ChartContainer.DetachedWindow.Height = 500"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/DetachedWindow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/DetachedWindow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.Id","kind":"property","name":"Id","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"string Id {get;}","python":"chartContainer.Id: str","summary":"Returns container Id.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nPrint(\"Main chart container ID: {0}\", mainContainer.Id);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\napi.Print(f\"Main chart container ID: {mainContainer.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"Frame Item {get;}","python":"chartContainer[index: int] -> Frame","summary":"Returns a frame by it is index inside chart container.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Frame index"}],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nif (mainContainer.Count > 0)\n    Print(\"First frame ID: {0}\", mainContainer[0].Id);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\nif mainContainer.Count > 0:\n    api.Print(f\"First frame ID: {mainContainer[0].Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.Mode","kind":"property","name":"Mode","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"ChartMode Mode {get; set;}","python":"chartContainer.Mode: ChartMode","summary":"Get / set chart mode of chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartMode","pythonType":"ChartMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nmainContainer.Mode = ChartMode.Multi;\nPrint(\"Main container mode: {0}\", mainContainer.Mode);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\nmainContainer.Mode = ChartMode.Multi\napi.Print(f\"Main container mode: {mainContainer.Mode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Mode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/Mode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainer.SelectedFrame","kind":"property","name":"SelectedFrame","type":"T:cAlgo.API.ChartContainer","namespace":"cAlgo.API","group":"Chart","csharp":"Frame SelectedFrame {get; set;}","python":"chartContainer.SelectedFrame: Frame","summary":"Gets or sets the selected frame in the chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nvar chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nmainContainer.SelectedFrame = chartFrame;\nPrint(\"Selected frame: {0}\", mainContainer.SelectedFrame?.Id);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\nchartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nmainContainer.SelectedFrame = chartFrame\napi.Print(f\"Selected frame: {mainContainer.SelectedFrame.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/SelectedFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainer/SelectedFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartContainers","kind":"interface","name":"ChartContainers","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartContainers","python":"ChartContainers","summary":"Represents the list of all the chart containers.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        Print($\"Current chart containers #: {ChartManager.ChartContainers.Count}\");\n        Print($\"Main Chart Container is: {ChartManager.ChartContainers.MainChartContainer}, number of frames: {ChartManager.ChartContainers.MainChartContainer.Count}\");\n\n        foreach (var chartContainer in ChartManager.ChartContainers)\n        {\n            Print($\"Chart container Id: {chartContainer.Id}, Frames #: {chartContainer.Count}, Is Main: {chartContainer == ChartManager.ChartContainers.MainChartContainer}\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        print(f\"Current chart containers #: {api.ChartManager.ChartContainers.Count}\")\n        print(f\"Main Chart Container is: {api.ChartManager.ChartContainers.MainChartContainer}, number of frames: {api.ChartManager.ChartContainers.MainChartContainer.Count}\")\n\n        for chartContainer in api.ChartManager.ChartContainers:\n            print(f\"Chart container Id: {chartContainer.Id}, Frames #: {chartContainer.Count}, Is Main: {chartContainer == api.ChartManager.ChartContainers.MainChartContainer}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartContainers.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.ChartContainers","namespace":"cAlgo.API","group":"Chart","csharp":"ChartContainer Get(string id)","python":"chartContainers.Get(id: str) -> ChartContainer | None","summary":"Returns a chart container by it is ID.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"Chart container ID"}],"returns":{"csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"Returns the matching chart container or null.","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainerId = ChartManager.ChartContainers.MainChartContainer.Id;\nvar chartContainer = ChartManager.ChartContainers.Get(mainContainerId);\nif (chartContainer != null)\n    Print(\"Found container {0} with {1} frames\", chartContainer.Id, chartContainer.Count);","python":"mainContainerId = api.ChartManager.ChartContainers.MainChartContainer.Id\nchartContainer = api.ChartManager.ChartContainers.Get(mainContainerId)\nif chartContainer is not None:\n    api.Print(f\"Found container {chartContainer.Id} with {chartContainer.Count} frames\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainers.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartContainers","namespace":"cAlgo.API","group":"Chart","csharp":"int Count {get;}","python":"chartContainers.Count: int","summary":"Returns number of all chart containers.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Chart containers: {0}\", ChartManager.ChartContainers.Count);","python":"api.Print(f\"Chart containers: {api.ChartManager.ChartContainers.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainers.MainChartContainer","kind":"property","name":"MainChartContainer","type":"T:cAlgo.API.ChartContainers","namespace":"cAlgo.API","group":"Chart","csharp":"ChartContainer MainChartContainer {get;}","python":"chartContainers.MainChartContainer: ChartContainer","summary":"Returns main chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nPrint(\"Main container has {0} frames\", mainContainer.Count);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\napi.Print(f\"Main container has {mainContainer.Count} frames\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/MainChartContainer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/MainChartContainer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartContainers.ContainersAdded","kind":"event","name":"ContainersAdded","type":"T:cAlgo.API.ChartContainers","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartContainersAddedEventArgs> ContainersAdded;","python":"chartContainers.ContainersAdded += handler  # handler(obj: ChartContainersAddedEventArgs)","summary":"Occurs when new containers are added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartContainersAddedEventArgs>","pythonType":"Callable[[ChartContainersAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersAdded += OnContainersAdded;\n}\n\nprivate void OnContainersAdded(ChartContainersAddedEventArgs args)\n{\n    foreach (var chartContainer in args.AddedChartContainers)\n        Print(\"Chart container added: {0}\", chartContainer.Id);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersAdded += self.on_containers_added\n\ndef on_containers_added(self, args):\n    for chartContainer in args.AddedChartContainers:\n        api.Print(f\"Chart container added: {chartContainer.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/ContainersAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/ContainersAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartContainers.ContainersRemoved","kind":"event","name":"ContainersRemoved","type":"T:cAlgo.API.ChartContainers","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartContainersRemovedEventArgs> ContainersRemoved;","python":"chartContainers.ContainersRemoved += handler  # handler(obj: ChartContainersRemovedEventArgs)","summary":"Occurs when containers are removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartContainersRemovedEventArgs>","pythonType":"Callable[[ChartContainersRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersRemoved += OnContainersRemoved;\n}\n\nprivate void OnContainersRemoved(ChartContainersRemovedEventArgs args)\n{\n    foreach (var chartContainer in args.RemovedChartContainers)\n        Print(\"Chart container removed: {0}\", chartContainer.Id);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersRemoved += self.on_containers_removed\n\ndef on_containers_removed(self, args):\n    for chartContainer in args.RemovedChartContainers:\n        api.Print(f\"Chart container removed: {chartContainer.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/ContainersRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/ContainersRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartContainersAddedEventArgs","kind":"class","name":"ChartContainersAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartContainersAddedEventArgs","python":"ChartContainersAddedEventArgs","summary":"Provides data for the containers added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersAdded += OnChartContainersAdded;\n}\n\nprivate void OnChartContainersAdded(ChartContainersAddedEventArgs args)\n{\n    Print(\"{0} chart container(s) added, total: {1}\", args.AddedChartContainers.Length, ChartManager.ChartContainers.Count);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersAdded += self.on_chart_containers_added\n\ndef on_chart_containers_added(self, args):\n    api.Print(f\"{len(args.AddedChartContainers)} chart container(s) added, total: {api.ChartManager.ChartContainers.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainersAddedEventArgs.AddedChartContainers","kind":"property","name":"AddedChartContainers","type":"T:cAlgo.API.ChartContainersAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartContainer[] AddedChartContainers {get;}","python":"chartContainersAddedEventArgs.AddedChartContainers: list[ChartContainer]","summary":"Returns the added containers.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainer[]","pythonType":"list[ChartContainer]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersAdded += OnChartContainersAdded;\n}\n\nprivate void OnChartContainersAdded(ChartContainersAddedEventArgs args)\n{\n    foreach (var container in args.AddedChartContainers)\n        Print(\"Container {0} added, mode: {1}, frames: {2}\", container.Id, container.Mode, container.Count);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersAdded += self.on_chart_containers_added\n\ndef on_chart_containers_added(self, args):\n    for container in args.AddedChartContainers:\n        api.Print(f\"Container {container.Id} added, mode: {container.Mode}, frames: {container.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersAddedEventArgs/AddedChartContainers/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersAddedEventArgs/AddedChartContainers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartContainersRemovedEventArgs","kind":"class","name":"ChartContainersRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartContainersRemovedEventArgs","python":"ChartContainersRemovedEventArgs","summary":"Provides data for the containers removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersRemoved += OnChartContainersRemoved;\n}\n\nprivate void OnChartContainersRemoved(ChartContainersRemovedEventArgs args)\n{\n    Print(\"{0} chart container(s) removed, remaining: {1}\", args.RemovedChartContainers.Length, ChartManager.ChartContainers.Count);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersRemoved += self.on_chart_containers_removed\n\ndef on_chart_containers_removed(self, args):\n    api.Print(f\"{len(args.RemovedChartContainers)} chart container(s) removed, remaining: {api.ChartManager.ChartContainers.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartContainersRemovedEventArgs.RemovedChartContainers","kind":"property","name":"RemovedChartContainers","type":"T:cAlgo.API.ChartContainersRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartContainer[] RemovedChartContainers {get;}","python":"chartContainersRemovedEventArgs.RemovedChartContainers: list[ChartContainer]","summary":"Returns the removed containers.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainer[]","pythonType":"list[ChartContainer]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ChartContainers.ContainersRemoved += OnChartContainersRemoved;\n}\n\nprivate void OnChartContainersRemoved(ChartContainersRemovedEventArgs args)\n{\n    foreach (var container in args.RemovedChartContainers)\n        Print(\"Container {0} removed\", container.Id);\n}","python":"def on_start(self):\n    api.ChartManager.ChartContainers.ContainersRemoved += self.on_chart_containers_removed\n\ndef on_chart_containers_removed(self, args):\n    for container in args.RemovedChartContainers:\n        api.Print(f\"Container {container.Id} removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersRemovedEventArgs/RemovedChartContainers/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartContainersRemovedEventArgs/RemovedChartContainers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartDisplaySettings","kind":"interface","name":"ChartDisplaySettings","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartDisplaySettings","python":"ChartDisplaySettings","summary":"Represents the chart display settings.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // You can use this sample indicator to change some of the chart display settings via chart controls\n    public partial class ChartDisplaySettingsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Left,\n                VerticalAlignment = VerticalAlignment.Bottom,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n                Margin = 5,\n                Orientation = Orientation.Vertical\n            };\n\n            var askPriceLineCheckBox = new CheckBox\n            {\n                Text = \"Ask Price Line\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.AskPriceLine\n            };\n\n            askPriceLineCheckBox.Click += args => Chart.DisplaySettings.AskPriceLine = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(askPriceLineCheckBox);\n\n            var bidPriceLineCheckBox = new CheckBox\n            {\n                Text = \"Bid Price Line\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.BidPriceLine\n            };\n\n            bidPriceLineCheckBox.Click += args => Chart.DisplaySettings.BidPriceLine = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(bidPriceLineCheckBox);\n\n            var chartScaleCheckBox = new CheckBox\n            {\n                Text = \"Chart Scale\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.ChartScale\n            };\n\n            chartScaleCheckBox.Click += args => Chart.DisplaySettings.ChartScale = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(chartScaleCheckBox);\n\n            var dealMapCheckBox = new CheckBox\n            {\n                Text = \"Deal Map\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.DealMap\n            };\n\n            dealMapCheckBox.Click += args => Chart.DisplaySettings.DealMap = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(dealMapCheckBox);\n\n            var gridCheckBox = new CheckBox\n            {\n                Text = \"Grid\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.Grid\n            };\n\n            gridCheckBox.Click += args => Chart.DisplaySettings.Grid = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(gridCheckBox);\n\n            var volumeCheckBox = new CheckBox\n            {\n                Text = \"Volume\",\n                Margin = 5,\n                IsChecked = Chart.DisplaySettings.TickVolume\n            };\n\n            volumeCheckBox.Click += args => Chart.DisplaySettings.TickVolume = args.CheckBox.IsChecked.Value;\n\n            stackPanel.AddChild(volumeCheckBox);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_ask_price_line_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.AskPriceLine = args.CheckBox.IsChecked\n\n    def on_bid_price_line_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.BidPriceLine = args.CheckBox.IsChecked\n\n    def on_chart_scale_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.ChartScale = args.CheckBox.IsChecked\n\n    def on_deal_map_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.DealMap = args.CheckBox.IsChecked\n\n    def on_grid_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.Grid = args.CheckBox.IsChecked\n\n    def on_volume_check_box_clicked(self, args):\n        api.Chart.DisplaySettings.TickVolume = args.CheckBox.IsChecked\n\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Left\n        stackPanel.VerticalAlignment = VerticalAlignment.Bottom\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n        stackPanel.Margin = Thickness(5)\n        stackPanel.Orientation = Orientation.Vertical\n\n        askPriceLineCheckBox = CheckBox()\n        askPriceLineCheckBox.Text = \"Ask Price Line\"\n        askPriceLineCheckBox.Margin = Thickness(5)\n        askPriceLineCheckBox.IsChecked = api.Chart.DisplaySettings.AskPriceLine\n        askPriceLineCheckBox.Click += self.on_ask_price_line_check_box_clicked\n\n        stackPanel.AddChild(askPriceLineCheckBox)\n\n        bidPriceLineCheckBox = CheckBox()\n        bidPriceLineCheckBox.Text = \"Bid Price Line\"\n        bidPriceLineCheckBox.Margin = Thickness(5)\n        bidPriceLineCheckBox.IsChecked = api.Chart.DisplaySettings.BidPriceLine\n        bidPriceLineCheckBox.Click += self.on_bid_price_line_check_box_clicked\n\n        stackPanel.AddChild(bidPriceLineCheckBox)\n\n        chartScaleCheckBox = CheckBox()\n        chartScaleCheckBox.Text = \"Chart Scale\"\n        chartScaleCheckBox.Margin = Thickness(5)\n        chartScaleCheckBox.IsChecked = api.Chart.DisplaySettings.ChartScale\n        chartScaleCheckBox.Click += self.on_chart_scale_check_box_clicked\n\n        stackPanel.AddChild(chartScaleCheckBox)\n\n        dealMapCheckBox = CheckBox()\n        dealMapCheckBox.Text = \"Deal Map\"\n        dealMapCheckBox.Margin = Thickness(5)\n        dealMapCheckBox.IsChecked = api.Chart.DisplaySettings.DealMap\n        dealMapCheckBox.Click += self.on_deal_map_check_box_clicked\n\n        stackPanel.AddChild(dealMapCheckBox)\n\n        gridCheckBox = CheckBox()\n        gridCheckBox.Text = \"Grid\"\n        gridCheckBox.Margin = Thickness(5)\n        gridCheckBox.IsChecked = api.Chart.DisplaySettings.Grid\n        gridCheckBox.Click += self.on_grid_check_box_clicked\n\n        stackPanel.AddChild(gridCheckBox)\n\n        volumeCheckBox = CheckBox()\n        volumeCheckBox.Text = \"Volume\"\n        volumeCheckBox.Margin = Thickness(5)\n        volumeCheckBox.IsChecked = api.Chart.DisplaySettings.TickVolume\n        volumeCheckBox.Click += self.on_volume_check_box_clicked\n\n        stackPanel.AddChild(volumeCheckBox)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.AddRobotButton","kind":"property","name":"AddRobotButton","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool AddRobotButton {get; set;}","python":"chartDisplaySettings.AddRobotButton: bool","summary":"Defines if the Add cBot button is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.AddRobotButton = false;\nPrint(\"Chart shows the Add cBot button: {0}\", Chart.DisplaySettings.AddRobotButton);","python":"api.Chart.DisplaySettings.AddRobotButton = False\napi.Print(f\"Chart shows the Add cBot button: {api.Chart.DisplaySettings.AddRobotButton}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/AddRobotButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/AddRobotButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.AskPriceLine","kind":"property","name":"AskPriceLine","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool AskPriceLine {get; set;}","python":"chartDisplaySettings.AskPriceLine: bool","summary":"Defines if the Ask Price Line is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.AskPriceLine = true;\nPrint(\"Chart shows the ask line: {0}\", Chart.DisplaySettings.AskPriceLine);","python":"api.Chart.DisplaySettings.AskPriceLine = True\napi.Print(f\"Chart shows the ask line: {api.Chart.DisplaySettings.AskPriceLine}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/AskPriceLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/AskPriceLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool Bars {get; set;}","python":"chartDisplaySettings.Bars: bool","summary":"Defines if the Bars is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Bars = true;\nPrint(\"Chart shows bars: {0}\", Chart.DisplaySettings.Bars);","python":"api.Chart.DisplaySettings.Bars = True\napi.Print(f\"Chart shows bars: {api.Chart.DisplaySettings.Bars}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.BidPriceLine","kind":"property","name":"BidPriceLine","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool BidPriceLine {get; set;}","python":"chartDisplaySettings.BidPriceLine: bool","summary":"Defines if the Bid Price Line is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.BidPriceLine = true;\nPrint(\"Chart shows the bid line: {0}\", Chart.DisplaySettings.BidPriceLine);","python":"api.Chart.DisplaySettings.BidPriceLine = True\napi.Print(f\"Chart shows the bid line: {api.Chart.DisplaySettings.BidPriceLine}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/BidPriceLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/BidPriceLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.ChartScale","kind":"property","name":"ChartScale","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool ChartScale {get; set;}","python":"chartDisplaySettings.ChartScale: bool","summary":"Defines if the Chart Scale is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.ChartScale = true;\nPrint(\"Chart shows the chart scale: {0}\", Chart.DisplaySettings.ChartScale);","python":"api.Chart.DisplaySettings.ChartScale = True\napi.Print(f\"Chart shows the chart scale: {api.Chart.DisplaySettings.ChartScale}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/ChartScale/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/ChartScale/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.DealMap","kind":"property","name":"DealMap","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool DealMap {get; set;}","python":"chartDisplaySettings.DealMap: bool","summary":"Defines if the Deal Map is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.DealMap = true;\nPrint(\"Chart shows the deal map: {0}\", Chart.DisplaySettings.DealMap);","python":"api.Chart.DisplaySettings.DealMap = True\napi.Print(f\"Chart shows the deal map: {api.Chart.DisplaySettings.DealMap}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/DealMap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/DealMap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.Grid","kind":"property","name":"Grid","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool Grid {get; set;}","python":"chartDisplaySettings.Grid: bool","summary":"Defines if the Grid is displayed on the chart background.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Grid = false;\nPrint(\"Chart shows the grid: {0}\", Chart.DisplaySettings.Grid);","python":"api.Chart.DisplaySettings.Grid = False\napi.Print(f\"Chart shows the grid: {api.Chart.DisplaySettings.Grid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Grid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Grid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.IndicatorTitles","kind":"property","name":"IndicatorTitles","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool IndicatorTitles {get; set;}","python":"chartDisplaySettings.IndicatorTitles: bool","summary":"Defines if the Indicator Titles are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.IndicatorTitles = true;\nPrint(\"Chart shows indicator titles: {0}\", Chart.DisplaySettings.IndicatorTitles);","python":"api.Chart.DisplaySettings.IndicatorTitles = True\napi.Print(f\"Chart shows indicator titles: {api.Chart.DisplaySettings.IndicatorTitles}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/IndicatorTitles/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/IndicatorTitles/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.MarketSentiment","kind":"property","name":"MarketSentiment","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool MarketSentiment {get; set;}","python":"chartDisplaySettings.MarketSentiment: bool","summary":"Defines if the Market Sentiment is visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.MarketSentiment = true;\nPrint(\"Chart shows market sentiment: {0}\", Chart.DisplaySettings.MarketSentiment);","python":"api.Chart.DisplaySettings.MarketSentiment = True\napi.Print(f\"Chart shows market sentiment: {api.Chart.DisplaySettings.MarketSentiment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/MarketSentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/MarketSentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.Orders","kind":"property","name":"Orders","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool Orders {get; set;}","python":"chartDisplaySettings.Orders: bool","summary":"Defines if the Orders are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Orders = true;\nPrint(\"Chart shows orders: {0}\", Chart.DisplaySettings.Orders);","python":"api.Chart.DisplaySettings.Orders = True\napi.Print(f\"Chart shows orders: {api.Chart.DisplaySettings.Orders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Orders/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Orders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.PeriodSeparators","kind":"property","name":"PeriodSeparators","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool PeriodSeparators {get; set;}","python":"chartDisplaySettings.PeriodSeparators: bool","summary":"Defines if the Period Separators are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.PeriodSeparators = true;\nPrint(\"Chart shows period separators: {0}\", Chart.DisplaySettings.PeriodSeparators);","python":"api.Chart.DisplaySettings.PeriodSeparators = True\napi.Print(f\"Chart shows period separators: {api.Chart.DisplaySettings.PeriodSeparators}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PeriodSeparators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PeriodSeparators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool Positions {get; set;}","python":"chartDisplaySettings.Positions: bool","summary":"Defines if the Positions are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Positions = true;\nPrint(\"Chart shows positions: {0}\", Chart.DisplaySettings.Positions);","python":"api.Chart.DisplaySettings.Positions = True\napi.Print(f\"Chart shows positions: {api.Chart.DisplaySettings.Positions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.PriceAlerts","kind":"property","name":"PriceAlerts","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool PriceAlerts {get; set;}","python":"chartDisplaySettings.PriceAlerts: bool","summary":"Defines if the Price Alerts are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.PriceAlerts = true;\nPrint(\"Chart shows price alerts: {0}\", Chart.DisplaySettings.PriceAlerts);","python":"api.Chart.DisplaySettings.PriceAlerts = True\napi.Print(f\"Chart shows price alerts: {api.Chart.DisplaySettings.PriceAlerts}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PriceAlerts/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PriceAlerts/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.PriceAxisOverlayButtons","kind":"property","name":"PriceAxisOverlayButtons","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool PriceAxisOverlayButtons {get; set;}","python":"chartDisplaySettings.PriceAxisOverlayButtons: bool","summary":"Defines if the price axis overlays buttons are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.PriceAxisOverlayButtons = false;\nPrint(\"Chart shows price axis overlay buttons: {0}\", Chart.DisplaySettings.PriceAxisOverlayButtons);","python":"api.Chart.DisplaySettings.PriceAxisOverlayButtons = False\napi.Print(f\"Chart shows price axis overlay buttons: {api.Chart.DisplaySettings.PriceAxisOverlayButtons}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PriceAxisOverlayButtons/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/PriceAxisOverlayButtons/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.QuickTradeButtons","kind":"property","name":"QuickTradeButtons","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool QuickTradeButtons {get; set;}","python":"chartDisplaySettings.QuickTradeButtons: bool","summary":"Defines if the QuickTrade buttons are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.QuickTradeButtons = false;\nPrint(\"Chart shows QuickTrade buttons: {0}\", Chart.DisplaySettings.QuickTradeButtons);","python":"api.Chart.DisplaySettings.QuickTradeButtons = False\napi.Print(f\"Chart shows QuickTrade buttons: {api.Chart.DisplaySettings.QuickTradeButtons}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/QuickTradeButtons/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/QuickTradeButtons/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.Targets","kind":"property","name":"Targets","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool Targets {get; set;}","python":"chartDisplaySettings.Targets: bool","summary":"Defines if the Target is visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.Targets = true;\nPrint(\"Chart shows targets: {0}\", Chart.DisplaySettings.Targets);","python":"api.Chart.DisplaySettings.Targets = True\napi.Print(f\"Chart shows targets: {api.Chart.DisplaySettings.Targets}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Targets/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/Targets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartDisplaySettings.TickVolume","kind":"property","name":"TickVolume","type":"T:cAlgo.API.ChartDisplaySettings","namespace":"cAlgo.API","group":"Chart","csharp":"bool TickVolume {get; set;}","python":"chartDisplaySettings.TickVolume: bool","summary":"Defines if the Tick Volume is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DisplaySettings.TickVolume = false;\nPrint(\"Chart shows tick volume: {0}\", Chart.DisplaySettings.TickVolume);","python":"api.Chart.DisplaySettings.TickVolume = False\napi.Print(f\"Chart shows tick volume: {api.Chart.DisplaySettings.TickVolume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartDisplaySettings/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartDisplaySettingsEventArgs","kind":"class","name":"ChartDisplaySettingsEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartDisplaySettingsEventArgs","python":"ChartDisplaySettingsEventArgs","summary":"Provides data for the chart display settings event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartDisplaySettingsEventArgs\n    public partial class ChartDisplaySettingsEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DisplaySettingsChanged += Chart_DisplaySettingsChanged;\n        }\n\n        private void Chart_DisplaySettingsChanged(ChartDisplaySettingsEventArgs obj)\n        {\n            Print(\"Chart {0} {1} Display settings changed\", obj.Chart.SymbolName, obj.Chart.TimeFrame);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.DisplaySettingsChanged += self.on_chart_display_settings_changed\n\n    def on_chart_display_settings_changed(self, args):\n        print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} Display settings changed\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDisplaySettingsEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDisplaySettingsEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.DisplaySettingsChanged)."}]}
{"id":"P:cAlgo.API.ChartDisplaySettingsEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartDisplaySettingsEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartDisplaySettingsEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.DisplaySettingsChanged += OnChartDisplaySettingsChanged;\n}\n\nprivate void OnChartDisplaySettingsChanged(ChartDisplaySettingsEventArgs args)\n{\n    Print(\"Display settings changed on {0} {1}, chart type: {2}\", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.ChartType);\n}","python":"def on_start(self):\n    api.Chart.DisplaySettingsChanged += self.on_chart_display_settings_changed\n\ndef on_chart_display_settings_changed(self, args):\n    api.Print(f\"Display settings changed on {args.Chart.SymbolName} {args.Chart.TimeFrame}, chart type: {args.Chart.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDisplaySettingsEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDisplaySettingsEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.DisplaySettingsChanged)."}]}
{"id":"T:cAlgo.API.ChartDragEventArgs","kind":"class","name":"ChartDragEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartDragEventArgs : ChartMouseEventArgs","python":"ChartDragEventArgs","summary":"Provides data for the chart dragging event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartDragEventArgs\n    // ChartDragEventArgs derives from ChartMouseEventArgs\n    public partial class ChartDragEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DragStart += Chart_DragStart;\n            Chart.DragEnd += Chart_DragEnd;\n        }\n\n        private void Chart_DragEnd(ChartDragEventArgs obj)\n        {\n            Print(\"Chart {0} {1} Drag Ended | Mouse Location: ({2}, {3})\", obj.Chart.SymbolName, obj.Chart.TimeFrame, obj.MouseX, obj.MouseY);\n        }\n\n        private void Chart_DragStart(ChartDragEventArgs obj)\n        {\n            Print(\"Chart {0} {1} Drag Started | Mouse Location: ({2}, {3})\", obj.Chart.SymbolName, obj.Chart.TimeFrame, obj.MouseX, obj.MouseY);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.DragStart += self.on_chart_drag_start\n        api.Chart.DragEnd += self.on_chart_drag_end\n\n    def on_chart_drag_start(self, args):\n        print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} Drag Started | Mouse Location: ({args.MouseX}, {args.MouseY})\")\n\n    def on_chart_drag_end(self, args):\n        print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} Drag Ended | Mouse Location: ({args.MouseX}, {args.MouseY})\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDragEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDragEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.Drag, ChartArea.DragEnd, ChartArea.DragStart)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.Drag, ChartArea.DragEnd, ChartArea.DragStart)."}]}
{"id":"T:cAlgo.API.ChartDraggable","kind":"interface","name":"ChartDraggable","type":null,"namespace":"cAlgo.API","group":"Draggables","csharp":"public interface ChartDraggable","python":"ChartDraggable","summary":"Represents a draggable box that can host a control and shown over a chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n   private const string Label = \"Draggable\";\n\n   protected override void OnStart()\n   {\n       var openPositionButton = new Button {Text = \"Open Position\"};\n\n       openPositionButton.Click += _ => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, Label);\n\n       var closePositionsButton = new Button {Text = \"Close Position\"};\n\n       closePositionsButton.Click += _ => Positions.Find(Label)?.Close();\n\n       var panel = new StackPanel {Orientation = Orientation.Vertical, BackgroundColor = Color.Red};\n\n       panel.AddChild(openPositionButton);\n       panel.AddChild(closePositionsButton);\n\n       var draggable = Chart.Draggables.Add();\n\n       draggable.ShowGrip = true;\n       draggable.Child = panel;\n\n       draggable.LocationChanged += args => Print($\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\");\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    Label = \"Test\"\n    def on_start(self):\n        openPositionButton = Button()\n        openPositionButton.Text = \"Open Position\"\n        openPositionButton.Click += lambda _ : api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, self.Label)\n\n        closePositionsButton = Button()\n        closePositionsButton.Text = \"Close Position\"\n        closePositionsButton.Click += lambda _ : api.Positions.Find(self.Label).Close()\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.BackgroundColor = Color.Red\n\n        panel.AddChild(openPositionButton)\n        panel.AddChild(closePositionsButton)\n\n        draggable = api.Chart.Draggables.Add()\n        draggable.ShowGrip = True\n        draggable.Child = panel\n        draggable.LocationChanged += lambda args : print(f\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.Child","kind":"property","name":"Child","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"ControlBase Child {get; set;}","python":"chartDraggable.Child: ControlBase","summary":"Get / set the content control inside the draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", BackgroundColor = Color.Green };\nbutton.Click += _ => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);\nvar draggable = Chart.Draggables.Add();\ndraggable.Child = button;\nPrint(\"Draggable child: {0}\", draggable.Child);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.BackgroundColor = Color.Green\nbutton.Click += lambda _: api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\ndraggable = api.Chart.Draggables.Add()\ndraggable.Child = button\napi.Print(f\"Draggable child: {draggable.Child}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.Id","kind":"property","name":"Id","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"string Id {get;}","python":"chartDraggable.Id: str","summary":"Get unique ID of the Draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\nPrint(\"Draggable id: {0}\", draggable.Id);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\napi.Print(f\"Draggable id: {draggable.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"bool IsVisible {get; set;}","python":"chartDraggable.IsVisible: bool","summary":"Get / set visibility of draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\ndraggable.IsVisible = Positions.Count > 0;\nPrint(\"Draggable visible: {0}\", draggable.IsVisible);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.IsVisible = api.Positions.Count > 0\napi.Print(f\"Draggable visible: {draggable.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.ShowGrip","kind":"property","name":"ShowGrip","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"bool ShowGrip {get; set;}","python":"chartDraggable.ShowGrip: bool","summary":"Get / set move grip visibility (default: true).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\ndraggable.ShowGrip = false;\nPrint(\"Draggable grip shown: {0}\", draggable.ShowGrip);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.ShowGrip = False\napi.Print(f\"Draggable grip shown: {draggable.ShowGrip}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/ShowGrip/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/ShowGrip/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.X","kind":"property","name":"X","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"double X {get; set;}","python":"chartDraggable.X: float","summary":"Get / set X coordinate (default: 0).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\ndraggable.X = 100;\nPrint(\"Draggable X: {0}\", draggable.X);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.X = 100\napi.Print(f\"Draggable X: {draggable.X}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/X/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/X/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"P:cAlgo.API.ChartDraggable.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"double Y {get; set;}","python":"chartDraggable.Y: float","summary":"Get / set Y coordinate (default: 0).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\ndraggable.Y = 50;\nPrint(\"Draggable Y: {0}\", draggable.Y);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ndraggable.Child = textBlock\ndraggable.Y = 50\napi.Print(f\"Draggable Y: {draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"E:cAlgo.API.ChartDraggable.LocationChanged","kind":"event","name":"LocationChanged","type":"T:cAlgo.API.ChartDraggable","namespace":"cAlgo.API","group":"Draggables","csharp":"event Action<ChartDraggableLocationChangedEventArgs> LocationChanged;","python":"chartDraggable.LocationChanged += handler  # handler(obj: ChartDraggableLocationChangedEventArgs)","summary":"Occurs when the draggable's location is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartDraggableLocationChangedEventArgs>","pythonType":"Callable[[ChartDraggableLocationChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Chart.Draggables.Add();\n    draggable.Child = new TextBlock { Text = SymbolName, BackgroundColor = Color.Black };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ChartDraggableLocationChangedEventArgs args)\n{\n    Print(\"Draggable moved to {0}, {1}\", args.Draggable.X, args.Draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Chart.Draggables.Add()\n    textBlock = TextBlock()\n    textBlock.Text = api.SymbolName\n    draggable.Child = textBlock\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    api.Print(f\"Draggable moved to {args.Draggable.X}, {args.Draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/LocationChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggable/LocationChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."},{"name":"Cloud","support":"None","behaviour":"Never displayed: starts at X=0, Y=0; property changes are kept locally only and LocationChanged never fires."}]}
{"id":"T:cAlgo.API.ChartDraggableLocationChangedEventArgs","kind":"class","name":"ChartDraggableLocationChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartDraggableLocationChangedEventArgs","python":"ChartDraggableLocationChangedEventArgs","summary":"Provides data for LocationChanged event of ChartDraggable.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Chart.Draggables.Add();\n    draggable.Child = new TextBlock { Text = \"Drag me\" };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ChartDraggableLocationChangedEventArgs args)\n{\n    Print(\"Draggable {0} moved to X: {1}, Y: {2}\", args.Draggable.Id, args.Draggable.X, args.Draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Chart.Draggables.Add()\n    text_block = TextBlock()\n    text_block.Text = \"Drag me\"\n    draggable.Child = text_block\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    api.Print(f\"Draggable {args.Draggable.Id} moved to X: {args.Draggable.X}, Y: {args.Draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDraggableLocationChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDraggableLocationChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartDraggable.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartDraggable.LocationChanged)."}]}
{"id":"P:cAlgo.API.ChartDraggableLocationChangedEventArgs.Draggable","kind":"property","name":"Draggable","type":"T:cAlgo.API.ChartDraggableLocationChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartDraggable Draggable {get;}","python":"chartDraggableLocationChangedEventArgs.Draggable: ChartDraggable","summary":"Gets the draggable.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartDraggable","pythonType":"ChartDraggable","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var draggable = Chart.Draggables.Add();\n    draggable.Child = new TextBlock { Text = \"Drag me\" };\n    draggable.LocationChanged += OnDraggableLocationChanged;\n}\n\nprivate void OnDraggableLocationChanged(ChartDraggableLocationChangedEventArgs args)\n{\n    var draggable = args.Draggable;\n    Print(\"Draggable {0} is visible: {1}, location: ({2}, {3})\", draggable.Id, draggable.IsVisible, draggable.X, draggable.Y);\n}","python":"def on_start(self):\n    draggable = api.Chart.Draggables.Add()\n    text_block = TextBlock()\n    text_block.Text = \"Drag me\"\n    draggable.Child = text_block\n    draggable.LocationChanged += self.on_draggable_location_changed\n\ndef on_draggable_location_changed(self, args):\n    draggable = args.Draggable\n    api.Print(f\"Draggable {draggable.Id} is visible: {draggable.IsVisible}, location: ({draggable.X}, {draggable.Y})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDraggableLocationChangedEventArgs/Draggable/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartDraggableLocationChangedEventArgs/Draggable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartDraggable.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartDraggable.LocationChanged)."}]}
{"id":"T:cAlgo.API.ChartDraggables","kind":"interface","name":"ChartDraggables","type":null,"namespace":"cAlgo.API","group":"Draggables","csharp":"public interface ChartDraggables","python":"ChartDraggables","summary":"Represents collection of a chart area draggables.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n   private const string Label = \"Draggable\";\n\n   protected override void OnStart()\n   {\n       var openPositionButton = new Button {Text = \"Open Position\"};\n\n       openPositionButton.Click += _ => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, Label);\n\n       var closePositionsButton = new Button {Text = \"Close Position\"};\n\n       closePositionsButton.Click += _ => Positions.Find(Label)?.Close();\n\n       var panel = new StackPanel {Orientation = Orientation.Vertical, BackgroundColor = Color.Red};\n\n       panel.AddChild(openPositionButton);\n       panel.AddChild(closePositionsButton);\n\n       var draggable = Chart.Draggables.Add();\n\n       draggable.ShowGrip = true;\n       draggable.Child = panel;\n\n       draggable.LocationChanged += args => Print($\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\");\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    Label = \"Test\"\n    def on_start(self):\n        openPositionButton = Button()\n        openPositionButton.Text = \"Open Position\"\n        openPositionButton.Click += lambda _ : api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, self.Label)\n\n        closePositionsButton = Button()\n        closePositionsButton.Text = \"Close Position\"\n        closePositionsButton.Click += lambda _ : api.Positions.Find(self.Label).Close()\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.BackgroundColor = Color.Red\n\n        panel.AddChild(openPositionButton)\n        panel.AddChild(closePositionsButton)\n\n        draggable = api.Chart.Draggables.Add()\n        draggable.ShowGrip = True\n        draggable.Child = panel\n        draggable.LocationChanged += lambda args : print(f\"Draggable Location Changed: {args.Draggable.X}, {args.Draggable.Y}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."}]}
{"id":"M:cAlgo.API.ChartDraggables.Add","kind":"method","name":"Add","type":"T:cAlgo.API.ChartDraggables","namespace":"cAlgo.API","group":"Draggables","csharp":"ChartDraggable Add()","python":"chartDraggables.Add() -> ChartDraggable","summary":"Adds a draggable to chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartDraggable","pythonType":"ChartDraggable","summary":"Draggable","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = \"Drag me\", BackgroundColor = Color.Black };\nPrint(\"Draggables on the chart: {0}\", Chart.Draggables.Count);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = \"Drag me\"\ndraggable.Child = textBlock\napi.Print(f\"Draggables on the chart: {api.Chart.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."}]}
{"id":"M:cAlgo.API.ChartDraggables.Remove(cAlgo.API.ChartDraggable)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartDraggables","namespace":"cAlgo.API","group":"Draggables","csharp":"void Remove(ChartDraggable draggable)","python":"chartDraggables.Remove(draggable: ChartDraggable) -> None","summary":"Removes a draggable from chart area.","remarks":null,"parameters":[{"name":"draggable","csharpType":"ChartDraggable","pythonType":"ChartDraggable","summary":"Draggable"}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var draggable = Chart.Draggables.Add();\ndraggable.Child = new TextBlock { Text = \"Temporary\", BackgroundColor = Color.Black };\nChart.Draggables.Remove(draggable);\nPrint(\"Draggables on the chart: {0}\", Chart.Draggables.Count);","python":"draggable = api.Chart.Draggables.Add()\ntextBlock = TextBlock()\ntextBlock.Text = \"Temporary\"\ndraggable.Child = textBlock\napi.Chart.Draggables.Remove(draggable)\napi.Print(f\"Draggables on the chart: {api.Chart.Draggables.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."}]}
{"id":"P:cAlgo.API.ChartDraggables.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartDraggables","namespace":"cAlgo.API","group":"Draggables","csharp":"int Count {get;}","python":"chartDraggables.Count: int","summary":"Gets count of draggables.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Draggables on the chart: {0}\", Chart.Draggables.Count);\nforeach (var draggable in Chart.Draggables)\n    Print(\"Draggable {0} at {1}, {2}\", draggable.Id, draggable.X, draggable.Y);","python":"api.Print(f\"Draggables on the chart: {api.Chart.Draggables.Count}\")\nfor draggable in api.Chart.Draggables:\n    api.Print(f\"Draggable {draggable.Id} at {draggable.X}, {draggable.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Draggables/ChartDraggables/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."},{"name":"Cloud","support":"None","behaviour":"Add returns a draggable that is never displayed; Remove sends nothing to any chart."}]}
{"id":"T:cAlgo.API.ChartDrawing","kind":"interface","name":"ChartDrawing","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartDrawing","python":"ChartDrawing","summary":"Represents the Drawing chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var drawing in Chart.FindAllObjects<ChartDrawing>())\n{\n    drawing.IsLocked = true;\n    Print(\"Pencil drawing: {0} | Locked: {1}\", drawing.Name, drawing.IsLocked);\n}","python":"for drawing in api.Chart.FindAllObjects(ChartObjectType.Drawing):\n    drawing.IsLocked = True\n    api.Print(f\"Pencil drawing: {drawing.Name} | Locked: {drawing.IsLocked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartDrawing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartDrawing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottCorrection","kind":"interface","name":"ChartElliottCorrection","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottCorrection","python":"ChartElliottCorrection","summary":"Represents the Elliott Correction Wave (A-B-C) chart object - a three-wave corrective pattern over four pivots (origin and A, B, C).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawElliottCorrection method to draw an Elliott Correction Wave\n    public partial class ElliottCorrectionSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var i = Chart.FirstVisibleBarIndex;\n            var s = (Chart.LastVisibleBarIndex - i) / 4;\n            var t = Bars.OpenTimes;\n            var c = Bars.ClosePrices;\n\n            Chart.DrawElliottCorrection(\"Correction\",\n                new ChartPoint(t[i], c[i]),\n                new ChartPoint(t[i + s], c[i + s]),\n                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n                Color.Blue);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        i = api.Chart.FirstVisibleBarIndex\n        s = (api.Chart.LastVisibleBarIndex - i) // 4\n        t = api.Bars.OpenTimes\n        c = api.Bars.ClosePrices\n        correction = api.Chart.DrawElliottCorrection(\"Correction\",\n            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]), ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n            Color.Blue)\n        correction.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottCorrection.Origin","kind":"property","name":"Origin","type":"T:cAlgo.API.ChartElliottCorrection","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Origin {get; set;}","python":"chartElliottCorrection.Origin: ChartPoint","summary":"Gets or sets the origin (wave 0) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.Origin = new ChartPoint(Bars.OpenTimes.Last(45), Bars.HighPrices.Last(45));\nPrint(\"Origin: {0} at {1}\", correction.Origin.Time, correction.Origin.Y);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.Origin = ChartPoint(api.Bars.OpenTimes.Last(45), api.Bars.HighPrices.Last(45))\napi.Print(f\"Origin: {correction.Origin.Time} at {correction.Origin.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/Origin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/Origin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottCorrection.WaveA","kind":"property","name":"WaveA","type":"T:cAlgo.API.ChartElliottCorrection","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveA {get; set;}","python":"chartElliottCorrection.WaveA: ChartPoint","summary":"Gets or sets the wave A anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.WaveA = new ChartPoint(Bars.OpenTimes.Last(32), Bars.LowPrices.Last(32));\nPrint(\"Wave A: {0} at {1}\", correction.WaveA.Time, correction.WaveA.Y);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.WaveA = ChartPoint(api.Bars.OpenTimes.Last(32), api.Bars.LowPrices.Last(32))\napi.Print(f\"Wave A: {correction.WaveA.Time} at {correction.WaveA.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveA/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveA/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottCorrection.WaveB","kind":"property","name":"WaveB","type":"T:cAlgo.API.ChartElliottCorrection","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveB {get; set;}","python":"chartElliottCorrection.WaveB: ChartPoint","summary":"Gets or sets the wave B anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.WaveB = new ChartPoint(Bars.OpenTimes.Last(22), Bars.HighPrices.Last(22));\nPrint(\"Wave B: {0} at {1}\", correction.WaveB.Time, correction.WaveB.Y);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.WaveB = ChartPoint(api.Bars.OpenTimes.Last(22), api.Bars.HighPrices.Last(22))\napi.Print(f\"Wave B: {correction.WaveB.Time} at {correction.WaveB.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveB/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveB/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottCorrection.WaveC","kind":"property","name":"WaveC","type":"T:cAlgo.API.ChartElliottCorrection","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveC {get; set;}","python":"chartElliottCorrection.WaveC: ChartPoint","summary":"Gets or sets the wave C anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.WaveC = new ChartPoint(Bars.OpenTimes.Last(5), Bars.LowPrices.Last(5));\nPrint(\"Wave C: {0} at {1}\", correction.WaveC.Time, correction.WaveC.Y);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.WaveC = ChartPoint(api.Bars.OpenTimes.Last(5), api.Bars.LowPrices.Last(5))\napi.Print(f\"Wave C: {correction.WaveC.Time} at {correction.WaveC.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottCorrection/WaveC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottDoubleCombo","kind":"interface","name":"ChartElliottDoubleCombo","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottDoubleCombo","python":"ChartElliottDoubleCombo","summary":"Represents the Elliott Double Combo Wave (W-X-Y) chart object - a complex correction over four pivots (origin and W, X, Y).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawElliottDoubleCombo method to draw an Elliott Double Combo Wave\n    public partial class ElliottDoubleComboSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var i = Chart.FirstVisibleBarIndex;\n            var s = (Chart.LastVisibleBarIndex - i) / 4;\n            var t = Bars.OpenTimes;\n            var c = Bars.ClosePrices;\n\n            Chart.DrawElliottDoubleCombo(\"DoubleCombo\",\n                new ChartPoint(t[i], c[i]),\n                new ChartPoint(t[i + s], c[i + s]),\n                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n                Color.Orange);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        i = api.Chart.FirstVisibleBarIndex\n        s = (api.Chart.LastVisibleBarIndex - i) // 4\n        t = api.Bars.OpenTimes\n        c = api.Bars.ClosePrices\n        doubleCombo = api.Chart.DrawElliottDoubleCombo(\"DoubleCombo\",\n            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]), ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n            Color.Orange)\n        doubleCombo.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottDoubleCombo.Origin","kind":"property","name":"Origin","type":"T:cAlgo.API.ChartElliottDoubleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Origin {get; set;}","python":"chartElliottDoubleCombo.Origin: ChartPoint","summary":"Gets or sets the origin (wave 0) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange);\ncombo.Origin = new ChartPoint(Bars.OpenTimes.Last(45), Bars.HighPrices.Last(45));\nPrint(\"Origin: {0} at {1}\", combo.Origin.Time, combo.Origin.Y);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange)\ncombo.Origin = ChartPoint(api.Bars.OpenTimes.Last(45), api.Bars.HighPrices.Last(45))\napi.Print(f\"Origin: {combo.Origin.Time} at {combo.Origin.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/Origin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/Origin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottDoubleCombo.WaveW","kind":"property","name":"WaveW","type":"T:cAlgo.API.ChartElliottDoubleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveW {get; set;}","python":"chartElliottDoubleCombo.WaveW: ChartPoint","summary":"Gets or sets the wave W anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange);\ncombo.WaveW = new ChartPoint(Bars.OpenTimes.Last(32), Bars.LowPrices.Last(32));\nPrint(\"Wave W: {0} at {1}\", combo.WaveW.Time, combo.WaveW.Y);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange)\ncombo.WaveW = ChartPoint(api.Bars.OpenTimes.Last(32), api.Bars.LowPrices.Last(32))\napi.Print(f\"Wave W: {combo.WaveW.Time} at {combo.WaveW.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveW/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveW/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottDoubleCombo.WaveX","kind":"property","name":"WaveX","type":"T:cAlgo.API.ChartElliottDoubleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveX {get; set;}","python":"chartElliottDoubleCombo.WaveX: ChartPoint","summary":"Gets or sets the wave X anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange);\ncombo.WaveX = new ChartPoint(Bars.OpenTimes.Last(22), Bars.HighPrices.Last(22));\nPrint(\"Wave X: {0} at {1}\", combo.WaveX.Time, combo.WaveX.Y);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange)\ncombo.WaveX = ChartPoint(api.Bars.OpenTimes.Last(22), api.Bars.HighPrices.Last(22))\napi.Print(f\"Wave X: {combo.WaveX.Time} at {combo.WaveX.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottDoubleCombo.WaveY","kind":"property","name":"WaveY","type":"T:cAlgo.API.ChartElliottDoubleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveY {get; set;}","python":"chartElliottDoubleCombo.WaveY: ChartPoint","summary":"Gets or sets the wave Y anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottDoubleCombo(\"doubleCombo\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Orange);\ncombo.WaveY = new ChartPoint(Bars.OpenTimes.Last(5), Bars.LowPrices.Last(5));\nPrint(\"Wave Y: {0} at {1}\", combo.WaveY.Time, combo.WaveY.Y);","python":"combo = api.Chart.DrawElliottDoubleCombo(\"doubleCombo\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Orange)\ncombo.WaveY = ChartPoint(api.Bars.OpenTimes.Last(5), api.Bars.LowPrices.Last(5))\napi.Print(f\"Wave Y: {combo.WaveY.Time} at {combo.WaveY.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottDoubleCombo/WaveY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottImpulse","kind":"interface","name":"ChartElliottImpulse","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottImpulse","python":"ChartElliottImpulse","summary":"Represents the Elliott Impulse Wave (1-2-3-4-5) chart object - a five-wave motive pattern over six pivots (origin and 1 to 5).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawElliottImpulse method to draw an Elliott Impulse Wave\n    public partial class ElliottImpulseSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var i = Chart.FirstVisibleBarIndex;\n            var s = (Chart.LastVisibleBarIndex - i) / 6;\n            var t = Bars.OpenTimes;\n            var c = Bars.ClosePrices;\n\n            Chart.DrawElliottImpulse(\"Impulse\",\n                new ChartPoint(t[i], c[i]),\n                new ChartPoint(t[i + s], c[i + s]),\n                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n                new ChartPoint(t[i + 4 * s], c[i + 4 * s]),\n                new ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n                Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        i = api.Chart.FirstVisibleBarIndex\n        s = (api.Chart.LastVisibleBarIndex - i) // 6\n        t = api.Bars.OpenTimes\n        c = api.Bars.ClosePrices\n        impulse = api.Chart.DrawElliottImpulse(\"Impulse\",\n            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n            ChartPoint(t[i + 3 * s], c[i + 3 * s]), ChartPoint(t[i + 4 * s], c[i + 4 * s]), ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n            Color.Red)\n        impulse.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Origin","kind":"property","name":"Origin","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Origin {get; set;}","python":"chartElliottImpulse.Origin: ChartPoint","summary":"Gets or sets the origin (wave 0) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Origin = new ChartPoint(Bars.OpenTimes.Last(65), Bars.LowPrices.Last(65));\nPrint(\"Origin: {0} at {1}\", impulse.Origin.Time, impulse.Origin.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Origin = ChartPoint(api.Bars.OpenTimes.Last(65), api.Bars.LowPrices.Last(65))\napi.Print(f\"Origin: {impulse.Origin.Time} at {impulse.Origin.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Origin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Origin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Wave1","kind":"property","name":"Wave1","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Wave1 {get; set;}","python":"chartElliottImpulse.Wave1: ChartPoint","summary":"Gets or sets the wave 1 anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Wave1 = new ChartPoint(Bars.OpenTimes.Last(52), Bars.HighPrices.Last(52));\nPrint(\"Wave 1: {0} at {1}\", impulse.Wave1.Time, impulse.Wave1.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Wave1 = ChartPoint(api.Bars.OpenTimes.Last(52), api.Bars.HighPrices.Last(52))\napi.Print(f\"Wave 1: {impulse.Wave1.Time} at {impulse.Wave1.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Wave2","kind":"property","name":"Wave2","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Wave2 {get; set;}","python":"chartElliottImpulse.Wave2: ChartPoint","summary":"Gets or sets the wave 2 anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Wave2 = new ChartPoint(Bars.OpenTimes.Last(42), Bars.LowPrices.Last(42));\nPrint(\"Wave 2: {0} at {1}\", impulse.Wave2.Time, impulse.Wave2.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Wave2 = ChartPoint(api.Bars.OpenTimes.Last(42), api.Bars.LowPrices.Last(42))\napi.Print(f\"Wave 2: {impulse.Wave2.Time} at {impulse.Wave2.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Wave3","kind":"property","name":"Wave3","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Wave3 {get; set;}","python":"chartElliottImpulse.Wave3: ChartPoint","summary":"Gets or sets the wave 3 anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Wave3 = new ChartPoint(Bars.OpenTimes.Last(32), Bars.HighPrices.Last(32));\nPrint(\"Wave 3: {0} at {1}\", impulse.Wave3.Time, impulse.Wave3.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Wave3 = ChartPoint(api.Bars.OpenTimes.Last(32), api.Bars.HighPrices.Last(32))\napi.Print(f\"Wave 3: {impulse.Wave3.Time} at {impulse.Wave3.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Wave4","kind":"property","name":"Wave4","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Wave4 {get; set;}","python":"chartElliottImpulse.Wave4: ChartPoint","summary":"Gets or sets the wave 4 anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Wave4 = new ChartPoint(Bars.OpenTimes.Last(22), Bars.LowPrices.Last(22));\nPrint(\"Wave 4: {0} at {1}\", impulse.Wave4.Time, impulse.Wave4.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Wave4 = ChartPoint(api.Bars.OpenTimes.Last(22), api.Bars.LowPrices.Last(22))\napi.Print(f\"Wave 4: {impulse.Wave4.Time} at {impulse.Wave4.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottImpulse.Wave5","kind":"property","name":"Wave5","type":"T:cAlgo.API.ChartElliottImpulse","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Wave5 {get; set;}","python":"chartElliottImpulse.Wave5: ChartPoint","summary":"Gets or sets the wave 5 anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Wave5 = new ChartPoint(Bars.OpenTimes.Last(5), Bars.HighPrices.Last(5));\nPrint(\"Wave 5: {0} at {1}\", impulse.Wave5.Time, impulse.Wave5.Y);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Wave5 = ChartPoint(api.Bars.OpenTimes.Last(5), api.Bars.HighPrices.Last(5))\napi.Print(f\"Wave 5: {impulse.Wave5.Time} at {impulse.Wave5.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottImpulse/Wave5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottTriangle","kind":"interface","name":"ChartElliottTriangle","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottTriangle","python":"ChartElliottTriangle","summary":"Represents the Elliott Triangle Wave (A-B-C-D-E) chart object - a five-leg triangle over six pivots (origin and A to E).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawElliottTriangle method to draw an Elliott Triangle Wave\n    public partial class ElliottTriangleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var i = Chart.FirstVisibleBarIndex;\n            var s = (Chart.LastVisibleBarIndex - i) / 6;\n            var t = Bars.OpenTimes;\n            var c = Bars.ClosePrices;\n\n            Chart.DrawElliottTriangle(\"Triangle\",\n                new ChartPoint(t[i], c[i]),\n                new ChartPoint(t[i + s], c[i + s]),\n                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n                new ChartPoint(t[i + 4 * s], c[i + 4 * s]),\n                new ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n                Color.Green);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        i = api.Chart.FirstVisibleBarIndex\n        s = (api.Chart.LastVisibleBarIndex - i) // 6\n        t = api.Bars.OpenTimes\n        c = api.Bars.ClosePrices\n        triangle = api.Chart.DrawElliottTriangle(\"Triangle\",\n            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n            ChartPoint(t[i + 3 * s], c[i + 3 * s]), ChartPoint(t[i + 4 * s], c[i + 4 * s]), ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n            Color.Green)\n        triangle.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.Origin","kind":"property","name":"Origin","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Origin {get; set;}","python":"chartElliottTriangle.Origin: ChartPoint","summary":"Gets or sets the origin (wave 0) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.Origin = new ChartPoint(Bars.OpenTimes.Last(65), Bars.HighPrices.Last(65));\nPrint(\"Origin: {0} at {1}\", triangle.Origin.Time, triangle.Origin.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.Origin = ChartPoint(api.Bars.OpenTimes.Last(65), api.Bars.HighPrices.Last(65))\napi.Print(f\"Origin: {triangle.Origin.Time} at {triangle.Origin.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/Origin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/Origin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.WaveA","kind":"property","name":"WaveA","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveA {get; set;}","python":"chartElliottTriangle.WaveA: ChartPoint","summary":"Gets or sets the wave A anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.WaveA = new ChartPoint(Bars.OpenTimes.Last(52), Bars.LowPrices.Last(52));\nPrint(\"Wave A: {0} at {1}\", triangle.WaveA.Time, triangle.WaveA.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.WaveA = ChartPoint(api.Bars.OpenTimes.Last(52), api.Bars.LowPrices.Last(52))\napi.Print(f\"Wave A: {triangle.WaveA.Time} at {triangle.WaveA.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveA/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveA/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.WaveB","kind":"property","name":"WaveB","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveB {get; set;}","python":"chartElliottTriangle.WaveB: ChartPoint","summary":"Gets or sets the wave B anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.WaveB = new ChartPoint(Bars.OpenTimes.Last(42), Bars.HighPrices.Last(42));\nPrint(\"Wave B: {0} at {1}\", triangle.WaveB.Time, triangle.WaveB.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.WaveB = ChartPoint(api.Bars.OpenTimes.Last(42), api.Bars.HighPrices.Last(42))\napi.Print(f\"Wave B: {triangle.WaveB.Time} at {triangle.WaveB.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveB/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveB/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.WaveC","kind":"property","name":"WaveC","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveC {get; set;}","python":"chartElliottTriangle.WaveC: ChartPoint","summary":"Gets or sets the wave C anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.WaveC = new ChartPoint(Bars.OpenTimes.Last(32), Bars.LowPrices.Last(32));\nPrint(\"Wave C: {0} at {1}\", triangle.WaveC.Time, triangle.WaveC.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.WaveC = ChartPoint(api.Bars.OpenTimes.Last(32), api.Bars.LowPrices.Last(32))\napi.Print(f\"Wave C: {triangle.WaveC.Time} at {triangle.WaveC.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.WaveD","kind":"property","name":"WaveD","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveD {get; set;}","python":"chartElliottTriangle.WaveD: ChartPoint","summary":"Gets or sets the wave D anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.WaveD = new ChartPoint(Bars.OpenTimes.Last(22), Bars.HighPrices.Last(22));\nPrint(\"Wave D: {0} at {1}\", triangle.WaveD.Time, triangle.WaveD.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.WaveD = ChartPoint(api.Bars.OpenTimes.Last(22), api.Bars.HighPrices.Last(22))\napi.Print(f\"Wave D: {triangle.WaveD.Time} at {triangle.WaveD.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveD/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveD/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTriangle.WaveE","kind":"property","name":"WaveE","type":"T:cAlgo.API.ChartElliottTriangle","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveE {get; set;}","python":"chartElliottTriangle.WaveE: ChartPoint","summary":"Gets or sets the wave E anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawElliottTriangle(\"triangle\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Green);\ntriangle.WaveE = new ChartPoint(Bars.OpenTimes.Last(5), Bars.LowPrices.Last(5));\nPrint(\"Wave E: {0} at {1}\", triangle.WaveE.Time, triangle.WaveE.Y);","python":"triangle = api.Chart.DrawElliottTriangle(\"triangle\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Green)\ntriangle.WaveE = ChartPoint(api.Bars.OpenTimes.Last(5), api.Bars.LowPrices.Last(5))\napi.Print(f\"Wave E: {triangle.WaveE.Time} at {triangle.WaveE.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveE/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTriangle/WaveE/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottTripleCombo","kind":"interface","name":"ChartElliottTripleCombo","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottTripleCombo","python":"ChartElliottTripleCombo","summary":"Represents the Elliott Triple Combo Wave (W-X-Y-X-Z) chart object - an extended complex correction over six pivots (origin and W, X, Y, X, Z). The two X legs are named X1 and X2.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawElliottTripleCombo method to draw an Elliott Triple Combo Wave\n    public partial class ElliottTripleComboSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var i = Chart.FirstVisibleBarIndex;\n            var s = (Chart.LastVisibleBarIndex - i) / 6;\n            var t = Bars.OpenTimes;\n            var c = Bars.ClosePrices;\n\n            Chart.DrawElliottTripleCombo(\"TripleCombo\",\n                new ChartPoint(t[i], c[i]),\n                new ChartPoint(t[i + s], c[i + s]),\n                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),\n                new ChartPoint(t[i + 4 * s], c[i + 4 * s]),\n                new ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n                Color.Purple);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        i = api.Chart.FirstVisibleBarIndex\n        s = (api.Chart.LastVisibleBarIndex - i) // 6\n        t = api.Bars.OpenTimes\n        c = api.Bars.ClosePrices\n        tripleCombo = api.Chart.DrawElliottTripleCombo(\"TripleCombo\",\n            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]),\n            ChartPoint(t[i + 3 * s], c[i + 3 * s]), ChartPoint(t[i + 4 * s], c[i + 4 * s]), ChartPoint(t[i + 5 * s], c[i + 5 * s]),\n            Color.Purple)\n        tripleCombo.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.Origin","kind":"property","name":"Origin","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint Origin {get; set;}","python":"chartElliottTripleCombo.Origin: ChartPoint","summary":"Gets or sets the origin (wave 0) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.Origin = new ChartPoint(Bars.OpenTimes.Last(65), Bars.HighPrices.Last(65));\nPrint(\"Origin: {0} at {1}\", combo.Origin.Time, combo.Origin.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.Origin = ChartPoint(api.Bars.OpenTimes.Last(65), api.Bars.HighPrices.Last(65))\napi.Print(f\"Origin: {combo.Origin.Time} at {combo.Origin.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/Origin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/Origin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.WaveW","kind":"property","name":"WaveW","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveW {get; set;}","python":"chartElliottTripleCombo.WaveW: ChartPoint","summary":"Gets or sets the wave W anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.WaveW = new ChartPoint(Bars.OpenTimes.Last(52), Bars.LowPrices.Last(52));\nPrint(\"Wave W: {0} at {1}\", combo.WaveW.Time, combo.WaveW.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.WaveW = ChartPoint(api.Bars.OpenTimes.Last(52), api.Bars.LowPrices.Last(52))\napi.Print(f\"Wave W: {combo.WaveW.Time} at {combo.WaveW.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveW/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveW/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.WaveX1","kind":"property","name":"WaveX1","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveX1 {get; set;}","python":"chartElliottTripleCombo.WaveX1: ChartPoint","summary":"Gets or sets the first wave X (X1) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.WaveX1 = new ChartPoint(Bars.OpenTimes.Last(42), Bars.HighPrices.Last(42));\nPrint(\"Wave X1: {0} at {1}\", combo.WaveX1.Time, combo.WaveX1.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.WaveX1 = ChartPoint(api.Bars.OpenTimes.Last(42), api.Bars.HighPrices.Last(42))\napi.Print(f\"Wave X1: {combo.WaveX1.Time} at {combo.WaveX1.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveX1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveX1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.WaveX2","kind":"property","name":"WaveX2","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveX2 {get; set;}","python":"chartElliottTripleCombo.WaveX2: ChartPoint","summary":"Gets or sets the second wave X (X2) anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.WaveX2 = new ChartPoint(Bars.OpenTimes.Last(22), Bars.HighPrices.Last(22));\nPrint(\"Wave X2: {0} at {1}\", combo.WaveX2.Time, combo.WaveX2.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.WaveX2 = ChartPoint(api.Bars.OpenTimes.Last(22), api.Bars.HighPrices.Last(22))\napi.Print(f\"Wave X2: {combo.WaveX2.Time} at {combo.WaveX2.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveX2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveX2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.WaveY","kind":"property","name":"WaveY","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveY {get; set;}","python":"chartElliottTripleCombo.WaveY: ChartPoint","summary":"Gets or sets the wave Y anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.WaveY = new ChartPoint(Bars.OpenTimes.Last(32), Bars.LowPrices.Last(32));\nPrint(\"Wave Y: {0} at {1}\", combo.WaveY.Time, combo.WaveY.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.WaveY = ChartPoint(api.Bars.OpenTimes.Last(32), api.Bars.LowPrices.Last(32))\napi.Print(f\"Wave Y: {combo.WaveY.Time} at {combo.WaveY.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottTripleCombo.WaveZ","kind":"property","name":"WaveZ","type":"T:cAlgo.API.ChartElliottTripleCombo","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartPoint WaveZ {get; set;}","python":"chartElliottTripleCombo.WaveZ: ChartPoint","summary":"Gets or sets the wave Z anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPoint","pythonType":"ChartPoint","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var combo = Chart.DrawElliottTripleCombo(\"tripleCombo\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.HighPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.LowPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Purple);\ncombo.WaveZ = new ChartPoint(Bars.OpenTimes.Last(5), Bars.LowPrices.Last(5));\nPrint(\"Wave Z: {0} at {1}\", combo.WaveZ.Time, combo.WaveZ.Y);","python":"combo = api.Chart.DrawElliottTripleCombo(\"tripleCombo\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.HighPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.LowPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Purple)\ncombo.WaveZ = ChartPoint(api.Bars.OpenTimes.Last(5), api.Bars.LowPrices.Last(5))\napi.Print(f\"Wave Z: {combo.WaveZ.Time} at {combo.WaveZ.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveZ/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottTripleCombo/WaveZ/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottWaveBase","kind":"interface","name":"ChartElliottWaveBase","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartElliottWaveBase","python":"ChartElliottWaveBase","summary":"Represents the shared options of the Elliott Wave chart objects. An Elliott Wave is an ordered list of labelled pivots joined by a polyline; the wave degree drives the label notation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"foreach (var wave in Chart.FindAllObjects<ChartElliottWaveBase>())\n{\n    wave.Degree = ChartElliottWaveDegree.Intermediate;\n    wave.ShowLabels = true;\n    Print(\"Elliott wave: {0} | Type: {1} | Degree: {2}\", wave.Name, wave.ObjectType, wave.Degree);\n}","python":"wave = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\nwave.Degree = ChartElliottWaveDegree.Intermediate\nwave.ShowLabels = True\napi.Print(f\"Elliott wave: {wave.Name} | Type: {wave.ObjectType} | Degree: {wave.Degree}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottWaveBase.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartElliottWaveBase","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartElliottWaveBase.Color: Color","summary":"Gets or sets the chart object lines color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.Color = Color.Gold;\nPrint(\"Wave color: {0}\", correction.Color);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.Color = Color.Gold\napi.Print(f\"Wave color: {correction.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottWaveBase.Degree","kind":"property","name":"Degree","type":"T:cAlgo.API.ChartElliottWaveBase","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree Degree {get; set;}","python":"chartElliottWaveBase.Degree: ChartElliottWaveDegree","summary":"Gets or sets the wave degree that drives the label notation and default color.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.Degree = ChartElliottWaveDegree.Primary;\nPrint(\"Wave degree: {0}\", correction.Degree);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.Degree = ChartElliottWaveDegree.Primary\napi.Print(f\"Wave degree: {correction.Degree}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Degree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Degree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottWaveBase.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartElliottWaveBase","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartElliottWaveBase.LineStyle: LineStyle","summary":"Gets or sets the chart object lines style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.LineStyle = LineStyle.Lines;\nPrint(\"Wave line style: {0}\", correction.LineStyle);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.LineStyle = LineStyle.Lines\napi.Print(f\"Wave line style: {correction.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottWaveBase.ShowLabels","kind":"property","name":"ShowLabels","type":"T:cAlgo.API.ChartElliottWaveBase","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ShowLabels {get; set;}","python":"chartElliottWaveBase.ShowLabels: bool","summary":"Gets or sets a value indicating whether the wave labels are displayed. Default is true.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.ShowLabels = false;\nPrint(\"Wave labels shown: {0}\", correction.ShowLabels);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.ShowLabels = False\napi.Print(f\"Wave labels shown: {correction.ShowLabels}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/ShowLabels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/ShowLabels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartElliottWaveBase.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartElliottWaveBase","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartElliottWaveBase.Thickness: int","summary":"Gets or sets the chart object lines thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var correction = Chart.DrawElliottCorrection(\"correction\", new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10)), Color.Blue);\ncorrection.Thickness = 2;\nPrint(\"Wave thickness: {0}\", correction.Thickness);","python":"correction = api.Chart.DrawElliottCorrection(\"correction\", ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10)), Color.Blue)\ncorrection.Thickness = 2\napi.Print(f\"Wave thickness: {correction.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveBase/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartElliottWaveDegree","kind":"enum","name":"ChartElliottWaveDegree","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public enum ChartElliottWaveDegree","python":"ChartElliottWaveDegree","summary":"The Elliott Wave degree. Determines the wave-label notation (numerals, roman or letters and the enclosure style) and the default color of an Elliott Wave chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var impulse = Chart.DrawElliottImpulse(\"impulse\", new ChartPoint(Bars.OpenTimes.Last(60), Bars.LowPrices.Last(60)), new ChartPoint(Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50)), new ChartPoint(Bars.OpenTimes.Last(40), Bars.LowPrices.Last(40)), new ChartPoint(Bars.OpenTimes.Last(30), Bars.HighPrices.Last(30)), new ChartPoint(Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20)), new ChartPoint(Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10)), Color.Red);\nimpulse.Degree = TimeFrame == TimeFrame.Daily ? ChartElliottWaveDegree.Primary : ChartElliottWaveDegree.Minor;\nPrint(\"Impulse degree: {0}\", impulse.Degree);","python":"impulse = api.Chart.DrawElliottImpulse(\"impulse\", ChartPoint(api.Bars.OpenTimes.Last(60), api.Bars.LowPrices.Last(60)), ChartPoint(api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50)), ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.LowPrices.Last(40)), ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.HighPrices.Last(30)), ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20)), ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10)), Color.Red)\nimpulse.Degree = ChartElliottWaveDegree.Primary if api.TimeFrame == TimeFrame.Daily else ChartElliottWaveDegree.Minor\napi.Print(f\"Impulse degree: {impulse.Degree}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.GrandSupercycle","kind":"enum value","name":"GrandSupercycle","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.GrandSupercycle;","python":"ChartElliottWaveDegree.GrandSupercycle","summary":"The Grand Supercycle degree (largest).","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Supercycle","kind":"enum value","name":"Supercycle","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Supercycle;","python":"ChartElliottWaveDegree.Supercycle","summary":"The Supercycle degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Cycle","kind":"enum value","name":"Cycle","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Cycle;","python":"ChartElliottWaveDegree.Cycle","summary":"The Cycle degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Primary","kind":"enum value","name":"Primary","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Primary;","python":"ChartElliottWaveDegree.Primary","summary":"The Primary degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Intermediate","kind":"enum value","name":"Intermediate","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Intermediate;","python":"ChartElliottWaveDegree.Intermediate","summary":"The Intermediate degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Minor","kind":"enum value","name":"Minor","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Minor;","python":"ChartElliottWaveDegree.Minor","summary":"The Minor degree (default).","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Minute","kind":"enum value","name":"Minute","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Minute;","python":"ChartElliottWaveDegree.Minute","summary":"The Minute degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Minuette","kind":"enum value","name":"Minuette","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Minuette;","python":"ChartElliottWaveDegree.Minuette","summary":"The Minuette degree.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartElliottWaveDegree.Subminuette","kind":"enum value","name":"Subminuette","type":"T:cAlgo.API.ChartElliottWaveDegree","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartElliottWaveDegree.Subminuette;","python":"ChartElliottWaveDegree.Subminuette","summary":"The Subminuette degree (smallest).","remarks":null,"parameters":[],"returns":{"csharpType":"ChartElliottWaveDegree","pythonType":"ChartElliottWaveDegree","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartElliottWaveDegree/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartEllipse","kind":"interface","name":"ChartEllipse","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public interface ChartEllipse","python":"ChartEllipse","summary":"Represent the Ellipse chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator draw an ellipse on chart\n    public partial class ChartEllipseSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Draw();\n        }\n\n        public override void Calculate(int index)\n        {\n            Draw();\n        }\n\n        private void Draw()\n        {\n            var y1 = Bars.HighPrices[Chart.FirstVisibleBarIndex] > Bars.HighPrices[Chart.LastVisibleBarIndex] ? Bars.HighPrices[Chart.FirstVisibleBarIndex] : Bars.HighPrices[Chart.LastVisibleBarIndex];\n\n            var y2 = Bars.LowPrices[Chart.FirstVisibleBarIndex] < Bars.LowPrices[Chart.LastVisibleBarIndex] ? Bars.LowPrices[Chart.FirstVisibleBarIndex] : Bars.LowPrices[Chart.LastVisibleBarIndex];\n\n            var ellipse = Chart.DrawEllipse(\"ellipse\", Chart.FirstVisibleBarIndex, y1, Chart.LastVisibleBarIndex, y2, Color.FromArgb(50, Color.Red.R, Color.Red.G, Color.Red.B));\n\n            ellipse.IsFilled = true;\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.draw()\n\n    def calculate(self, index):\n        self.draw()\n\n    def draw(self):\n        y1 = api.Bars.HighPrices[api.Chart.FirstVisibleBarIndex] if api.Bars.HighPrices[api.Chart.FirstVisibleBarIndex] > api.Bars.HighPrices[api.Chart.LastVisibleBarIndex] else api.Bars.HighPrices[api.Chart.LastVisibleBarIndex]\n        y2 = api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex] if api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex] < api.Bars.LowPrices[api.Chart.LastVisibleBarIndex] else api.Bars.LowPrices[api.Chart.LastVisibleBarIndex]\n        ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Chart.FirstVisibleBarIndex, y1, api.Chart.LastVisibleBarIndex, y2, Color.FromArgb(50, Color.Red.R, Color.Red.G, Color.Red.B))\n        ellipse.IsFilled = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEllipse.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartEllipse","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time1 {get; set;}","python":"chartEllipse.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nellipse.Time1 = Bars.OpenTimes.Last(30);\nPrint(\"Ellipse time 1: {0}\", ellipse.Time1);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nellipse.Time1 = api.Bars.OpenTimes.Last(30)\napi.Print(f\"Ellipse time 1: {ellipse.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEllipse.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartEllipse","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time2 {get; set;}","python":"chartEllipse.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nellipse.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Ellipse time 2: {0}\", ellipse.Time2);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nellipse.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Ellipse time 2: {ellipse.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEllipse.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartEllipse","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y1 {get; set;}","python":"chartEllipse.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nellipse.Y1 = Bars.LowPrices.Last(20) - 10 * Symbol.PipSize;\nPrint(\"Ellipse Y1: {0}\", ellipse.Y1);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nellipse.Y1 = api.Bars.LowPrices.Last(20) - 10 * api.Symbol.PipSize\napi.Print(f\"Ellipse Y1: {ellipse.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEllipse.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartEllipse","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y2 {get; set;}","python":"chartEllipse.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nellipse.Y2 = Bars.HighPrices.LastValue + 10 * Symbol.PipSize;\nPrint(\"Ellipse Y2: {0}\", ellipse.Y2);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nellipse.Y2 = api.Bars.HighPrices.LastValue + 10 * api.Symbol.PipSize\napi.Print(f\"Ellipse Y2: {ellipse.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartEllipse/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartEquidistantChannel","kind":"interface","name":"ChartEquidistantChannel","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartEquidistantChannel","python":"ChartEquidistantChannel","summary":"Represents the Equidistant Channel chart object. The tool that allows drawing two precisely parallel lines in any direction on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // A sample indicator for showing how to use Chart.DrawEquidistantChannel method\n    public partial class EquidistantChannelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var channel = Chart.DrawEquidistantChannel(\"EquidistantChannel\", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], 20 * Symbol.PipSize, Color.Red);\n\n            channel.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        channel = api.Chart.DrawEquidistantChannel(\"EquidistantChannel\", api.Chart.FirstVisibleBarIndex, api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.HighPrices[api.Chart.LastVisibleBarIndex], 20 * api.Symbol.PipSize, Color.Red)\n        channel.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartEquidistantChannel.CalculateY(System.Int32)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(int barIndex)","python":"chartEquidistantChannel.CalculateY(barIndex: int) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), 20 * Symbol.PipSize, Color.Red);\nchannel.ExtendToInfinity = true;\nPrint(\"Channel base line at the last bar: {0}\", channel.CalculateY(Bars.Count - 1));","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), 20 * api.Symbol.PipSize, Color.Red)\nchannel.ExtendToInfinity = True\napi.Print(f\"Channel base line at the last bar: {channel.CalculateY(api.Bars.Count - 1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartEquidistantChannel.CalculateY(System.DateTime)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(DateTime time)","python":"chartEquidistantChannel.CalculateY(time: DateTime) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), 20 * Symbol.PipSize, Color.Red);\nchannel.ExtendToInfinity = true;\nvar baseLine = channel.CalculateY(Bars.OpenTimes.LastValue);\nPrint(\"Channel base line: {0} | Upper line: {1}\", baseLine, baseLine + channel.ChannelHeight);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), 20 * api.Symbol.PipSize, Color.Red)\nchannel.ExtendToInfinity = True\nbaseLine = channel.CalculateY(api.Bars.OpenTimes.LastValue)\napi.Print(f\"Channel base line: {baseLine} | Upper line: {baseLine + channel.ChannelHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.ChannelHeight","kind":"property","name":"ChannelHeight","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"double ChannelHeight {get; set;}","python":"chartEquidistantChannel.ChannelHeight: float","summary":"Gets or sets the height of the Equidistant Channel.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.ChannelHeight = 35 * Symbol.PipSize;\nPrint(\"Channel height in pips: {0}\", channel.ChannelHeight / Symbol.PipSize);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.ChannelHeight = 35 * api.Symbol.PipSize\napi.Print(f\"Channel height in pips: {channel.ChannelHeight / api.Symbol.PipSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ChannelHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ChannelHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartEquidistantChannel.Color: Color","summary":"Gets or sets the Equidistant Channel line color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Color = Color.Teal;\nPrint(\"Channel color: {0}\", channel.Color);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Color = Color.Teal\napi.Print(f\"Channel color: {channel.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.ExtendToInfinity","kind":"property","name":"ExtendToInfinity","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ExtendToInfinity {get; set;}","python":"chartEquidistantChannel.ExtendToInfinity: bool","summary":"Defines if the Equidistant channel extends to infinity.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.ExtendToInfinity = true;\nPrint(\"Channel extends to infinity: {0}\", channel.ExtendToInfinity);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.ExtendToInfinity = True\napi.Print(f\"Channel extends to infinity: {channel.ExtendToInfinity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ExtendToInfinity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ExtendToInfinity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartEquidistantChannel.LineStyle: LineStyle","summary":"Gets or sets the Equidistant channel line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.LineStyle = LineStyle.Dots;\nPrint(\"Channel line style: {0}\", channel.LineStyle);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.LineStyle = LineStyle.Dots\napi.Print(f\"Channel line style: {channel.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.ShowAngle","kind":"property","name":"ShowAngle","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ShowAngle {get; set;}","python":"chartEquidistantChannel.ShowAngle: bool","summary":"Gets or sets the Equidistant Channel angle.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.ShowAngle = true;\nPrint(\"Channel angle shown: {0}\", channel.ShowAngle);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.ShowAngle = True\napi.Print(f\"Channel angle shown: {channel.ShowAngle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ShowAngle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ShowAngle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartEquidistantChannel.Thickness: int","summary":"Gets or sets the Equidistant Channel line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Thickness = 2;\nPrint(\"Channel thickness: {0}\", channel.Thickness);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Thickness = 2\napi.Print(f\"Channel thickness: {channel.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time1 {get; set;}","python":"chartEquidistantChannel.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Time1 = Bars.OpenTimes.Last(40);\nPrint(\"Channel time 1: {0}\", channel.Time1);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Time1 = api.Bars.OpenTimes.Last(40)\napi.Print(f\"Channel time 1: {channel.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time2 {get; set;}","python":"chartEquidistantChannel.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Channel time 2: {0}\", channel.Time2);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Channel time 2: {channel.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y1 {get; set;}","python":"chartEquidistantChannel.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Channel Y1: {0}\", channel.Y1);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Channel Y1: {channel.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartEquidistantChannel.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartEquidistantChannel","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y2 {get; set;}","python":"chartEquidistantChannel.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var channel = Chart.DrawEquidistantChannel(\"channel\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, 20 * Symbol.PipSize, Color.Red);\nchannel.Y2 = Bars.LowPrices.LastValue - 5 * Symbol.PipSize;\nPrint(\"Channel Y2: {0}\", channel.Y2);","python":"channel = api.Chart.DrawEquidistantChannel(\"channel\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, 20 * api.Symbol.PipSize, Color.Red)\nchannel.Y2 = api.Bars.LowPrices.LastValue - 5 * api.Symbol.PipSize\napi.Print(f\"Channel Y2: {channel.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciArc","kind":"interface","name":"ChartFibonacciArc","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciArc","python":"ChartFibonacciArc","summary":"Represents the Fibonacci Arc chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawFibonacciArc method to draw a Fibonacci Arc\n    public partial class FibonacciArcSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawFibonacciArc(\"Arc\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        fibonacciArc = api.Chart.DrawFibonacciArc(\"Arc\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Red)\n        fibonacciArc.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciArc.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartFibonacciArc","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time1 {get; set;}","python":"chartFibonacciArc.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narc.Time1 = Bars.OpenTimes.Last(40);\nPrint(\"Arc anchor time: {0}\", arc.Time1);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narc.Time1 = api.Bars.OpenTimes.Last(40)\napi.Print(f\"Arc anchor time: {arc.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciArc.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartFibonacciArc","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time2 {get; set;}","python":"chartFibonacciArc.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narc.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Arc second point time: {0}\", arc.Time2);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narc.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Arc second point time: {arc.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciArc.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartFibonacciArc","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y1 {get; set;}","python":"chartFibonacciArc.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narc.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Arc anchor price: {0}\", arc.Y1);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narc.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Arc anchor price: {arc.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciArc.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartFibonacciArc","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y2 {get; set;}","python":"chartFibonacciArc.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var arc = Chart.DrawFibonacciArc(\"arc\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\narc.Y2 = Bars.HighPrices.LastValue + 5 * Symbol.PipSize;\nPrint(\"Arc second point price: {0}\", arc.Y2);","python":"arc = api.Chart.DrawFibonacciArc(\"arc\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\narc.Y2 = api.Bars.HighPrices.LastValue + 5 * api.Symbol.PipSize\napi.Print(f\"Arc second point price: {arc.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciArc/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciBase","kind":"interface","name":"ChartFibonacciBase","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciBase","python":"ChartFibonacciBase","summary":"Represents the Fibonacci tools options.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ChartFibonacciBase fibonacci = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nfibonacci.DisplayPrices = true;\nfibonacci.LineStyle = LineStyle.Dots;\nPrint(\"Fibonacci levels: {0}\", fibonacci.FibonacciLevels.Count);","python":"fibonacci = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nfibonacci.DisplayPrices = True\nfibonacci.LineStyle = LineStyle.Dots\napi.Print(f\"Fibonacci levels: {fibonacci.FibonacciLevels.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciBase.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartFibonacciBase","namespace":"cAlgo.API","group":"Fibonacci","csharp":"Color Color {get; set;}","python":"chartFibonacciBase.Color: Color","summary":"Gets or sets the lines color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Color = Color.Orange;\nPrint(\"Fibonacci lines color: {0}\", retracement.Color);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Color = Color.Orange\napi.Print(f\"Fibonacci lines color: {retracement.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciBase.DisplayPrices","kind":"property","name":"DisplayPrices","type":"T:cAlgo.API.ChartFibonacciBase","namespace":"cAlgo.API","group":"Fibonacci","csharp":"bool DisplayPrices {get; set;}","python":"chartFibonacciBase.DisplayPrices: bool","summary":"Defines if the Fibonacci levels display the prices","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.DisplayPrices = true;\nPrint(\"Level prices shown: {0}\", retracement.DisplayPrices);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.DisplayPrices = True\napi.Print(f\"Level prices shown: {retracement.DisplayPrices}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/DisplayPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/DisplayPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciBase.FibonacciLevels","kind":"property","name":"FibonacciLevels","type":"T:cAlgo.API.ChartFibonacciBase","namespace":"cAlgo.API","group":"Fibonacci","csharp":"IReadonlyList<FibonacciLevel> FibonacciLevels {get;}","python":"chartFibonacciBase.FibonacciLevels: IReadonlyList[FibonacciLevel]","summary":"Gets the Fibonacci levels.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<FibonacciLevel>","pythonType":"IReadonlyList[FibonacciLevel]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nforeach (var level in retracement.FibonacciLevels)\n    Print(\"Level: {0}% | Visible: {1}\", level.Percent, level.IsVisible);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nfor level in retracement.FibonacciLevels:\n    api.Print(f\"Level: {level.Percent}% | Visible: {level.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/FibonacciLevels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/FibonacciLevels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciBase.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartFibonacciBase","namespace":"cAlgo.API","group":"Fibonacci","csharp":"LineStyle LineStyle {get; set;}","python":"chartFibonacciBase.LineStyle: LineStyle","summary":"Gets or sets the lines style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.LineStyle = LineStyle.DotsRare;\nPrint(\"Fibonacci lines style: {0}\", retracement.LineStyle);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.LineStyle = LineStyle.DotsRare\napi.Print(f\"Fibonacci lines style: {retracement.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciBase.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartFibonacciBase","namespace":"cAlgo.API","group":"Fibonacci","csharp":"int Thickness {get; set;}","python":"chartFibonacciBase.Thickness: int","summary":"Gets or sets the lines thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Thickness = 2;\nPrint(\"Fibonacci lines thickness: {0}\", retracement.Thickness);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Thickness = 2\napi.Print(f\"Fibonacci lines thickness: {retracement.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciBase/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciExpansion","kind":"interface","name":"ChartFibonacciExpansion","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciExpansion","python":"ChartFibonacciExpansion","summary":"Represents the Fibonacci Expansion chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // A sample indicator for showing how to use the Chart.DrawFibonacciExpansion method\n    public partial class FibonacciExpansionSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;\n\n            var fibonacciExpansion = Chart.DrawFibonacciExpansion(\"fibonacciExpansion\", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.FirstVisibleBarIndex, Bars.LowPrices.Minimum(period), Chart.LastVisibleBarIndex, Bars.HighPrices.Maximum(period), Color.Red);\n\n            fibonacciExpansion.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        period = api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex\n        fibonacciExpansion = api.Chart.DrawFibonacciExpansion(\"fibonacciExpansion\", api.Chart.FirstVisibleBarIndex, api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex], api.Chart.FirstVisibleBarIndex, Functions.Minimum(api.Bars.LowPrices, period), api.Chart.LastVisibleBarIndex, Functions.Maximum(api.Bars.HighPrices, period), Color.Red)\n        fibonacciExpansion.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time1 {get; set;}","python":"chartFibonacciExpansion.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Time1 = Bars.OpenTimes.Last(35);\nPrint(\"Expansion time 1: {0}\", expansion.Time1);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Time1 = api.Bars.OpenTimes.Last(35)\napi.Print(f\"Expansion time 1: {expansion.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time2 {get; set;}","python":"chartFibonacciExpansion.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Time2 = Bars.OpenTimes.Last(22);\nPrint(\"Expansion time 2: {0}\", expansion.Time2);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Time2 = api.Bars.OpenTimes.Last(22)\napi.Print(f\"Expansion time 2: {expansion.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Time3","kind":"property","name":"Time3","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time3 {get; set;}","python":"chartFibonacciExpansion.Time3: DateTime","summary":"Gets or sets the value 3 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Time3 = Bars.OpenTimes.Last(5);\nPrint(\"Expansion time 3: {0}\", expansion.Time3);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Time3 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Expansion time 3: {expansion.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Time3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y1 {get; set;}","python":"chartFibonacciExpansion.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Expansion Y1: {0}\", expansion.Y1);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Expansion Y1: {expansion.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y2 {get; set;}","python":"chartFibonacciExpansion.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Y2 = Bars.HighPrices.Last(20) + 5 * Symbol.PipSize;\nPrint(\"Expansion Y2: {0}\", expansion.Y2);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Y2 = api.Bars.HighPrices.Last(20) + 5 * api.Symbol.PipSize\napi.Print(f\"Expansion Y2: {expansion.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciExpansion.Y3","kind":"property","name":"Y3","type":"T:cAlgo.API.ChartFibonacciExpansion","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y3 {get; set;}","python":"chartFibonacciExpansion.Y3: float","summary":"Gets or sets the value 3 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expansion = Chart.DrawFibonacciExpansion(\"expansion\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nexpansion.Y3 = Bars.LowPrices.Last(10) - 5 * Symbol.PipSize;\nPrint(\"Expansion Y3: {0}\", expansion.Y3);","python":"expansion = api.Chart.DrawFibonacciExpansion(\"expansion\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\nexpansion.Y3 = api.Bars.LowPrices.Last(10) - 5 * api.Symbol.PipSize\napi.Print(f\"Expansion Y3: {expansion.Y3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciExpansion/Y3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciFan","kind":"interface","name":"ChartFibonacciFan","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciFan","python":"ChartFibonacciFan","summary":"Represents the Fibonacci Fan chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawFibonacciFan method to draw a Fibonacci Fan\n    public partial class FibonacciFanSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawFibonacciFan(\"Fan\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        fibonacciFan = api.Chart.DrawFibonacciFan(\"Fan\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Red)\n        fibonacciFan.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartFibonacciFan.CalculateY(System.Int32,cAlgo.API.FibonacciLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double CalculateY(int barIndex, FibonacciLevel level)","python":"chartFibonacciFan.CalculateY(barIndex: int, level: FibonacciLevel) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."},{"name":"level","csharpType":"FibonacciLevel","pythonType":"FibonacciLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Red);\nforeach (var level in fan.FibonacciLevels)\n    Print(\"Level {0}% value at the last bar: {1}\", level.Percent, fan.CalculateY(Bars.Count - 1, level));","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Red)\nfor level in fan.FibonacciLevels:\n    api.Print(f\"Level {level.Percent}% value at the last bar: {fan.CalculateY(api.Bars.Count - 1, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartFibonacciFan.CalculateY(System.DateTime,cAlgo.API.FibonacciLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double CalculateY(DateTime time, FibonacciLevel level)","python":"chartFibonacciFan.CalculateY(time: DateTime, level: FibonacciLevel) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."},{"name":"level","csharpType":"FibonacciLevel","pythonType":"FibonacciLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Red);\nvar level = fan.FibonacciLevels[0];\nPrint(\"Level {0}% value at {1}: {2}\", level.Percent, Bars.OpenTimes.LastValue, fan.CalculateY(Bars.OpenTimes.LastValue, level));","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Red)\nlevel = fan.FibonacciLevels[0]\napi.Print(f\"Level {level.Percent}% value at {api.Bars.OpenTimes.LastValue}: {fan.CalculateY(api.Bars.OpenTimes.LastValue, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciFan.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time1 {get; set;}","python":"chartFibonacciFan.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nfan.Time1 = Bars.OpenTimes.Last(40);\nPrint(\"Fan origin time: {0}\", fan.Time1);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nfan.Time1 = api.Bars.OpenTimes.Last(40)\napi.Print(f\"Fan origin time: {fan.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciFan.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time2 {get; set;}","python":"chartFibonacciFan.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nfan.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Fan second point time: {0}\", fan.Time2);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nfan.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Fan second point time: {fan.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciFan.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y1 {get; set;}","python":"chartFibonacciFan.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nfan.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Fan origin price: {0}\", fan.Y1);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nfan.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Fan origin price: {fan.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciFan.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartFibonacciFan","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y2 {get; set;}","python":"chartFibonacciFan.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fan = Chart.DrawFibonacciFan(\"fan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nfan.Y2 = Bars.HighPrices.LastValue + 5 * Symbol.PipSize;\nPrint(\"Fan second point price: {0}\", fan.Y2);","python":"fan = api.Chart.DrawFibonacciFan(\"fan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nfan.Y2 = api.Bars.HighPrices.LastValue + 5 * api.Symbol.PipSize\napi.Print(f\"Fan second point price: {fan.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciFan/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciRetracement","kind":"interface","name":"ChartFibonacciRetracement","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciRetracement","python":"ChartFibonacciRetracement","summary":"Represents the Fibonacci Retracement chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This indicator shows how to use the Chart.DrawFibonacciRetracement method to draw a Fibonacci Retracement\n    public partial class FibonacciRetracementSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;\n\n            var max = Bars.HighPrices.Maximum(period);\n            var min = Bars.LowPrices.Minimum(period);\n\n            Chart.DrawFibonacciRetracement(\"FibonacciRetracement\", Chart.FirstVisibleBarIndex, max, Chart.LastVisibleBarIndex, min, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        period = api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex\n        maxValue = Functions.Maximum(api.Bars.HighPrices, period)\n        minValue = Functions.Minimum(api.Bars.LowPrices, period)\n        api.Chart.DrawFibonacciRetracement(\"FibonacciRetracement\", api.Chart.FirstVisibleBarIndex, maxValue, api.Chart.LastVisibleBarIndex, minValue, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartFibonacciRetracement.CalculateY(System.Int32)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double CalculateY(int barIndex)","python":"chartFibonacciRetracement.CalculateY(barIndex: int) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nPrint(\"Retracement value at the last bar: {0}\", retracement.CalculateY(Bars.Count - 1));","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\napi.Print(f\"Retracement value at the last bar: {retracement.CalculateY(api.Bars.Count - 1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartFibonacciRetracement.CalculateY(System.DateTime)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double CalculateY(DateTime time)","python":"chartFibonacciRetracement.CalculateY(time: DateTime) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\nPrint(\"Retracement value at {0}: {1}\", Bars.OpenTimes.Last(20), retracement.CalculateY(Bars.OpenTimes.Last(20)));","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\napi.Print(f\"Retracement value at {api.Bars.OpenTimes.Last(20)}: {retracement.CalculateY(api.Bars.OpenTimes.Last(20))}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciRetracement.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time1 {get; set;}","python":"chartFibonacciRetracement.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Time1 = Bars.OpenTimes.Last(60);\nPrint(\"Retracement time 1: {0}\", retracement.Time1);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Time1 = api.Bars.OpenTimes.Last(60)\napi.Print(f\"Retracement time 1: {retracement.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciRetracement.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time2 {get; set;}","python":"chartFibonacciRetracement.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Retracement time 2: {0}\", retracement.Time2);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Retracement time 2: {retracement.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciRetracement.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y1 {get; set;}","python":"chartFibonacciRetracement.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Y1 = Bars.HighPrices.Last(50) + 5 * Symbol.PipSize;\nPrint(\"Retracement 100% price: {0}\", retracement.Y1);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Y1 = api.Bars.HighPrices.Last(50) + 5 * api.Symbol.PipSize\napi.Print(f\"Retracement 100% price: {retracement.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciRetracement.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartFibonacciRetracement","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y2 {get; set;}","python":"chartFibonacciRetracement.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nretracement.Y2 = Bars.LowPrices.LastValue - 5 * Symbol.PipSize;\nPrint(\"Retracement 0% price: {0}\", retracement.Y2);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nretracement.Y2 = api.Bars.LowPrices.LastValue - 5 * api.Symbol.PipSize\napi.Print(f\"Retracement 0% price: {retracement.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciRetracement/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFibonacciTimezones","kind":"interface","name":"ChartFibonacciTimezones","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface ChartFibonacciTimezones","python":"ChartFibonacciTimezones","summary":"Represents the Fibonacci Timezones chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        var fibonacciTimezones = Chart.DrawFibonacciTimezones(\"timezones\", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], Color.Red, 2);\n        fibonacciTimezones.IsInteractive = true;\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        fibonacciTimezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Chart.FirstVisibleBarIndex, api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.HighPrices[api.Chart.LastVisibleBarIndex], Color.Red, 2)\n        fibonacciTimezones.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciTimezones.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartFibonacciTimezones","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time1 {get; set;}","python":"chartFibonacciTimezones.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\ntimezones.Time1 = Bars.OpenTimes.Last(40);\nPrint(\"Timezones start time: {0}\", timezones.Time1);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\ntimezones.Time1 = api.Bars.OpenTimes.Last(40)\napi.Print(f\"Timezones start time: {timezones.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciTimezones.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartFibonacciTimezones","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime Time2 {get; set;}","python":"chartFibonacciTimezones.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\ntimezones.Time2 = Bars.OpenTimes.Last(20);\nPrint(\"Timezones unit end time: {0}\", timezones.Time2);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\ntimezones.Time2 = api.Bars.OpenTimes.Last(20)\napi.Print(f\"Timezones unit end time: {timezones.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciTimezones.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartFibonacciTimezones","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y1 {get; set;}","python":"chartFibonacciTimezones.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\ntimezones.Y1 = Bars.LowPrices.Last(30);\nPrint(\"Timezones Y1: {0}\", timezones.Y1);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\ntimezones.Y1 = api.Bars.LowPrices.Last(30)\napi.Print(f\"Timezones Y1: {timezones.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartFibonacciTimezones.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartFibonacciTimezones","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Y2 {get; set;}","python":"chartFibonacciTimezones.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\ntimezones.Y2 = Bars.HighPrices.Last(25);\nPrint(\"Timezones Y2: {0}\", timezones.Y2);","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\ntimezones.Y2 = api.Bars.HighPrices.Last(25)\napi.Print(f\"Timezones Y2: {timezones.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/ChartFibonacciTimezones/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartFrame","kind":"interface","name":"ChartFrame","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartFrame","python":"ChartFrame","summary":"Represents a chart frame.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.LinkedChartGroup = LinkedChartGroup.A;\nPrint(\"Chart {0} {1} has {2} bars\", chartFrame.Symbol.Name, chartFrame.TimeFrame, chartFrame.Chart.Bars.Count);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.LinkedChartGroup = LinkedChartGroup.A\napi.Print(f\"Chart {chartFrame.Symbol.Name} {chartFrame.TimeFrame} has {chartFrame.Chart.Bars.Count} bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartFrame.TryChangeTimeFrame(cAlgo.API.TimeFrame)","kind":"method","name":"TryChangeTimeFrame","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"bool TryChangeTimeFrame(TimeFrame timeFrame)","python":"chartFrame.TryChangeTimeFrame(timeFrame: TimeFrame) -> bool","summary":"Changes the time frame on the chart.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame to change the current chart time frame to"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nvar isChanged = chartFrame.TryChangeTimeFrame(TimeFrame.Daily);\nPrint(\"Time frame changed: {0}\", isChanged);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nisChanged = chartFrame.TryChangeTimeFrame(TimeFrame.Daily)\napi.Print(f\"Time frame changed: {isChanged}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TryChangeTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TryChangeTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartFrame.TryChangeTimeFrameAndSymbol(cAlgo.API.TimeFrame,System.String)","kind":"method","name":"TryChangeTimeFrameAndSymbol","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"bool TryChangeTimeFrameAndSymbol(TimeFrame timeFrame, string symbolName)","python":"chartFrame.TryChangeTimeFrameAndSymbol(timeFrame: TimeFrame, symbolName: str) -> bool","summary":"Changes the time frame and the symbol on the chart.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame to change the current chart time frame to"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name to change the current chart symbol to"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nvar isChanged = chartFrame.TryChangeTimeFrameAndSymbol(TimeFrame.Minute15, \"GBPUSD\");\nPrint(\"Chart changed: {0}\", isChanged);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nisChanged = chartFrame.TryChangeTimeFrameAndSymbol(TimeFrame.Minute15, \"GBPUSD\")\napi.Print(f\"Chart changed: {isChanged}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TryChangeTimeFrameAndSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TryChangeTimeFrameAndSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartFrame.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"Chart Chart {get;}","python":"chartFrame.Chart: Chart","summary":"Returns frame chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nvar chart = chartFrame.Chart;\nchart.DrawHorizontalLine(\"bidLevel\", chartFrame.Symbol.Bid, Color.Red);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchart = chartFrame.Chart\nchart.DrawHorizontalLine(\"bidLevel\", chartFrame.Symbol.Bid, Color.Red)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartFrame.LinkedChartGroup","kind":"property","name":"LinkedChartGroup","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup LinkedChartGroup {get; set;}","python":"chartFrame.LinkedChartGroup: LinkedChartGroup","summary":"Get / set linked group of frame.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.LinkedChartGroup = LinkedChartGroup.B;\nPrint(\"Linked chart group: {0}\", chartFrame.LinkedChartGroup);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.LinkedChartGroup = LinkedChartGroup.B\napi.Print(f\"Linked chart group: {chartFrame.LinkedChartGroup}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartFrame.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"Symbol Symbol {get; set;}","python":"chartFrame.Symbol: Symbol","summary":"Get / set frame chart symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Symbol = Symbols.GetSymbol(\"GBPUSD\");\nPrint(\"Chart symbol: {0}\", chartFrame.Symbol.Name);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Symbol = api.Symbols.GetSymbol(\"GBPUSD\")\napi.Print(f\"Chart symbol: {chartFrame.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartFrame.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"TimeFrame TimeFrame {get; set;}","python":"chartFrame.TimeFrame: TimeFrame","summary":"Get / set frame chart timeframe.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.TimeFrame = TimeFrame.Hour4;\nPrint(\"Chart time frame: {0}\", chartFrame.TimeFrame);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.TimeFrame = TimeFrame.Hour4\napi.Print(f\"Chart time frame: {chartFrame.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartFrame.LinkedChartGroupChanged","kind":"event","name":"LinkedChartGroupChanged","type":"T:cAlgo.API.ChartFrame","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ChartFrameLinkedChartGroupChangedEventArgs> LinkedChartGroupChanged;","python":"chartFrame.LinkedChartGroupChanged += handler  # handler(obj: ChartFrameLinkedChartGroupChangedEventArgs)","summary":"Occurs when frame LinkedChartGroup is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartFrameLinkedChartGroupChangedEventArgs>","pythonType":"Callable[[ChartFrameLinkedChartGroupChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.LinkedChartGroupChanged += OnLinkedChartGroupChanged;\n}\n\nprivate void OnLinkedChartGroupChanged(ChartFrameLinkedChartGroupChangedEventArgs args)\n{\n    Print(\"Chart {0} linked group: {1}\", args.ChartFrame.Symbol.Name, args.ChartFrame.LinkedChartGroup);\n}","python":"def on_start(self):\n    chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chartFrame.LinkedChartGroupChanged += self.on_linked_chart_group_changed\n\ndef on_linked_chart_group_changed(self, args):\n    api.Print(f\"Chart {args.ChartFrame.Symbol.Name} linked group: {args.ChartFrame.LinkedChartGroup}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/LinkedChartGroupChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartFrame/LinkedChartGroupChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartFrameLinkedChartGroupChangedEventArgs","kind":"class","name":"ChartFrameLinkedChartGroupChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartFrameLinkedChartGroupChangedEventArgs","python":"ChartFrameLinkedChartGroupChangedEventArgs","summary":"Provides data for the chart frame LinkedChartGroup changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.LinkedChartGroupChanged += OnLinkedChartGroupChanged;\n}\n\nprivate void OnLinkedChartGroupChanged(ChartFrameLinkedChartGroupChangedEventArgs args)\n{\n    Print(\"Chart frame {0} linked chart group changed to {1}\", args.ChartFrame.Id, args.ChartFrame.LinkedChartGroup);\n}","python":"def on_start(self):\n    chart_frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chart_frame.LinkedChartGroupChanged += self.on_linked_chart_group_changed\n\ndef on_linked_chart_group_changed(self, args):\n    api.Print(f\"Chart frame {args.ChartFrame.Id} linked chart group changed to {args.ChartFrame.LinkedChartGroup}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartFrameLinkedChartGroupChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartFrameLinkedChartGroupChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartFrameLinkedChartGroupChangedEventArgs.ChartFrame","kind":"property","name":"ChartFrame","type":"T:cAlgo.API.ChartFrameLinkedChartGroupChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartFrame ChartFrame {get;}","python":"chartFrameLinkedChartGroupChangedEventArgs.ChartFrame: ChartFrame","summary":"Returns the chart frame.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartFrame","pythonType":"ChartFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.LinkedChartGroupChanged += OnLinkedChartGroupChanged;\n}\n\nprivate void OnLinkedChartGroupChanged(ChartFrameLinkedChartGroupChangedEventArgs args)\n{\n    var chartFrame = args.ChartFrame;\n    Print(\"{0} {1} chart is now in group {2}\", chartFrame.Symbol.Name, chartFrame.TimeFrame, chartFrame.LinkedChartGroup);\n}","python":"def on_start(self):\n    chart_frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chart_frame.LinkedChartGroupChanged += self.on_linked_chart_group_changed\n\ndef on_linked_chart_group_changed(self, args):\n    chart_frame = args.ChartFrame\n    api.Print(f\"{chart_frame.Symbol.Name} {chart_frame.TimeFrame} chart is now in group {chart_frame.LinkedChartGroup}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartFrameLinkedChartGroupChangedEventArgs/ChartFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartFrameLinkedChartGroupChangedEventArgs/ChartFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartGannBase","kind":"interface","name":"ChartGannBase","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface ChartGannBase","python":"ChartGannBase","summary":"Represents the Gann tools options.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"ChartGannBase gann = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngann.DisplayPrices = true;\ngann.Thickness = 2;\nPrint(\"Gann levels: {0} | From {1} to {2}\", gann.GannLevels.Count, gann.Time1, gann.Time2);","python":"gann = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngann.DisplayPrices = True\ngann.Thickness = 2\napi.Print(f\"Gann levels: {gann.GannLevels.Count} | From {gann.Time1} to {gann.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"Color Color {get; set;}","python":"chartGannBase.Color: Color","summary":"Gets or sets the lines color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Color = Color.SeaGreen;\nPrint(\"Gann lines color: {0}\", gannBox.Color);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Color = Color.SeaGreen\napi.Print(f\"Gann lines color: {gannBox.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.DisplayPrices","kind":"property","name":"DisplayPrices","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"bool DisplayPrices {get; set;}","python":"chartGannBase.DisplayPrices: bool","summary":"Defines if the Gann levels display the prices","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.DisplayPrices = true;\nPrint(\"Gann level prices shown: {0}\", gannBox.DisplayPrices);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.DisplayPrices = True\napi.Print(f\"Gann level prices shown: {gannBox.DisplayPrices}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/DisplayPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/DisplayPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.GannLevels","kind":"property","name":"GannLevels","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"IReadonlyList<GannLevel> GannLevels {get;}","python":"chartGannBase.GannLevels: IReadonlyList[GannLevel]","summary":"Gets the Gann levels.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<GannLevel>","pythonType":"IReadonlyList[GannLevel]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nforeach (var level in gannBox.GannLevels)\n    Print(\"Gann level ratio: {0} | Visible: {1}\", level.Ratio, level.IsVisible);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\nfor level in gannBox.GannLevels:\n    api.Print(f\"Gann level ratio: {level.Ratio} | Visible: {level.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/GannLevels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/GannLevels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"LineStyle LineStyle {get; set;}","python":"chartGannBase.LineStyle: LineStyle","summary":"Gets or sets the lines style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.LineStyle = LineStyle.Dots;\nPrint(\"Gann lines style: {0}\", gannBox.LineStyle);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.LineStyle = LineStyle.Dots\napi.Print(f\"Gann lines style: {gannBox.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"int Thickness {get; set;}","python":"chartGannBase.Thickness: int","summary":"Gets or sets the lines thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Thickness = 2;\nPrint(\"Gann lines thickness: {0}\", gannBox.Thickness);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Thickness = 2\napi.Print(f\"Gann lines thickness: {gannBox.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"DateTime Time1 {get; set;}","python":"chartGannBase.Time1: DateTime","summary":"Gets or sets the first point time value on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Time1 = Bars.OpenTimes.Last(40);\nPrint(\"Gann first point time: {0}\", gannBox.Time1);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Time1 = api.Bars.OpenTimes.Last(40)\napi.Print(f\"Gann first point time: {gannBox.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"DateTime Time2 {get; set;}","python":"chartGannBase.Time2: DateTime","summary":"Gets or sets the second point time value on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Gann second point time: {0}\", gannBox.Time2);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Gann second point time: {gannBox.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"double Y1 {get; set;}","python":"chartGannBase.Y1: float","summary":"Gets or sets the first point value on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Gann first point price: {0}\", gannBox.Y1);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Gann first point price: {gannBox.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartGannBase.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartGannBase","namespace":"cAlgo.API","group":"Gann","csharp":"double Y2 {get; set;}","python":"chartGannBase.Y2: float","summary":"Gets or sets the second point value on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"var gannBox = Chart.DrawGannBox(\"gannBox\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\ngannBox.Y2 = Bars.HighPrices.LastValue + 5 * Symbol.PipSize;\nPrint(\"Gann second point price: {0}\", gannBox.Y2);","python":"gannBox = api.Chart.DrawGannBox(\"gannBox\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\ngannBox.Y2 = api.Bars.HighPrices.LastValue + 5 * api.Symbol.PipSize\napi.Print(f\"Gann second point price: {gannBox.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartGannBox","kind":"interface","name":"ChartGannBox","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface ChartGannBox","python":"ChartGannBox","summary":"Represents the Gann Box chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawGannBox method to draw a Gann Box\n    public partial class GannBoxSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawGannBox(\"GannBox\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"gannBox = api.Chart.DrawGannBox(\"GannBox\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)\ngannBox.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartGannFan","kind":"interface","name":"ChartGannFan","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface ChartGannFan","python":"ChartGannFan","summary":"Represents the Gann Fan chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawGannFan method to draw a Gann Fan\n    public partial class GannFanSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawGannFan(\"GannFan\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"gannFan = api.Chart.DrawGannFan(\"GannFan\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)\ngannFan.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannFan.CalculateY(System.Int32,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannFan","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(int barIndex, GannLevel level)","python":"chartGannFan.CalculateY(barIndex: int, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nforeach (var level in gannFan.GannLevels)\n    Print(\"Gann {0} ray value at the last bar: {1}\", level.Ratio, gannFan.CalculateY(Bars.Count - 1, level));","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nfor level in gannFan.GannLevels:\n    api.Print(f\"Gann {level.Ratio} ray value at the last bar: {gannFan.CalculateY(api.Bars.Count - 1, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannFan.CalculateY(System.DateTime,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannFan","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(DateTime time, GannLevel level)","python":"chartGannFan.CalculateY(time: DateTime, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nvar level = gannFan.GannLevels[0];\nPrint(\"Gann {0} ray value at {1}: {2}\", level.Ratio, Bars.OpenTimes.LastValue, gannFan.CalculateY(Bars.OpenTimes.LastValue, level));","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nlevel = gannFan.GannLevels[0]\napi.Print(f\"Gann {level.Ratio} ray value at {api.Bars.OpenTimes.LastValue}: {gannFan.CalculateY(api.Bars.OpenTimes.LastValue, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannFan/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartGannSquare","kind":"interface","name":"ChartGannSquare","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface ChartGannSquare","python":"ChartGannSquare","summary":"Represents the Gann Square chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawGannSquare method to draw a Gann Square\n    public partial class GannSquareSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawGannSquare(\"GannSquare\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"gannSquare = api.Chart.DrawGannSquare(\"GannSquare\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)\ngannSquare.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannSquare.CalculateY(System.Int32,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannSquare","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(int barIndex, GannLevel level)","python":"chartGannSquare.CalculateY(barIndex: int, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquare(\"gannSquare\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nforeach (var level in gannSquare.GannLevels)\n    Print(\"Gann {0} ray value at the last bar: {1}\", level.Ratio, gannSquare.CalculateY(Bars.Count - 1, level));","python":"gannSquare = api.Chart.DrawGannSquare(\"gannSquare\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nfor level in gannSquare.GannLevels:\n    api.Print(f\"Gann {level.Ratio} ray value at the last bar: {gannSquare.CalculateY(api.Bars.Count - 1, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannSquare.CalculateY(System.DateTime,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannSquare","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(DateTime time, GannLevel level)","python":"chartGannSquare.CalculateY(time: DateTime, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquare(\"gannSquare\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nvar level = gannSquare.GannLevels[0];\nPrint(\"Gann {0} ray value at {1}: {2}\", level.Ratio, Bars.OpenTimes.LastValue, gannSquare.CalculateY(Bars.OpenTimes.LastValue, level));","python":"gannSquare = api.Chart.DrawGannSquare(\"gannSquare\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nlevel = gannSquare.GannLevels[0]\napi.Print(f\"Gann {level.Ratio} ray value at {api.Bars.OpenTimes.LastValue}: {gannSquare.CalculateY(api.Bars.OpenTimes.LastValue, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquare/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartGannSquareFixed","kind":"interface","name":"ChartGannSquareFixed","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface ChartGannSquareFixed","python":"ChartGannSquareFixed","summary":"Represents the Gann Square Fixed chart object with screen-space rendering.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawGannSquareFixed method to draw a Gann Square Fixed\n    public partial class GannSquareFixedSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawGannSquareFixed(\"GannSquareFixed\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"gannSquareFixed = api.Chart.DrawGannSquareFixed(\"GannSquareFixed\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)\ngannSquareFixed.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannSquareFixed.CalculateY(System.Int32,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannSquareFixed","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(int barIndex, GannLevel level)","python":"chartGannSquareFixed.CalculateY(barIndex: int, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquareFixed(\"gannSquareFixed\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nforeach (var level in gannSquare.GannLevels)\n    Print(\"Gann {0} ray value at the last bar: {1}\", level.Ratio, gannSquare.CalculateY(Bars.Count - 1, level));","python":"gannSquare = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nfor level in gannSquare.GannLevels:\n    api.Print(f\"Gann {level.Ratio} ray value at the last bar: {gannSquare.CalculateY(api.Bars.Count - 1, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartGannSquareFixed.CalculateY(System.DateTime,cAlgo.API.GannLevel)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartGannSquareFixed","namespace":"cAlgo.API","group":"Gann","csharp":"double CalculateY(DateTime time, GannLevel level)","python":"chartGannSquareFixed.CalculateY(time: DateTime, level: GannLevel) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."},{"name":"level","csharpType":"GannLevel","pythonType":"GannLevel","summary":"Level to get Y-axis value for."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var gannSquare = Chart.DrawGannSquareFixed(\"gannSquareFixed\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Blue);\nvar level = gannSquare.GannLevels[0];\nPrint(\"Gann {0} ray value at {1}: {2}\", level.Ratio, Bars.OpenTimes.LastValue, gannSquare.CalculateY(Bars.OpenTimes.LastValue, level));","python":"gannSquare = api.Chart.DrawGannSquareFixed(\"gannSquareFixed\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Blue)\nlevel = gannSquare.GannLevels[0]\napi.Print(f\"Gann {level.Ratio} ray value at {api.Bars.OpenTimes.LastValue}: {gannSquare.CalculateY(api.Bars.OpenTimes.LastValue, level)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannSquareFixed/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartHorizontalLine","kind":"interface","name":"ChartHorizontalLine","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartHorizontalLine","python":"ChartHorizontalLine","summary":"Represents the Horizontal Line chart object. Used to mark a certain value on the Y-axis throughout the whole chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Chart.DrawHorizontalLine method to draw an horizontal line\n    public partial class HorizontalLineSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawHorizontalLine(\"horizontalLine\", Bars.ClosePrices.LastValue, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.DrawHorizontalLine(\"horizontalLine\", api.Bars.ClosePrices.LastValue, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartHorizontalLine.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartHorizontalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartHorizontalLine.Color: Color","summary":"Gets or sets the line color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.Color = Bars.ClosePrices.LastValue < line.Y ? Color.Red : Color.Green;\nPrint(\"Support line color: {0}\", line.Color);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.Color = Color.Red if api.Bars.ClosePrices.LastValue < line.Y else Color.Green\napi.Print(f\"Support line color: {line.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartHorizontalLine.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartHorizontalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartHorizontalLine.LineStyle: LineStyle","summary":"Gets or sets the line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.LineStyle = LineStyle.LinesDots;\nPrint(\"Support line style: {0}\", line.LineStyle);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.LineStyle = LineStyle.LinesDots\napi.Print(f\"Support line style: {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartHorizontalLine.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartHorizontalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartHorizontalLine.Thickness: int","summary":"Gets or sets the line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.Thickness = 3;\nPrint(\"Support line thickness: {0}\", line.Thickness);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.Thickness = 3\napi.Print(f\"Support line thickness: {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartHorizontalLine.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ChartHorizontalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y {get; set;}","python":"chartHorizontalLine.Y: float","summary":"Gets or sets the Y-axis value of the line location.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.Y = Bars.LowPrices.Last(10);\nPrint(\"Support line price: {0}\", line.Y);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.Y = api.Bars.LowPrices.Last(10)\napi.Print(f\"Support line price: {line.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartIcon","kind":"interface","name":"ChartIcon","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartIcon","python":"ChartIcon","summary":"Represents the Icon chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Chart.DrawIcon method to draw icons\n    public partial class ChartIconSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            for (int i = Chart.FirstVisibleBarIndex; i <= Chart.LastVisibleBarIndex; i++)\n            {\n                var iconName = string.Format(\"Icon_{0}\", i);\n\n                if (Bars.ClosePrices[i] > Bars.OpenPrices[i])\n                {\n                    Chart.DrawIcon(iconName, ChartIconType.UpArrow, i, Bars.LowPrices[i], Color.Green);\n                }\n                else\n                {\n                    Chart.DrawIcon(iconName, ChartIconType.DownArrow, i, Bars.HighPrices[i], Color.Red);\n                }\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        for i in range(api.Chart.FirstVisibleBarIndex, api.Chart.LastVisibleBarIndex):\n            iconName = f\"Icon_{i}\"\n            if api.Bars.ClosePrices[i] > api.Bars.OpenPrices[i]:\n                api.Chart.DrawIcon(iconName, ChartIconType.UpArrow, i, api.Bars.LowPrices[i], Color.Green)\n            else:\n                api.Chart.DrawIcon(iconName, ChartIconType.DownArrow, i, api.Bars.HighPrices[i], Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartIcon.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartIcon","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartIcon.Color: Color","summary":"Gets or sets the color of the icon.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);\nicon.Color = Color.Gold;\nPrint(\"Icon color: {0}\", icon.Color);","python":"icon = api.Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)\nicon.Color = Color.Gold\napi.Print(f\"Icon color: {icon.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartIcon.IconType","kind":"property","name":"IconType","type":"T:cAlgo.API.ChartIcon","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType IconType {get; set;}","python":"chartIcon.IconType: ChartIconType","summary":"Gets or sets the type of the icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);\nicon.IconType = ChartIconType.Star;\nPrint(\"Icon type: {0}\", icon.IconType);","python":"icon = api.Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)\nicon.IconType = ChartIconType.Star\napi.Print(f\"Icon type: {icon.IconType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/IconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/IconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartIcon.Time","kind":"property","name":"Time","type":"T:cAlgo.API.ChartIcon","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time {get; set;}","python":"chartIcon.Time: DateTime","summary":"Gets or sets the Time value of the icon location.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);\nicon.Time = Bars.OpenTimes.Last(1);\nPrint(\"Icon time: {0}\", icon.Time);","python":"icon = api.Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)\nicon.Time = api.Bars.OpenTimes.Last(1)\napi.Print(f\"Icon time: {icon.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartIcon.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ChartIcon","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y {get; set;}","python":"chartIcon.Y: float","summary":"Gets or sets the Y-axis value of the icon location.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);\nicon.Y = Bars.LowPrices.LastValue - 5 * Symbol.PipSize;\nPrint(\"Icon price: {0}\", icon.Y);","python":"icon = api.Chart.DrawIcon(\"signal\", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)\nicon.Y = api.Bars.LowPrices.LastValue - 5 * api.Symbol.PipSize\napi.Print(f\"Icon price: {icon.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIcon/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartIconType","kind":"enum","name":"ChartIconType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public enum ChartIconType","python":"ChartIconType","summary":"Represents the type of the Icon.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartIconType\n    public partial class ChartIconTypeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawIcon(\"Icon\", IconType, Chart.LastVisibleBarIndex, Chart.Bars.LastBar.Low, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.DrawIcon(\"Icon\", api.IconType, api.Chart.LastVisibleBarIndex, api.Chart.Bars.LastBar.Low, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"IconType\",\n      \"DisplayName\": \"Icon Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.ChartIconType\",\n      \"DefaultValue\": \"DownArrow\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.UpArrow","kind":"enum value","name":"UpArrow","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.UpArrow;","python":"ChartIconType.UpArrow","summary":"The Up Arrow icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.DownArrow","kind":"enum value","name":"DownArrow","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.DownArrow;","python":"ChartIconType.DownArrow","summary":"The Down Arrow icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.Circle","kind":"enum value","name":"Circle","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.Circle;","python":"ChartIconType.Circle","summary":"The Circle icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.Square","kind":"enum value","name":"Square","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.Square;","python":"ChartIconType.Square","summary":"The Square icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.Diamond","kind":"enum value","name":"Diamond","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.Diamond;","python":"ChartIconType.Diamond","summary":"The Diamond icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.Star","kind":"enum value","name":"Star","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.Star;","python":"ChartIconType.Star","summary":"The Star icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.UpTriangle","kind":"enum value","name":"UpTriangle","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.UpTriangle;","python":"ChartIconType.UpTriangle","summary":"The Up Triangle icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartIconType.DownTriangle","kind":"enum value","name":"DownTriangle","type":"T:cAlgo.API.ChartIconType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartIconType.DownTriangle;","python":"ChartIconType.DownTriangle","summary":"The Down Triangle icon.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIconType","pythonType":"ChartIconType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartIconType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartIndicator","kind":"interface","name":"ChartIndicator","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public interface ChartIndicator","python":"ChartIndicator","summary":"The interface representing an indicator attached to a chart. Provides properties that allow for accessing various information about an indicator.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartIndicator in ChartIndicators)\n       {\n            Print($\"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.Count}\");\n       }\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartIndicator in api.ChartIndicators:\n            print(f\"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.Count}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.BarOutputs","kind":"property","name":"BarOutputs","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"IReadonlyList<IndicatorBarOutput> BarOutputs {get;}","python":"chartIndicator.BarOutputs: IReadonlyList[IndicatorBarOutput]","summary":"Gets the IReadonlyList of indicator bar outputs.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorBarOutput>","pythonType":"IReadonlyList[IndicatorBarOutput]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        Print(\"{0} bar output: {1} | Chart type: {2}\", indicator.Name, barOutput.Name, barOutput.ChartType);\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        api.Print(f\"{indicator.Name} bar output: {barOutput.Name} | Chart type: {barOutput.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/BarOutputs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/BarOutputs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.InstanceId","kind":"property","name":"InstanceId","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"string InstanceId {get;}","python":"chartIndicator.InstanceId: str","summary":"Gets the ID of a specific indicator instance.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar sameIndicator = ChartIndicators[sma.InstanceId];\nPrint(\"Instance id: {0} | Found: {1}\", sma.InstanceId, sameIndicator != null);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nsameIndicator = api.ChartIndicators[sma.InstanceId]\napi.Print(f\"Instance id: {sma.InstanceId} | Found: {sameIndicator is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/InstanceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/InstanceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.LineOutputs","kind":"property","name":"LineOutputs","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"IReadonlyList<IndicatorLineOutput> LineOutputs {get;}","python":"chartIndicator.LineOutputs: IReadonlyList[IndicatorLineOutput]","summary":"Gets the IReadonlyList of indicator output lines.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorLineOutput>","pythonType":"IReadonlyList[IndicatorLineOutput]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bands = ChartIndicators.Add(\"Bollinger Bands\", Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nforeach (var lineOutput in bands.LineOutputs)\n    Print(\"Line: {0} | Color: {1}\", lineOutput.Name, lineOutput.Color);","python":"bands = api.ChartIndicators.Add(\"Bollinger Bands\", api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nfor lineOutput in bands.LineOutputs:\n    api.Print(f\"Line: {lineOutput.Name} | Color: {lineOutput.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/LineOutputs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/LineOutputs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"string Name {get;}","python":"chartIndicator.Name: str","summary":"Gets the name of an indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nPrint(\"Indicator name: {0}\", sma.Name);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\napi.Print(f\"Indicator name: {sma.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.PanelIndex","kind":"property","name":"PanelIndex","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"int PanelIndex {get; set;}","python":"chartIndicator.PanelIndex: int","summary":"Gets or sets the index of the panel on which an indicator is displayed.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = ChartIndicators.Add(\"Relative Strength Index\", Bars.ClosePrices, 14);\nPrint(\"RSI panel index: {0}\", rsi.PanelIndex);\nrsi.PanelIndex = 0;","python":"rsi = api.ChartIndicators.Add(\"Relative Strength Index\", api.Bars.ClosePrices, 14)\napi.Print(f\"RSI panel index: {rsi.PanelIndex}\")\nrsi.PanelIndex = 0"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/PanelIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/PanelIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"AlgoInstanceParameters Parameters {get;}","python":"chartIndicator.Parameters: AlgoInstanceParameters","summary":"Gets the collection of indicator parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoInstanceParameters","pythonType":"AlgoInstanceParameters","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nfor (var i = 0; i < sma.Parameters.Count; i++)\n    Print(\"{0} = {1}\", sma.Parameters[i].Name, sma.Parameters[i].Value);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nfor i in range(sma.Parameters.Count):\n    api.Print(f\"{sma.Parameters[i].Name} = {sma.Parameters[i].Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.Type","kind":"property","name":"Type","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"IndicatorType Type {get;}","python":"chartIndicator.Type: IndicatorType","summary":"Gets the IndicatorType of an indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorType","pythonType":"IndicatorType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n    Print(\"{0} | Type: {1} | Line outputs: {2}\", indicator.Name, indicator.Type.Name, indicator.Type.Lines.Count);","python":"for indicator in api.ChartIndicators:\n    api.Print(f\"{indicator.Name} | Type: {indicator.Type.Name} | Line outputs: {indicator.Type.Lines.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartIndicator.Lines","kind":"property","name":"Lines","type":"T:cAlgo.API.ChartIndicator","namespace":"cAlgo.API","group":"Indicators","csharp":"IReadonlyList<IndicatorLine> Lines {get;}","python":"chartIndicator.Lines: IReadonlyList[IndicatorLine]","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorLine>","pythonType":"IReadonlyList[IndicatorLine]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use LineOutputs instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartIndicatorAddedEventArgs","kind":"class","name":"ChartIndicatorAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartIndicatorAddedEventArgs : ChartIndicatorEventArgs","python":"ChartIndicatorAddedEventArgs","summary":"The class representing AddedEventArgs for a ChildIndicator .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Indicators.IndicatorAdded += OnChartIndicatorAdded;\n}\n\nprivate void OnChartIndicatorAdded(ChartIndicatorAddedEventArgs args)\n{\n    Print(\"Indicator {0} added to the chart, panel index: {1}\", args.Indicator.Name, args.Indicator.PanelIndex);\n}","python":"def on_start(self):\n    api.Chart.Indicators.IndicatorAdded += self.on_chart_indicator_added\n\ndef on_chart_indicator_added(self, args):\n    api.Print(f\"Indicator {args.Indicator.Name} added to the chart, panel index: {args.Indicator.PanelIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartIndicators.IndicatorAdded)."}]}
{"id":"T:cAlgo.API.ChartIndicatorEventArgs","kind":"class","name":"ChartIndicatorEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class ChartIndicatorEventArgs","python":"ChartIndicatorEventArgs","summary":"The base class representing event args for a ChartIndicator .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Indicators.IndicatorAdded += OnChartIndicatorEvent;\n    Chart.Indicators.IndicatorModified += OnChartIndicatorEvent;\n    Chart.Indicators.IndicatorRemoved += OnChartIndicatorEvent;\n}\n\nprivate void OnChartIndicatorEvent(ChartIndicatorEventArgs args)\n{\n    Print(\"{0}: {1}\", args.GetType().Name, args.Indicator.Name);\n}","python":"def on_start(self):\n    api.Chart.Indicators.IndicatorAdded += self.on_chart_indicator_event\n    api.Chart.Indicators.IndicatorModified += self.on_chart_indicator_event\n    api.Chart.Indicators.IndicatorRemoved += self.on_chart_indicator_event\n\ndef on_chart_indicator_event(self, args):\n    api.Print(f\"{type(args).__name__}: {args.Indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the ChartIndicators events never fire there."}]}
{"id":"P:cAlgo.API.ChartIndicatorEventArgs.Indicator","kind":"property","name":"Indicator","type":"T:cAlgo.API.ChartIndicatorEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartIndicator Indicator {get;}","python":"chartIndicatorEventArgs.Indicator: ChartIndicator","summary":"Gets the ChartIndicator that raised an event.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Indicators.IndicatorAdded += OnChartIndicatorAdded;\n}\n\nprivate void OnChartIndicatorAdded(ChartIndicatorAddedEventArgs args)\n{\n    var indicator = args.Indicator;\n    Print(\"Name: {0} | Instance: {1} | Panel: {2}\", indicator.Name, indicator.InstanceId, indicator.PanelIndex);\n}","python":"def on_start(self):\n    api.Chart.Indicators.IndicatorAdded += self.on_chart_indicator_added\n\ndef on_chart_indicator_added(self, args):\n    indicator = args.Indicator\n    api.Print(f\"Name: {indicator.Name} | Instance: {indicator.InstanceId} | Panel: {indicator.PanelIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorEventArgs/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorEventArgs/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the ChartIndicators events never fire there."}]}
{"id":"T:cAlgo.API.ChartIndicatorModifiedEventArgs","kind":"class","name":"ChartIndicatorModifiedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartIndicatorModifiedEventArgs : ChartIndicatorEventArgs","python":"ChartIndicatorModifiedEventArgs","summary":"The class representing ModifiedEventArgs for a ChartIndicator .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Indicators.IndicatorModified += OnChartIndicatorModified;\n}\n\nprivate void OnChartIndicatorModified(ChartIndicatorModifiedEventArgs args)\n{\n    Print(\"Indicator {0} ({1}) was modified\", args.Indicator.Name, args.Indicator.InstanceId);\n}","python":"def on_start(self):\n    api.Chart.Indicators.IndicatorModified += self.on_chart_indicator_modified\n\ndef on_chart_indicator_modified(self, args):\n    api.Print(f\"Indicator {args.Indicator.Name} ({args.Indicator.InstanceId}) was modified\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorModifiedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorModifiedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartIndicators.IndicatorModified)."}]}
{"id":"T:cAlgo.API.ChartIndicatorRemovedEventArgs","kind":"class","name":"ChartIndicatorRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartIndicatorRemovedEventArgs : ChartIndicatorEventArgs","python":"ChartIndicatorRemovedEventArgs","summary":"The class representing RemovedEventArgs for a ChartIndicator .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Indicators.IndicatorRemoved += OnChartIndicatorRemoved;\n}\n\nprivate void OnChartIndicatorRemoved(ChartIndicatorRemovedEventArgs args)\n{\n    Print(\"Indicator {0} removed from the chart\", args.Indicator.Name);\n}","python":"def on_start(self):\n    api.Chart.Indicators.IndicatorRemoved += self.on_chart_indicator_removed\n\ndef on_chart_indicator_removed(self, args):\n    api.Print(f\"Indicator {args.Indicator.Name} removed from the chart\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartIndicatorRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartIndicators.IndicatorRemoved)."}]}
{"id":"T:cAlgo.API.ChartIndicators","kind":"interface","name":"ChartIndicators","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public interface ChartIndicators","python":"ChartIndicators","summary":"The interface representing a chart indicator instances collection. Provides properties and events that allow for accessing various information about indicators attached to a chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartIndicator in ChartIndicators)\n       {\n            Print($\"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.Count}\");\n       }\n\n        ChartIndicators.IndicatorAdded += args => Print($\"Chart indicator added, {args.Indicator.Name}\");\n        ChartIndicators.IndicatorRemoved += args => Print($\"Chart indicator removed, {args.Indicator.Name}\");\n        ChartIndicators.IndicatorModified += args => Print($\"Chart indicator modified, {args.Indicator.Name}\");\n\n       var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.OpenPrices, 100);\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartIndicator in api.ChartIndicators:\n            print(f\"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.Count}\")\n\n        api.ChartIndicators.IndicatorAdded += lambda args: print(f\"Chart indicator added, {args.Indicator.Name}\")\n        api.ChartIndicators.IndicatorRemoved += lambda args: print(f\"Chart indicator removed, {args.Indicator.Name}\")\n        api.ChartIndicators.IndicatorModified += lambda args: print(f\"Chart indicator modified, {args.Indicator.Name}\")\n\n        sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.OpenPrices, 100)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartIndicators.Add(System.String,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"ChartIndicator Add(string name, object[] parameterValues)","python":"api.ChartIndicators.Add(name: str, parameterValues: list[object]) -> ChartIndicator","summary":"Adds a new indicator to a chart.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The name of an indicator."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The indicator parameter values or an anonymous object that contains indicator parameter values."}],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"An ChartIndicator representing the added indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 12);\nvar ema = ChartIndicators.Add(\"Exponential Moving Average\", new { Source = Bars.ClosePrices, Periods = 26 });\nPrint(\"Added {0} and {1}\", sma.Name, ema.Name);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 12)\nema = api.ChartIndicators.Add(\"Exponential Moving Average\", api.Bars.ClosePrices, 26)\napi.Print(f\"Added {sma.Name} and {ema.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartIndicators.Add(cAlgo.API.IndicatorType,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"ChartIndicator Add(IndicatorType type, object[] parameterValues)","python":"api.ChartIndicators.Add(type: IndicatorType, parameterValues: list[object]) -> ChartIndicator","summary":"Adds a new indicator to a chart.","remarks":null,"parameters":[{"name":"type","csharpType":"IndicatorType","pythonType":"IndicatorType","summary":"The type of Indicator, you can get IndicatorType from AlgoRegistry."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The indicator parameter values or an anonymous object that contains indicator parameter values."}],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"An ChartIndicator representing the added indicator instance.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is IndicatorType smaType)\n{\n    var sma = ChartIndicators.Add(smaType, new { Source = Bars.ClosePrices, Periods = 12 });\n    Print(\"Added indicator: {0}\", sma.Name);\n}","python":"smaType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\nif smaType is not None:\n    sma = api.ChartIndicators.Add(smaType, api.Bars.ClosePrices, 12)\n    api.Print(f\"Added indicator: {sma.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartIndicators.Remove(cAlgo.API.ChartIndicator)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"bool Remove(ChartIndicator indicator)","python":"api.ChartIndicators.Remove(indicator: ChartIndicator) -> bool","summary":"Removes an indicator from a chart.","remarks":null,"parameters":[{"name":"indicator","csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"The ChartIndicator to be removed from a chart."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar isRemoved = ChartIndicators.Remove(sma);\nPrint(\"Indicator removed: {0}\", isRemoved);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nisRemoved = api.ChartIndicators.Remove(sma)\napi.Print(f\"Indicator removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartIndicators.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"int Count {get;}","python":"api.ChartIndicators.Count: int","summary":"Gets the number of all indicators attached to a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Indicators on the chart: {0}\", ChartIndicators.Count);","python":"api.Print(f\"Indicators on the chart: {api.ChartIndicators.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartIndicators.Custom","kind":"property","name":"Custom","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"IReadonlyList<ChartIndicator> Custom {get;}","python":"api.ChartIndicators.Custom: IReadonlyList[ChartIndicator]","summary":"Gets the list of chart custom indicators.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartIndicator>","pythonType":"IReadonlyList[ChartIndicator]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators.Custom)\n    Print(\"Custom indicator: {0}\", indicator.Name);","python":"for indicator in api.ChartIndicators.Custom:\n    api.Print(f\"Custom indicator: {indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Custom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Custom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartIndicators.Item(System.String)","kind":"property","name":"Item","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"ChartIndicator Item {get;}","python":"api.ChartIndicators[instanceId: str] -> ChartIndicator","summary":"Gets an indicator attached to a chart by its instance ID.","remarks":null,"parameters":[{"name":"instanceId","csharpType":"string","pythonType":"str","summary":"The instance ID of an indicator attached to a chart."}],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar indicator = ChartIndicators[sma.InstanceId];\nif (indicator != null)\n    Print(\"Found indicator: {0}\", indicator.Name);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nindicator = api.ChartIndicators[sma.InstanceId]\nif indicator is not None:\n    api.Print(f\"Found indicator: {indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartIndicators.Standard","kind":"property","name":"Standard","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"IReadonlyList<ChartIndicator> Standard {get;}","python":"api.ChartIndicators.Standard: IReadonlyList[ChartIndicator]","summary":"Gets the list of chart standard indicators.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartIndicator>","pythonType":"IReadonlyList[ChartIndicator]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators.Standard)\n    Print(\"Standard indicator: {0}\", indicator.Name);","python":"for indicator in api.ChartIndicators.Standard:\n    api.Print(f\"Standard indicator: {indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Standard/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/Standard/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartIndicators.IndicatorAdded","kind":"event","name":"IndicatorAdded","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"event Action<ChartIndicatorAddedEventArgs> IndicatorAdded;","python":"api.ChartIndicators.IndicatorAdded += handler  # handler(obj: ChartIndicatorAddedEventArgs)","summary":"Occurs when a new indicator is added to a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartIndicatorAddedEventArgs>","pythonType":"Callable[[ChartIndicatorAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartIndicators.IndicatorAdded += OnIndicatorAdded;\n}\n\nprivate void OnIndicatorAdded(ChartIndicatorAddedEventArgs args)\n{\n    Print(\"Indicator added: {0}\", args.Indicator.Name);\n}","python":"def on_start(self):\n    api.ChartIndicators.IndicatorAdded += self.on_indicator_added\n\ndef on_indicator_added(self, args):\n    api.Print(f\"Indicator added: {args.Indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartIndicators.IndicatorModified","kind":"event","name":"IndicatorModified","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"event Action<ChartIndicatorModifiedEventArgs> IndicatorModified;","python":"api.ChartIndicators.IndicatorModified += handler  # handler(obj: ChartIndicatorModifiedEventArgs)","summary":"Occurs when an indicator attached to a chart is modified.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartIndicatorModifiedEventArgs>","pythonType":"Callable[[ChartIndicatorModifiedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartIndicators.IndicatorModified += OnIndicatorModified;\n}\n\nprivate void OnIndicatorModified(ChartIndicatorModifiedEventArgs args)\n{\n    Print(\"Indicator modified: {0} | Parameters: {1}\", args.Indicator.Name, args.Indicator.Parameters.Count);\n}","python":"def on_start(self):\n    api.ChartIndicators.IndicatorModified += self.on_indicator_modified\n\ndef on_indicator_modified(self, args):\n    api.Print(f\"Indicator modified: {args.Indicator.Name} | Parameters: {args.Indicator.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorModified/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorModified/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartIndicators.IndicatorRemoved","kind":"event","name":"IndicatorRemoved","type":"T:cAlgo.API.ChartIndicators","namespace":"cAlgo.API","group":"Indicators","csharp":"event Action<ChartIndicatorRemovedEventArgs> IndicatorRemoved;","python":"api.ChartIndicators.IndicatorRemoved += handler  # handler(obj: ChartIndicatorRemovedEventArgs)","summary":"Occurs when an indicator is removed from a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartIndicatorRemovedEventArgs>","pythonType":"Callable[[ChartIndicatorRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartIndicators.IndicatorRemoved += OnIndicatorRemoved;\n}\n\nprivate void OnIndicatorRemoved(ChartIndicatorRemovedEventArgs args)\n{\n    Print(\"Indicator removed: {0}\", args.Indicator.Name);\n}","python":"def on_start(self):\n    api.ChartIndicators.IndicatorRemoved += self.on_indicator_removed\n\ndef on_indicator_removed(self, args):\n    api.Print(f\"Indicator removed: {args.Indicator.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/ChartIndicators/IndicatorRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"T:cAlgo.API.ChartKeyboardEventArgs","kind":"class","name":"ChartKeyboardEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartKeyboardEventArgs","python":"ChartKeyboardEventArgs","summary":"Provides data for chart keyboard related events and callbacks","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    Print(\"Key: {0} | Modifiers: {1} | Ctrl: {2} | Shift: {3} | Alt: {4}\", args.Key, args.Modifiers, args.CtrlKey, args.ShiftKey, args.AltKey);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    api.Print(f\"Key: {args.Key} | Modifiers: {args.Modifiers} | Ctrl: {args.CtrlKey} | Shift: {args.ShiftKey} | Alt: {args.AltKey}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.AltKey","kind":"property","name":"AltKey","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool AltKey {get;}","python":"chartKeyboardEventArgs.AltKey: bool","summary":"True if Alt key was pressed otherwise False","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    if (args.AltKey)\n        Print(\"Alt + {0} pressed\", args.Key);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    if args.AltKey:\n        api.Print(f\"Alt + {args.Key} pressed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/AltKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/AltKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartKeyboardEventArgs.Chart: Chart","summary":"The chart that the event/callback occurred","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    Print(\"Key {0} pressed on chart {1} {2}\", args.Key, args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    api.Print(f\"Key {args.Key} pressed on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.CtrlKey","kind":"property","name":"CtrlKey","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool CtrlKey {get;}","python":"chartKeyboardEventArgs.CtrlKey: bool","summary":"True if Ctrl key was pressed otherwise False","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    if (args.CtrlKey && args.Key == Key.X)\n    {\n        foreach (var position in Positions.FindAll(\"keyboard\"))\n            ClosePosition(position);\n    }\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    if args.CtrlKey and args.Key == Key.X:\n        for position in api.Positions.FindAll(\"keyboard\"):\n            api.ClosePosition(position)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/CtrlKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/CtrlKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.Key","kind":"property","name":"Key","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Key Key {get;}","python":"chartKeyboardEventArgs.Key: Key","summary":"Keyboard key","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    if (args.Key == Key.B)\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"keyboard\");\n    else if (args.Key == Key.S)\n        ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"keyboard\");\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    if args.Key == Key.B:\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"keyboard\")\n    elif args.Key == Key.S:\n        api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"keyboard\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.Modifiers","kind":"property","name":"Modifiers","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ModifierKeys Modifiers {get;}","python":"chartKeyboardEventArgs.Modifiers: ModifierKeys","summary":"Modifiers key that was used with the Key","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    if (args.Modifiers.HasFlag(ModifierKeys.Control) && args.Modifiers.HasFlag(ModifierKeys.Shift))\n        Print(\"Ctrl + Shift + {0} pressed\", args.Key);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    if args.Modifiers.HasFlag(ModifierKeys.Control) and args.Modifiers.HasFlag(ModifierKeys.Shift):\n        api.Print(f\"Ctrl + Shift + {args.Key} pressed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Modifiers/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/Modifiers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"P:cAlgo.API.ChartKeyboardEventArgs.ShiftKey","kind":"property","name":"ShiftKey","type":"T:cAlgo.API.ChartKeyboardEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool ShiftKey {get;}","python":"chartKeyboardEventArgs.ShiftKey: bool","summary":"True if Shift key was pressed otherwise False","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.KeyDown += OnChartKeyDown;\n}\n\nprivate void OnChartKeyDown(ChartKeyboardEventArgs args)\n{\n    if (args.ShiftKey)\n        Print(\"Shift + {0} pressed\", args.Key);\n}","python":"def on_start(self):\n    api.Chart.KeyDown += self.on_chart_key_down\n\ndef on_chart_key_down(self, args):\n    if args.ShiftKey:\n        api.Print(f\"Shift + {args.Key} pressed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/ShiftKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartKeyboardEventArgs/ShiftKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown)."}]}
{"id":"T:cAlgo.API.ChartManager","kind":"interface","name":"ChartManager","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface ChartManager","python":"ChartManager","summary":"Represents the list of all the chart frames.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        var customFrame = ChartManager.AddCustomFrame(\"Test\");\n\n        var webview = new WebView();\n\n        webview.NavigateAsync(\"https://ctrader.com/\");\n\n        customFrame.Child = webview;\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        customFrame = api.ChartManager.AddCustomFrame(\"Test\")\n\n        webview = WebView()\n        webview.NavigateAsync(\"https://ctrader.com/\")\n\n        customFrame.Child = webview","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\nusing System.Linq;\nusing System;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        var addWebViewCustomFrameButton = new Button { Text = \"Add WebView Custom Frame\" };\n\n        addWebViewCustomFrameButton.Click += args =>\n        {\n            var customFrame = ChartManager.AddCustomFrame(\"WebView\");\n\n            var webView = new WebView();\n\n            webView.NavigateAsync(\"https://ctrader.com/\");\n\n            customFrame.Child = webView;\n        };\n\n        var addAccountInfoCustomFrameButton = new Button { Text = \"Add Account Info Custom Frame\" };\n\n        addAccountInfoCustomFrameButton.Click += args =>\n        {\n            var customFrame = ChartManager.AddCustomFrame(\"Account Info\");\n\n            var grid = new Grid(16, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 5);\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n\n            grid.AddChild(new TextBlock { Text = \"Account Info\", Style = style, HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock { Text = \"Type\", Style = style }, 1, 0);\n            grid.AddChild(new TextBlock { Text = Account.AccountType.ToString(), Style = style }, 1, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Is Live\", Style = style }, 2, 0);\n            grid.AddChild(new TextBlock { Text = Account.IsLive.ToString(), Style = style }, 2, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Balance\", Style = style }, 3, 0);\n            grid.AddChild(new TextBlock { Text = Account.Balance.ToString(), Style = style }, 3, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Broker Name\", Style = style }, 4, 0);\n            grid.AddChild(new TextBlock { Text = Account.BrokerName, Style = style }, 4, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Currency\", Style = style }, 5, 0);\n            grid.AddChild(new TextBlock { Text = Account.Asset.Name, Style = style }, 5, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Number\", Style = style }, 6, 0);\n            grid.AddChild(new TextBlock { Text = Account.Number.ToString(), Style = style }, 6, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Equity\", Style = style }, 7, 0);\n            grid.AddChild(new TextBlock { Text = Account.Equity.ToString(), Style = style }, 7, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Free Margin\", Style = style }, 8, 0);\n            grid.AddChild(new TextBlock { Text = Account.FreeMargin.ToString(), Style = style }, 8, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Margin\", Style = style }, 9, 0);\n            grid.AddChild(new TextBlock { Text = Account.Margin.ToString(), Style = style }, 9, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Margin Level\", Style = style }, 10, 0);\n            grid.AddChild(new TextBlock { Text = Account.MarginLevel.ToString(), Style = style }, 10, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Precise Leverage\", Style = style }, 11, 0);\n            grid.AddChild(new TextBlock { Text = Account.PreciseLeverage.ToString(), Style = style }, 11, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Stop Out Level\", Style = style }, 12, 0);\n            grid.AddChild(new TextBlock { Text = Account.StopOutLevel.ToString(), Style = style }, 12, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Unrealized Gross Profit\", Style = style }, 13, 0);\n            grid.AddChild(new TextBlock { Text = Account.UnrealizedGrossProfit.ToString(), Style = style }, 13, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Unrealized Net Profit\", Style = style }, 14, 0);\n            grid.AddChild(new TextBlock { Text = Account.UnrealizedNetProfit.ToString(), Style = style }, 14, 1);\n\n            grid.AddChild(new TextBlock { Text = \"User Id\", Style = style }, 15, 0);\n            grid.AddChild(new TextBlock { Text = Account.UserId.ToString(), Style = style }, 15, 1);\n\n            customFrame.Child = grid;\n        };\n\n        var addChartFrameButton = new Button { Text = \"Add Chart Frame\" };\n\n        addChartFrameButton.Click += args =>\n        {\n            var chartFrame = ChartManager.AddChartFrame(Symbols.First(), TimeFrame.Daily);\n\n            chartFrame.LinkedChartGroup = LinkedChartGroup.A;\n\n            chartFrame.Activate();\n        };\n\n        var removeAllCustomFramesButton = new Button {Text = \"Remove All Custom Frames\"};\n\n        removeAllCustomFramesButton.Click += args =>\n        {\n            var customFrames = ChartManager.OfType<CustomFrame>().ToArray();\n\n            foreach (var customFrame in customFrames)\n            {\n                ChartManager.RemoveFrame(customFrame.Id);\n            }\n        };\n\n        var changeMainChartContainerModeButton = new Button {Text = \"Change Main Chart Container Mode\"};\n\n        changeMainChartContainerModeButton.Click += args =>\n        {\n            ChartManager.ChartContainers.MainChartContainer.Mode = (ChartMode)Random.Shared.Next(0, 3);\n        };\n\n        var panel = new StackPanel { Orientation = Orientation.Vertical };\n\n        panel.AddChild(addWebViewCustomFrameButton);\n        panel.AddChild(addAccountInfoCustomFrameButton);\n        panel.AddChild(addChartFrameButton);\n        panel.AddChild(removeAllCustomFramesButton);\n        panel.AddChild(changeMainChartContainerModeButton);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"Chart Manager Test\");\n\n        aspBlock.Child = panel;\n\n        ChartManager.FramesAdded += args => Print($\"New frames added, #: {args.AddedFrames.Count()}\");\n        ChartManager.FramesRemoved += args => Print($\"Frames removed, #: {args.RemovedFrames.Count()}\");\n        ChartManager.ActiveFrameChanged += args => Print($\"Active frame changed to: {args.NewFrame.Id}\");\n\n        Print($\"Current open frames #: {ChartManager.Count}\");\n        Print($\"Current Active frame is {ChartManager.ActiveFrame?.Id}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        addWebViewCustomFrameButton = Button()\n        addWebViewCustomFrameButton.Text = \"Add WebView Custom Frame\"\n        addWebViewCustomFrameButton.Click += self.on_add_webview_custom_frame_button_click\n\n        addAccountInfoCustomFrameButton = Button()\n        addAccountInfoCustomFrameButton.Text = \"Add Account Info Custom Frame\"\n        addAccountInfoCustomFrameButton.Click += self.on_add_account_info_custom_frame_button_click\n\n        addChartFrameButton = Button()\n        addChartFrameButton.Text = \"Add Chart Frame\"\n        addChartFrameButton.Click += self.on_add_chart_frame_button_click\n\n        removeAllCustomFramesButton = Button()\n        removeAllCustomFramesButton.Text = \"Remove All Custom Frames\"\n        removeAllCustomFramesButton.Click += self.on_remove_all_custom_frames_button_click\n\n        changeMainChartContainerModeButton = Button()\n        changeMainChartContainerModeButton.Text = \"Change Main Chart Container Mode\"\n        changeMainChartContainerModeButton.Click += self.on_change_main_chart_container_mode_button_click\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        panel.AddChild(addWebViewCustomFrameButton)\n        panel.AddChild(addAccountInfoCustomFrameButton)\n        panel.AddChild(addChartFrameButton)\n        panel.AddChild(removeAllCustomFramesButton)\n        panel.AddChild(changeMainChartContainerModeButton)\n\n        aspBlock = api.Asp.SymbolTab.AddBlock(\"Chart Manager Test\")\n        aspBlock.Child = panel\n\n        api.ChartManager.FramesAdded += lambda args: print(f\"New frames added, #: {len(args.AddedFrames)}\")\n        api.ChartManager.FramesRemoved += lambda args: print(f\"Frames removed, #: {len(args.RemovedFrames)}\")\n        api.ChartManager.ActiveFrameChanged += lambda args: print(f\"Active frame changed to: {args.NewFrame.Id}\")\n\n        print(f\"Current open frames #: {api.ChartManager.Count}\")\n        print(f\"Current Active frame is {api.ChartManager.ActiveFrame.Id}\")\n\n    def on_add_webview_custom_frame_button_click(self, args):\n        customFrame = api.ChartManager.AddCustomFrame(\"WebView\")\n\n        webView = WebView()\n        webView.NavigateAsync(\"https://ctrader.com/\")\n\n        customFrame.Child = webView\n\n    def on_add_account_info_custom_frame_button_click(self, args):\n        customFrame = api.ChartManager.AddCustomFrame(\"Account Info\")\n        grid = Grid(16, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 5)\n        self.style.Set(ControlProperty.Margin, 5)\n        self.style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold)\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n\n        headerTextBox = self.getTextBlock(\"Account Info\")\n        headerTextBox.HorizontalAlignment = HorizontalAlignment.Center\n\n        grid.AddChild(headerTextBox, 0, 0, 1, 2)\n        grid.AddChild(self.getTextBlock(\"Type\"), 1, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.AccountType)), 1, 1)\n        grid.AddChild(self.getTextBlock(\"Is Live\"), 2, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.IsLive)), 2, 1)\n        grid.AddChild(self.getTextBlock(\"Balance\"), 3, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Balance)), 3, 1)\n        grid.AddChild(self.getTextBlock(\"Broker Name\"), 4, 0)\n        grid.AddChild(self.getTextBlock(api.Account.BrokerName), 4, 1)\n        grid.AddChild(self.getTextBlock(\"Currency\"), 5, 0)\n        grid.AddChild(self.getTextBlock(api.Account.Asset.Name), 5, 1)\n        grid.AddChild(self.getTextBlock(\"Number\"), 6, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Number)), 6, 1)\n        grid.AddChild(self.getTextBlock(\"Equity\"), 7, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Equity)), 7, 1)\n        grid.AddChild(self.getTextBlock(\"Free Margin\"), 8, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.FreeMargin)), 8, 1)\n        grid.AddChild(self.getTextBlock(\"Margin\"), 9, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Margin)), 9, 1)\n        grid.AddChild(self.getTextBlock(\"Margin Level\"), 10, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.MarginLevel)), 10, 1)\n        grid.AddChild(self.getTextBlock(\"Precise Leverage\"), 11, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.PreciseLeverage)), 11, 1)\n        grid.AddChild(self.getTextBlock(\"Stop Out Level\"), 12, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.StopOutLevel)), 12, 1)\n        grid.AddChild(self.getTextBlock(\"Unrealized Gross Profit\"), 13, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UnrealizedGrossProfit)), 13, 1)\n        grid.AddChild(self.getTextBlock(\"Unrealized Net Profit\"), 14, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UnrealizedNetProfit)), 14, 1)\n        grid.AddChild(self.getTextBlock(\"User Id\"), 15, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UserId)), 15, 1)\n\n        customFrame.Child = grid\n\n    def getTextBlock(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock\n\n    def on_add_chart_frame_button_click(self, args):\n        chartFrame = api.ChartManager.AddChartFrame(api.Symbols[0], TimeFrame.Daily)\n        chartFrame.LinkedChartGroup = LinkedChartGroup.A\n        chartFrame.Activate()\n\n    def on_remove_all_custom_frames_button_click(self, args):\n        customFrames = [frame for frame in api.ChartManager if isinstance(frame.__implementation__, CustomFrame)]\n\n        for customFrame in customFrames:\n            api.ChartManager.RemoveFrame(customFrame.Id)\n\n    def on_change_main_chart_container_mode_button_click(self, args):\n        match api.ChartManager.ChartContainers.MainChartContainer.Mode:\n            case ChartMode.Single:\n                api.ChartManager.ChartContainers.MainChartContainer.Mode = ChartMode.Multi\n            case ChartMode.Multi:\n                api.ChartManager.ChartContainers.MainChartContainer.Mode = ChartMode.Free\n            case _:\n                api.ChartManager.ChartContainers.MainChartContainer.Mode = ChartMode.Single","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.AddChartFrame(System.String,cAlgo.API.TimeFrame)","kind":"method","name":"AddChartFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFrame AddChartFrame(string symbolName, TimeFrame timeFrame)","python":"api.ChartManager.AddChartFrame(symbolName: str, timeFrame: TimeFrame) -> ChartFrame","summary":"Adds a new chart frame to main chart container.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name"},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Timeframe"}],"returns":{"csharpType":"ChartFrame","pythonType":"ChartFrame","summary":"Returns newly added chart frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Activate();\nPrint(\"Opened {0} {1} chart\", chartFrame.Symbol.Name, chartFrame.TimeFrame);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Activate()\napi.Print(f\"Opened {chartFrame.Symbol.Name} {chartFrame.TimeFrame} chart\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddChartFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddChartFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.AddChartFrame(System.String,cAlgo.API.TimeFrame,cAlgo.API.ChartContainer)","kind":"method","name":"AddChartFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFrame AddChartFrame(string symbolName, TimeFrame timeFrame, ChartContainer targetChartContainer)","python":"api.ChartManager.AddChartFrame(symbolName: str, timeFrame: TimeFrame, targetChartContainer: ChartContainer) -> ChartFrame","summary":"Adds a new chart frame to target chart container.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name"},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Timeframe"},{"name":"targetChartContainer","csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"Target chart container"}],"returns":{"csharpType":"ChartFrame","pythonType":"ChartFrame","summary":"Returns newly added chart frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var firstFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nfirstFrame.Detach();\nvar secondFrame = ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Minute15, firstFrame.ChartContainer);\nPrint(\"Detached container frames: {0}\", secondFrame.ChartContainer.Count);","python":"firstFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nfirstFrame.Detach()\nsecondFrame = api.ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Minute15, firstFrame.ChartContainer)\napi.Print(f\"Detached container frames: {secondFrame.ChartContainer.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddChartFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddChartFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.AddCustomFrame(System.String)","kind":"method","name":"AddCustomFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"CustomFrame AddCustomFrame(string title)","python":"api.ChartManager.AddCustomFrame(title: str) -> CustomFrame","summary":"Adds a new custom frame to main chart container.","remarks":null,"parameters":[{"name":"title","csharpType":"string","pythonType":"str","summary":"Custom frame title."}],"returns":{"csharpType":"CustomFrame","pythonType":"CustomFrame","summary":"Returns newly added custom frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"Account Summary\");\ncustomFrame.Child = new TextBlock { Text = $\"Balance: {Account.Balance}\", Margin = 10 };","python":"customFrame = api.ChartManager.AddCustomFrame(\"Account Summary\")\ntextBlock = TextBlock()\ntextBlock.Text = f\"Balance: {api.Account.Balance}\"\ntextBlock.Margin = Thickness(10)\ncustomFrame.Child = textBlock"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddCustomFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddCustomFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.AddCustomFrame(System.String,cAlgo.API.ChartContainer)","kind":"method","name":"AddCustomFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"CustomFrame AddCustomFrame(string title, ChartContainer targetChartContainer)","python":"api.ChartManager.AddCustomFrame(title: str, targetChartContainer: ChartContainer) -> CustomFrame","summary":"Adds a new custom frame to target chart container.","remarks":null,"parameters":[{"name":"title","csharpType":"string","pythonType":"str","summary":"Custom frame title."},{"name":"targetChartContainer","csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"Target chart container"}],"returns":{"csharpType":"CustomFrame","pythonType":"CustomFrame","summary":"Returns newly added custom frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Detach();\nvar customFrame = ChartManager.AddCustomFrame(\"Notes\", chartFrame.ChartContainer);\ncustomFrame.Child = new TextBox { Text = \"Write your EURUSD notes here\" };","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Detach()\ncustomFrame = api.ChartManager.AddCustomFrame(\"Notes\", chartFrame.ChartContainer)\ntextBox = TextBox()\ntextBox.Text = \"Write your EURUSD notes here\"\ncustomFrame.Child = textBox"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddCustomFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/AddCustomFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.GetChartFrame(System.String)","kind":"method","name":"GetChartFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"ChartFrame GetChartFrame(string frameId)","python":"api.ChartManager.GetChartFrame(frameId: str) -> ChartFrame","summary":"Gets a chart frame by it is Id.","remarks":null,"parameters":[{"name":"frameId","csharpType":"string","pythonType":"str","summary":"Frame Id"}],"returns":{"csharpType":"ChartFrame","pythonType":"ChartFrame","summary":"Returns matching chart frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var addedFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nvar chartFrame = ChartManager.GetChartFrame(addedFrame.Id);\nif (chartFrame != null)\n    Print(\"Found chart frame for {0}\", chartFrame.Symbol.Name);","python":"addedFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame = api.ChartManager.GetChartFrame(addedFrame.Id)\nif chartFrame is not None:\n    api.Print(f\"Found chart frame for {chartFrame.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/GetChartFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/GetChartFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.GetCustomFrame(System.String)","kind":"method","name":"GetCustomFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"CustomFrame GetCustomFrame(string frameId)","python":"api.ChartManager.GetCustomFrame(frameId: str) -> CustomFrame","summary":"Gets a custom frame by it is Id.","remarks":null,"parameters":[{"name":"frameId","csharpType":"string","pythonType":"str","summary":"Frame Id"}],"returns":{"csharpType":"CustomFrame","pythonType":"CustomFrame","summary":"Returns matching custom frame.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var addedFrame = ChartManager.AddCustomFrame(\"My Frame\");\nvar customFrame = ChartManager.GetCustomFrame(addedFrame.Id);\nif (customFrame != null)\n    customFrame.Child = new TextBlock { Text = \"Found my frame\" };","python":"addedFrame = api.ChartManager.AddCustomFrame(\"My Frame\")\ncustomFrame = api.ChartManager.GetCustomFrame(addedFrame.Id)\nif customFrame is not None:\n    textBlock = TextBlock()\n    textBlock.Text = \"Found my frame\"\n    customFrame.Child = textBlock"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/GetCustomFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/GetCustomFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.ChartManager.RemoveFrame(System.String)","kind":"method","name":"RemoveFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"bool RemoveFrame(string frameId)","python":"api.ChartManager.RemoveFrame(frameId: str) -> bool","summary":"Removes a frame by it is Id.","remarks":null,"parameters":[{"name":"frameId","csharpType":"string","pythonType":"str","summary":"Frame Id"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"Temporary Frame\");\nPrint(\"Frame removed: {0}\", ChartManager.RemoveFrame(customFrame.Id));","python":"customFrame = api.ChartManager.AddCustomFrame(\"Temporary Frame\")\napi.Print(f\"Frame removed: {api.ChartManager.RemoveFrame(customFrame.Id)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/RemoveFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/RemoveFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartManager.ActiveChartContainer","kind":"property","name":"ActiveChartContainer","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"ChartContainer ActiveChartContainer {get;}","python":"api.ChartManager.ActiveChartContainer: ChartContainer","summary":"Returns current active chart container if any otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var chartContainer = ChartManager.ActiveChartContainer;\nif (chartContainer != null)\n    Print(\"Active container {0} has {1} frames\", chartContainer.Id, chartContainer.Count);","python":"chartContainer = api.ChartManager.ActiveChartContainer\nif chartContainer is not None:\n    api.Print(f\"Active container {chartContainer.Id} has {chartContainer.Count} frames\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveChartContainer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveChartContainer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartManager.ActiveFrame","kind":"property","name":"ActiveFrame","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"Frame ActiveFrame {get;}","python":"api.ChartManager.ActiveFrame: Frame","summary":"Returns current active frame if any otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (ChartManager.ActiveFrame is ChartFrame chartFrame)\n    Print(\"Active chart: {0} {1}\", chartFrame.Symbol.Name, chartFrame.TimeFrame);","python":"activeFrame = api.ChartManager.ActiveFrame\nif activeFrame is not None and isinstance(activeFrame.__implementation__, ChartFrame):\n    chartFrame = ChartFrame(activeFrame)\n    api.Print(f\"Active chart: {chartFrame.Symbol.Name} {chartFrame.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartManager.ChartContainers","kind":"property","name":"ChartContainers","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"ChartContainers ChartContainers {get;}","python":"api.ChartManager.ChartContainers: ChartContainers","summary":"Returns chart containers.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainers","pythonType":"ChartContainers","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartContainer in ChartManager.ChartContainers)\n    Print(\"Container {0} has {1} frames in {2} mode\", chartContainer.Id, chartContainer.Count, chartContainer.Mode);","python":"for chartContainer in api.ChartManager.ChartContainers:\n    api.Print(f\"Container {chartContainer.Id} has {chartContainer.Count} frames in {chartContainer.Mode} mode\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ChartContainers/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ChartContainers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.ChartManager.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"int Count {get;}","python":"api.ChartManager.Count: int","summary":"Returns number of all frames.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Open frames: {0}\", ChartManager.Count);","python":"api.Print(f\"Open frames: {api.ChartManager.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartManager.ActiveFrameChanged","kind":"event","name":"ActiveFrameChanged","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<ActiveFrameChangedEventArgs> ActiveFrameChanged;","python":"api.ChartManager.ActiveFrameChanged += handler  # handler(obj: ActiveFrameChangedEventArgs)","summary":"Occurs when active frame is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ActiveFrameChangedEventArgs>","pythonType":"Callable[[ActiveFrameChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.ActiveFrameChanged += OnActiveFrameChanged;\n}\n\nprivate void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)\n{\n    if (args.NewFrame is ChartFrame chartFrame)\n        Print(\"Active chart changed to {0} {1}\", chartFrame.Symbol.Name, chartFrame.TimeFrame);\n}","python":"def on_start(self):\n    api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed\n\ndef on_active_frame_changed(self, args):\n    if args.NewFrame is not None and isinstance(args.NewFrame.__implementation__, ChartFrame):\n        chartFrame = ChartFrame(args.NewFrame)\n        api.Print(f\"Active chart changed to {chartFrame.Symbol.Name} {chartFrame.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveFrameChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/ActiveFrameChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartManager.FramesAdded","kind":"event","name":"FramesAdded","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FramesAddedEventArgs> FramesAdded;","python":"api.ChartManager.FramesAdded += handler  # handler(obj: FramesAddedEventArgs)","summary":"Occurs when new frames are added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FramesAddedEventArgs>","pythonType":"Callable[[FramesAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesAdded += OnFramesAdded;\n}\n\nprivate void OnFramesAdded(FramesAddedEventArgs args)\n{\n    foreach (var frame in args.AddedFrames)\n        Print(\"Frame added: {0}\", frame.Id);\n}","python":"def on_start(self):\n    api.ChartManager.FramesAdded += self.on_frames_added\n\ndef on_frames_added(self, args):\n    for frame in args.AddedFrames:\n        api.Print(f\"Frame added: {frame.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/FramesAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/FramesAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.ChartManager.FramesRemoved","kind":"event","name":"FramesRemoved","type":"T:cAlgo.API.ChartManager","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FramesRemovedEventArgs> FramesRemoved;","python":"api.ChartManager.FramesRemoved += handler  # handler(obj: FramesRemovedEventArgs)","summary":"Occurs when frames are removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FramesRemovedEventArgs>","pythonType":"Callable[[FramesRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesRemoved += OnFramesRemoved;\n}\n\nprivate void OnFramesRemoved(FramesRemovedEventArgs args)\n{\n    foreach (var frame in args.RemovedFrames)\n        Print(\"Frame removed: {0}\", frame.Id);\n}","python":"def on_start(self):\n    api.ChartManager.FramesRemoved += self.on_frames_removed\n\ndef on_frames_removed(self, args):\n    for frame in args.RemovedFrames:\n        api.Print(f\"Frame removed: {frame.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/FramesRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartManager/FramesRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartMode","kind":"enum","name":"ChartMode","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum ChartMode","python":"ChartMode","summary":"Represents the predefined chart container modes.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var mainContainer = ChartManager.ChartContainers.MainChartContainer;\nmainContainer.Mode = ChartMode.Free;\nPrint(\"Main container mode: {0}\", mainContainer.Mode);","python":"mainContainer = api.ChartManager.ChartContainers.MainChartContainer\nmainContainer.Mode = ChartMode.Free\napi.Print(f\"Main container mode: {mainContainer.Mode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.ChartMode.Single","kind":"enum value","name":"Single","type":"T:cAlgo.API.ChartMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartMode.Single;","python":"ChartMode.Single","summary":"Single chart mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartMode","pythonType":"ChartMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.ChartMode.Multi","kind":"enum value","name":"Multi","type":"T:cAlgo.API.ChartMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartMode.Multi;","python":"ChartMode.Multi","summary":"Multiple chart mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartMode","pythonType":"ChartMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.ChartMode.Free","kind":"enum value","name":"Free","type":"T:cAlgo.API.ChartMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartMode.Free;","python":"ChartMode.Free","summary":"Free chart mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartMode","pythonType":"ChartMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.ChartMode.Floating","kind":"enum value","name":"Floating","type":"T:cAlgo.API.ChartMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartMode.Floating;","python":"ChartMode.Floating","summary":"Floating chart mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartMode","pythonType":"ChartMode","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.ChartMouseEventArgs","kind":"class","name":"ChartMouseEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartMouseEventArgs","python":"ChartMouseEventArgs","summary":"Provides data for the mouse related routed events.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartMouseEventArgs\n    public partial class ChartMouseEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.MouseMove += Chart_MouseMove;\n        }\n\n        private void Chart_MouseMove(ChartMouseEventArgs obj)\n        {\n            var text = string.Format(\"Mouse Location: ({0}, {1})\", obj.MouseX, obj.MouseY);\n\n            Chart.DrawStaticText(\"mouse\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.MouseMove += self.on_chart_mouse_move\n\n    def on_chart_mouse_move(self, args):\n        text = f\"Mouse Location: ({args.MouseX}, {args.MouseY})\"\n        api.Chart.DrawStaticText(\"mouse\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.AltKey","kind":"property","name":"AltKey","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool AltKey {get;}","python":"chartMouseEventArgs.AltKey: bool","summary":"Defines whether the Alt key is pressed during the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    if (args.AltKey)\n        Chart.RemoveAllObjects();\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    if args.AltKey:\n        api.Chart.RemoveAllObjects()"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/AltKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/AltKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.BarIndex","kind":"property","name":"BarIndex","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double BarIndex {get;}","python":"chartMouseEventArgs.BarIndex: float","summary":"Gets the exact bar index of the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    var barIndex = (int)Math.Round(args.BarIndex);\n    Chart.DrawVerticalLine(\"clickedBar\", barIndex, Color.Yellow);\n    Print(\"Exact bar index: {0}, nearest bar: {1}\", args.BarIndex, barIndex);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    bar_index = int(round(args.BarIndex))\n    api.Chart.DrawVerticalLine(\"clickedBar\", bar_index, Color.Yellow)\n    api.Print(f\"Exact bar index: {args.BarIndex}, nearest bar: {bar_index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/BarIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/BarIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartMouseEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    Print(\"Mouse down on chart {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    api.Print(f\"Mouse down on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.ChartArea","kind":"property","name":"ChartArea","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea ChartArea {get;}","python":"chartMouseEventArgs.ChartArea: ChartArea","summary":"Gets the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    var areaName = args.ChartArea == args.Chart ? \"main area\" : \"indicator area\";\n    Print(\"Clicked on the {0}, area height: {1}\", areaName, args.ChartArea.Height);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    api.Print(f\"Clicked on an area with height: {args.ChartArea.Height}, top Y: {args.ChartArea.TopY}, bottom Y: {args.ChartArea.BottomY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.CtrlKey","kind":"property","name":"CtrlKey","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool CtrlKey {get;}","python":"chartMouseEventArgs.CtrlKey: bool","summary":"Defines whether the Ctrl key is pressed during the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    if (args.CtrlKey)\n        PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, args.YValue, \"ctrlClick\");\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    if args.CtrlKey:\n        api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, args.YValue, \"ctrlClick\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/CtrlKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/CtrlKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.MouseX","kind":"property","name":"MouseX","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double MouseX {get;}","python":"chartMouseEventArgs.MouseX: float","summary":"Gets the X-axis value of the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseMove += OnChartMouseMove;\n}\n\nprivate void OnChartMouseMove(ChartMouseEventArgs args)\n{\n    Chart.DrawStaticText(\"mouseX\", \"Mouse X: \" + args.MouseX, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);\n}","python":"def on_start(self):\n    api.Chart.MouseMove += self.on_chart_mouse_move\n\ndef on_chart_mouse_move(self, args):\n    api.Chart.DrawStaticText(\"mouseX\", f\"Mouse X: {args.MouseX}\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/MouseX/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/MouseX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.MouseY","kind":"property","name":"MouseY","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double MouseY {get;}","python":"chartMouseEventArgs.MouseY: float","summary":"Gets the Y-axis value of the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseMove += OnChartMouseMove;\n}\n\nprivate void OnChartMouseMove(ChartMouseEventArgs args)\n{\n    Chart.DrawStaticText(\"mouseY\", \"Mouse Y: \" + args.MouseY, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);\n}","python":"def on_start(self):\n    api.Chart.MouseMove += self.on_chart_mouse_move\n\ndef on_chart_mouse_move(self, args):\n    api.Chart.DrawStaticText(\"mouseY\", f\"Mouse Y: {args.MouseY}\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/MouseY/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/MouseY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.ShiftKey","kind":"property","name":"ShiftKey","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool ShiftKey {get;}","python":"chartMouseEventArgs.ShiftKey: bool","summary":"Defines whether the Shift key is pressed during the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    if (args.ShiftKey)\n        Chart.DrawIcon(\"shiftClick\", ChartIconType.Star, args.TimeValue, args.YValue, Color.Gold);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    if args.ShiftKey:\n        api.Chart.DrawIcon(\"shiftClick\", ChartIconType.Star, args.TimeValue, args.YValue, Color.Gold)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/ShiftKey/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/ShiftKey/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.TimeValue","kind":"property","name":"TimeValue","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public DateTime TimeValue {get;}","python":"chartMouseEventArgs.TimeValue: DateTime","summary":"Gets the time value on the X-axis where the mouse event occurs.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    Chart.DrawVerticalLine(\"clickedTime\", args.TimeValue, Color.Red);\n    Print(\"Clicked at time {0}\", args.TimeValue);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    api.Chart.DrawVerticalLine(\"clickedTime\", args.TimeValue, Color.Red)\n    api.Print(f\"Clicked at time {args.TimeValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/TimeValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/TimeValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"P:cAlgo.API.ChartMouseEventArgs.YValue","kind":"property","name":"YValue","type":"T:cAlgo.API.ChartMouseEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double YValue {get;}","python":"chartMouseEventArgs.YValue: float","summary":"Gets the Y-axis value of the mouse event.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseDown += OnChartMouseDown;\n}\n\nprivate void OnChartMouseDown(ChartMouseEventArgs args)\n{\n    Chart.DrawHorizontalLine(\"clickedPrice\", args.YValue, Color.Yellow);\n    Print(\"Clicked at price {0}\", args.YValue);\n}","python":"def on_start(self):\n    api.Chart.MouseDown += self.on_chart_mouse_down\n\ndef on_chart_mouse_down(self, args):\n    api.Chart.DrawHorizontalLine(\"clickedPrice\", args.YValue, Color.Yellow)\n    api.Print(f\"Clicked at price {args.YValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/YValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/YValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more)."}]}
{"id":"T:cAlgo.API.ChartMouseWheelEventArgs","kind":"class","name":"ChartMouseWheelEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartMouseWheelEventArgs : ChartMouseEventArgs","python":"ChartMouseWheelEventArgs","summary":"Provides data for the mouse wheel scroll event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartMouseWheelEventArgs\n    // ChartMouseWheelEventArgs derives from ChartMouseEventArgs\n    public partial class ChartMouseWheelEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.MouseWheel += Chart_MouseWheel;\n        }\n\n        private void Chart_MouseWheel(ChartMouseWheelEventArgs obj)\n        {\n            var text = string.Format(\"Wheel Delta: {0}\", obj.Delta);\n\n            Chart.DrawStaticText(\"Wheel\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.MouseWheel += self.on_chart_mouse_wheel\n\n    def on_chart_mouse_wheel(self, args):\n        text = f\"Wheel Delta: {args.Delta}\"\n        api.Chart.DrawStaticText(\"Wheel\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseWheelEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseWheelEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseWheel)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseWheel)."}]}
{"id":"P:cAlgo.API.ChartMouseWheelEventArgs.Delta","kind":"property","name":"Delta","type":"T:cAlgo.API.ChartMouseWheelEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int Delta {get;}","python":"chartMouseWheelEventArgs.Delta: int","summary":"Gets the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.MouseWheel += OnChartMouseWheel;\n}\n\nprivate void OnChartMouseWheel(ChartMouseWheelEventArgs args)\n{\n    var direction = args.Delta > 0 ? \"up\" : \"down\";\n    Print(\"Mouse wheel scrolled {0} by {1} detents\", direction, Math.Abs(args.Delta));\n}","python":"def on_start(self):\n    api.Chart.MouseWheel += self.on_chart_mouse_wheel\n\ndef on_chart_mouse_wheel(self, args):\n    direction = \"up\" if args.Delta > 0 else \"down\"\n    api.Print(f\"Mouse wheel scrolled {direction} by {abs(args.Delta)} detents\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseWheelEventArgs/Delta/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseWheelEventArgs/Delta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseWheel)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseWheel)."}]}
{"id":"T:cAlgo.API.ChartObject","kind":"interface","name":"ChartObject","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartObject","python":"ChartObject","summary":"Represents the chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartObject in Chart.Objects)\n{\n    Print(\"Name: {0} | Type: {1} | Interactive: {2} | Locked: {3}\", chartObject.Name, chartObject.ObjectType, chartObject.IsInteractive, chartObject.IsLocked);\n}","python":"for chartObject in api.Chart.Objects:\n    api.Print(f\"Name: {chartObject.Name} | Type: {chartObject.ObjectType} | Interactive: {chartObject.IsInteractive} | Locked: {chartObject.IsLocked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"string Comment {get; set;}","python":"chartObject.Comment: str","summary":"Gets or sets the comment for the chart object.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"The comment.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.Comment = \"Daily support level\";\nPrint(\"Comment: {0}\", line.Comment);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.Comment = \"Daily support level\"\napi.Print(f\"Comment: {line.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.IsAlive","kind":"property","name":"IsAlive","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsAlive {get;}","python":"chartObject.IsAlive: bool","summary":"Defines if the chart object still exists on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nChart.RemoveObject(line.Name);\nPrint(\"Line still on the chart: {0}\", line.IsAlive);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\napi.Chart.RemoveObject(line.Name)\napi.Print(f\"Line still on the chart: {line.IsAlive}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.IsHidden","kind":"property","name":"IsHidden","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsHidden {get; set;}","python":"chartObject.IsHidden: bool","summary":"Gets or sets if object is hidden and not visible to user or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.IsHidden = true;\nPrint(\"Line is hidden: {0}\", line.IsHidden);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.IsHidden = True\napi.Print(f\"Line is hidden: {line.IsHidden}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.IsInteractive","kind":"property","name":"IsInteractive","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsInteractive {get; set;}","python":"chartObject.IsInteractive: bool","summary":"Defines whether the instance is interactive. The non-interactive chart objects cannot be selected, have no hover effect and cannot be searched. Available only for the current cBot or Indicator and will be removed when the cBot/Indicator stops.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.IsInteractive = true;\nPrint(\"User can select and move the line: {0}\", line.IsInteractive);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.IsInteractive = True\napi.Print(f\"User can select and move the line: {line.IsInteractive}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.IsLocked","kind":"property","name":"IsLocked","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsLocked {get; set;}","python":"chartObject.IsLocked: bool","summary":"Gets or sets if the object is locked or not, user can't move locked objects unless unlocked.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.IsInteractive = true;\nline.IsLocked = true;\nPrint(\"Line is locked: {0}\", line.IsLocked);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.IsInteractive = True\nline.IsLocked = True\napi.Print(f\"Line is locked: {line.IsLocked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"string Name {get;}","python":"chartObject.Name: str","summary":"Gets the chart object name - the unique identifier for the object in the current chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nPrint(\"Object name: {0}\", line.Name);\nvar found = Chart.FindObject(line.Name);\nPrint(\"Found by name: {0}\", found != null);","python":"line = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\napi.Print(f\"Object name: {line.Name}\")\nfound = api.Chart.FindObject(line.Name)\napi.Print(f\"Found by name: {found is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.ObjectType","kind":"property","name":"ObjectType","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType ObjectType {get;}","python":"chartObject.ObjectType: ChartObjectType","summary":"Gets the chart object type.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartObject in Chart.Objects)\n{\n    if (chartObject.ObjectType == ChartObjectType.TrendLine)\n        Print(\"Trend line found: {0}\", chartObject.Name);\n}","python":"for chartObject in api.Chart.Objects:\n    if chartObject.ObjectType == ChartObjectType.TrendLine:\n        api.Print(f\"Trend line found: {chartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartObject.ZIndex","kind":"property","name":"ZIndex","type":"T:cAlgo.API.ChartObject","namespace":"cAlgo.API","group":"Drawings","csharp":"int ZIndex {get; set;}","python":"chartObject.ZIndex: int","summary":"Gets or sets the location of a chart object on the Z-axis in respect to the other chart objects.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nvar line = Chart.DrawHorizontalLine(\"support\", Bars.LowPrices.LastValue, Color.Green);\nline.ZIndex = rectangle.ZIndex + 1;\nPrint(\"Line Z-index: {0} | Rectangle Z-index: {1}\", line.ZIndex, rectangle.ZIndex);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nline = api.Chart.DrawHorizontalLine(\"support\", api.Bars.LowPrices.LastValue, Color.Green)\nline.ZIndex = rectangle.ZIndex + 1\napi.Print(f\"Line Z-index: {line.ZIndex} | Rectangle Z-index: {rectangle.ZIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartObjectEventArgs","kind":"class","name":"ChartObjectEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class ChartObjectEventArgs","python":"ChartObjectEventArgs","summary":"Provides data for the chart object change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;\n}\n\nprivate void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    ChartObjectEventArgs chartObjectArgs = args;\n    Print(\"Object: {0} | Type: {1} | Chart: {2}\", chartObjectArgs.ChartObject.Name, chartObjectArgs.ChartObject.ObjectType, chartObjectArgs.Chart.SymbolName);\n}","python":"def on_start(self):\n    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\ndef on_chart_object_hover_changed(self, args):\n    api.Print(f\"Object: {args.ChartObject.Name} | Type: {args.ChartObject.ObjectType} | Chart: {args.Chart.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectEventArgs.Area","kind":"property","name":"Area","type":"T:cAlgo.API.ChartObjectEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea Area {get;}","python":"chartObjectEventArgs.Area: ChartArea","summary":"Gets the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;\n}\n\nprivate void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    var areaName = args.Area == args.Chart ? \"main area\" : \"indicator area\";\n    Print(\"Hovered object is on the {0}\", areaName);\n}","python":"def on_start(self):\n    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\ndef on_chart_object_hover_changed(self, args):\n    api.Print(f\"Hovered object area height: {args.Area.Height}, objects in area: {args.Area.Objects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/Area/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/Area/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartObjectEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartObjectEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;\n}\n\nprivate void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    Print(\"Object hovered on chart {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\ndef on_chart_object_hover_changed(self, args):\n    api.Print(f\"Object hovered on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectEventArgs.ChartObject","kind":"property","name":"ChartObject","type":"T:cAlgo.API.ChartObjectEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartObject ChartObject {get;}","python":"chartObjectEventArgs.ChartObject: ChartObject","summary":"Gets the chart object.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObject","pythonType":"ChartObject","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.DrawHorizontalLine(\"line\", Symbol.Bid, Color.Red);\n    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;\n}\n\nprivate void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    if (args.ChartObject is ChartHorizontalLine line)\n        Print(\"Horizontal line {0} at price {1}\", line.Name, line.Y);\n}","python":"def on_start(self):\n    api.Chart.DrawHorizontalLine(\"line\", api.Symbol.Bid, Color.Red)\n    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\ndef on_chart_object_hover_changed(self, args):\n    if args.ChartObject.ObjectType == ChartObjectType.HorizontalLine:\n        api.Print(f\"Horizontal line {args.ChartObject.Name} is hovered\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/ChartObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/ChartObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartObjectHoverChangedEventArgs","kind":"class","name":"ChartObjectHoverChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectHoverChangedEventArgs : ChartObjectEventArgs","python":"ChartObjectHoverChangedEventArgs","summary":"Provides data for the mouse hover over a chart object event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectHoverChangedEventArgs\n    // ChartObjectHoverChangedEventArgs is derived from ChartObjectsEventArgs\n    // Draw an object and move mouse over it\n    public partial class ChartObjectHoverChangedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectHoverChanged += Chart_ObjectHoverChanged;\n        }\n\n        private void Chart_ObjectHoverChanged(ChartObjectHoverChangedEventArgs obj)\n        {\n            Chart.DrawStaticText(\"hover\", string.Format(\"Is Object Hovered: {0}\", obj.IsObjectHovered), VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\n    def on_chart_object_hover_changed(self, args):\n        api.Chart.DrawStaticText(\"hover\", f\"Is Object Hovered: {args.IsObjectHovered}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectHoverChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectHoverChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectHoverChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectHoverChanged)."}]}
{"id":"P:cAlgo.API.ChartObjectHoverChangedEventArgs.IsObjectHovered","kind":"property","name":"IsObjectHovered","type":"T:cAlgo.API.ChartObjectHoverChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool IsObjectHovered {get;}","python":"chartObjectHoverChangedEventArgs.IsObjectHovered: bool","summary":"Defines if the mouse is hovered over the chart object.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;\n}\n\nprivate void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)\n{\n    var state = args.IsObjectHovered ? \"entered\" : \"left\";\n    Print(\"Mouse {0} object {1}\", state, args.ChartObject.Name);\n}","python":"def on_start(self):\n    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed\n\ndef on_chart_object_hover_changed(self, args):\n    state = \"entered\" if args.IsObjectHovered else \"left\"\n    api.Print(f\"Mouse {state} object {args.ChartObject.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectHoverChangedEventArgs/IsObjectHovered/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectHoverChangedEventArgs/IsObjectHovered/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectHoverChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectHoverChanged)."}]}
{"id":"T:cAlgo.API.ChartObjectType","kind":"enum","name":"ChartObjectType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public enum ChartObjectType","python":"ChartObjectType","summary":"The chart object types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLines = Chart.FindAllObjects(ChartObjectType.TrendLine);\nPrint(\"Trend lines on the chart: {0}\", trendLines.Length);\nforeach (var chartObject in Chart.Objects)\n    Print(\"{0} is a {1}\", chartObject.Name, chartObject.ObjectType);","python":"trendLines = api.Chart.FindAllObjects(ChartObjectType.TrendLine)\napi.Print(f\"Trend lines on the chart: {trendLines.Length}\")\nfor chartObject in api.Chart.Objects:\n    api.Print(f\"{chartObject.Name} is a {chartObject.ObjectType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.HorizontalLine","kind":"enum value","name":"HorizontalLine","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.HorizontalLine;","python":"ChartObjectType.HorizontalLine","summary":"The horizontal line. The line parallel to the X-axis that can be set on any Y-axis value.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.VerticalLine","kind":"enum value","name":"VerticalLine","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.VerticalLine;","python":"ChartObjectType.VerticalLine","summary":"The vertical line. The line parallel to the Y-axis that can be set on any X-axis value. used to mark certain time event or chart bar on the chart.TBD","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.TrendLine","kind":"enum value","name":"TrendLine","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.TrendLine;","python":"ChartObjectType.TrendLine","summary":"The trend line. The line with the start and end points that can be drawn in any direction on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Text","kind":"enum value","name":"Text","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Text;","python":"ChartObjectType.Text","summary":"The text that can be placed directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.StaticText","kind":"enum value","name":"StaticText","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.StaticText;","python":"ChartObjectType.StaticText","summary":"The static positioned text that can be placed on fixed locations in the chart","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Icon","kind":"enum value","name":"Icon","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Icon;","python":"ChartObjectType.Icon","summary":"The icon. The collection of icons that can be placed directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.FibonacciRetracement","kind":"enum value","name":"FibonacciRetracement","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.FibonacciRetracement;","python":"ChartObjectType.FibonacciRetracement","summary":"The Fibonacci Retracement that can be placed directly in the chart, bound to X-Y axises. - a charting technique that uses the Fibonacci ratios to indicate the areas of support or resistance.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.FibonacciExpansion","kind":"enum value","name":"FibonacciExpansion","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.FibonacciExpansion;","python":"ChartObjectType.FibonacciExpansion","summary":"The Fibonacci Expansion that can be placed directly in the chart, bound to X-Y axises. - a charting technique used to plot possible levels of support and resistance by tracking not only the primary trend but also the retracement.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.FibonacciFan","kind":"enum value","name":"FibonacciFan","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.FibonacciFan;","python":"ChartObjectType.FibonacciFan","summary":"The Fibonacci Fan that can be placed directly in the chart, bound to X-Y axises. a charting technique used to estimate support and resistance levels by drawing the new trend lines based on the Fibonacci Retracement levels.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.AndrewsPitchfork","kind":"enum value","name":"AndrewsPitchfork","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.AndrewsPitchfork;","python":"ChartObjectType.AndrewsPitchfork","summary":"The Andrews Pitchfork that can be placed directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.GannFan","kind":"enum value","name":"GannFan","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.GannFan;","python":"ChartObjectType.GannFan","summary":"The Gann Fan that can be placed directly in the chart, bound to X-Y axises. A charting technique used to estimate support and resistance levels by drawing trend lines at different Gann angles (1x1, 2x1, 1x2, etc.).","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.GannBox","kind":"enum value","name":"GannBox","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.GannBox;","python":"ChartObjectType.GannBox","summary":"The Gann Box that can be placed directly in the chart, bound to X-Y axises. A charting technique that combines Gann angles with horizontal and vertical lines to create a box structure for analyzing support and resistance levels.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.GannSquare","kind":"enum value","name":"GannSquare","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.GannSquare;","python":"ChartObjectType.GannSquare","summary":"The Gann Square that can be placed directly in the chart, bound to X-Y axises. A charting technique that combines Gann box grid, fan rays from the start point, and arcs at level intersections for comprehensive market geometry analysis.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.GannSquareFixed","kind":"enum value","name":"GannSquareFixed","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.GannSquareFixed;","python":"ChartObjectType.GannSquareFixed","summary":"The Gann Square Fixed that can be placed directly in the chart with fixed screen-space size. A charting technique with a single anchor point and control point that renders a 5x5 grid, Gann fan rays, and circular arcs independent of zoom level.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Rectangle","kind":"enum value","name":"Rectangle","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Rectangle;","python":"ChartObjectType.Rectangle","summary":"The rectangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Ellipse","kind":"enum value","name":"Ellipse","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Ellipse;","python":"ChartObjectType.Ellipse","summary":"The ellipse of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Triangle","kind":"enum value","name":"Triangle","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Triangle;","python":"ChartObjectType.Triangle","summary":"The triangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.EquidistantChannel","kind":"enum value","name":"EquidistantChannel","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.EquidistantChannel;","python":"ChartObjectType.EquidistantChannel","summary":"The equidistant channel that can be placed directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.Drawing","kind":"enum value","name":"Drawing","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.Drawing;","python":"ChartObjectType.Drawing","summary":"The user drawings in the chart with Pencil","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ArrowLine","kind":"enum value","name":"ArrowLine","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ArrowLine;","python":"ChartObjectType.ArrowLine","summary":"The arrow line.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.FibonacciTimezones","kind":"enum value","name":"FibonacciTimezones","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.FibonacciTimezones;","python":"ChartObjectType.FibonacciTimezones","summary":"The Fibonacci Timezones","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.RiskReward","kind":"enum value","name":"RiskReward","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.RiskReward;","python":"ChartObjectType.RiskReward","summary":"The Risk Reward","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.FibonacciArc","kind":"enum value","name":"FibonacciArc","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.FibonacciArc;","python":"ChartObjectType.FibonacciArc","summary":"The Fibonacci Arc that can be placed directly in the chart, bound to X-Y axises. A charting technique using concentric arcs drawn at the Fibonacci levels off two anchor points to estimate support and resistance zones in both price and time.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ElliottImpulse","kind":"enum value","name":"ElliottImpulse","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ElliottImpulse;","python":"ChartObjectType.ElliottImpulse","summary":"The Elliott Impulse Wave (1-2-3-4-5). A five-wave motive pattern drawn as a labelled polyline over six pivots.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ElliottCorrection","kind":"enum value","name":"ElliottCorrection","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ElliottCorrection;","python":"ChartObjectType.ElliottCorrection","summary":"The Elliott Correction Wave (A-B-C). A three-wave corrective pattern drawn as a labelled polyline over four pivots.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ElliottTriangle","kind":"enum value","name":"ElliottTriangle","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ElliottTriangle;","python":"ChartObjectType.ElliottTriangle","summary":"The Elliott Triangle Wave (A-B-C-D-E). A five-leg triangle drawn as a labelled polyline over six pivots.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ElliottDoubleCombo","kind":"enum value","name":"ElliottDoubleCombo","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ElliottDoubleCombo;","python":"ChartObjectType.ElliottDoubleCombo","summary":"The Elliott Double Combo Wave (W-X-Y). A complex correction drawn as a labelled polyline over four pivots.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartObjectType.ElliottTripleCombo","kind":"enum value","name":"ElliottTripleCombo","type":"T:cAlgo.API.ChartObjectType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartObjectType.ElliottTripleCombo;","python":"ChartObjectType.ElliottTripleCombo","summary":"The Elliott Triple Combo Wave (W-X-Y-X-Z). An extended complex correction drawn as a labelled polyline over six pivots.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartObjectType","pythonType":"ChartObjectType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObjectType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartObjectsAddedEventArgs","kind":"class","name":"ChartObjectsAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsAddedEventArgs : ChartObjectsEventArgs","python":"ChartObjectsAddedEventArgs","summary":"Provides data for the adding chart objects event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectsAddedEventArgs\n    // ChartObjectsAddedEventArgs is derived from ChartObjectsEventArgs\n    public partial class ChartObjectsAddedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectsAdded += Chart_ObjectsAdded;\n        }\n\n        private void Chart_ObjectsAdded(ChartObjectsAddedEventArgs obj)\n        {\n            Print(\"{0} objects added to chart\", obj.ChartObjects.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectsAdded += self.on_chart_objects_added\n\n    def on_chart_objects_added(self, args):\n        print(f\"{args.ChartObjects.Count} objects added to chart\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartObjectsEventArgs","kind":"class","name":"ChartObjectsEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class ChartObjectsEventArgs","python":"ChartObjectsEventArgs","summary":"Provides data for the chart objects change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectsEventArgs\n    // All chart objects related events args are derived from ChartObjectsEventArgs\n    public partial class ChartObjectsEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectsRemoved += Chart_ObjectsRemoved;\n        }\n\n        private void Chart_ObjectsRemoved(ChartObjectsRemovedEventArgs obj)\n        {\n            var chartObjectsEventArgs = obj as ChartObjectsEventArgs;\n\n            Print(\"{0} objects removed from chart\", chartObjectsEventArgs.ChartObjects.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectsRemoved += self.on_chart_objects_removed\n\n    def on_chart_objects_removed(self, args):\n        print(f\"{args.ChartObjects.Count} objects removed from chart\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectsEventArgs.Area","kind":"property","name":"Area","type":"T:cAlgo.API.ChartObjectsEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea Area {get;}","python":"chartObjectsEventArgs.Area: ChartArea","summary":"Gets the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsAdded += OnChartObjectsAdded;\n}\n\nprivate void OnChartObjectsAdded(ChartObjectsAddedEventArgs args)\n{\n    Print(\"The area now has {0} objects\", args.Area.Objects.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsAdded += self.on_chart_objects_added\n\ndef on_chart_objects_added(self, args):\n    api.Print(f\"The area now has {args.Area.Objects.Count} objects\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Area/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Area/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectsEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartObjectsEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartObjectsEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsAdded += OnChartObjectsAdded;\n}\n\nprivate void OnChartObjectsAdded(ChartObjectsAddedEventArgs args)\n{\n    Print(\"Objects added to chart {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.ObjectsAdded += self.on_chart_objects_added\n\ndef on_chart_objects_added(self, args):\n    api.Print(f\"Objects added to chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartObjectsEventArgs.ChartObjects","kind":"property","name":"ChartObjects","type":"T:cAlgo.API.ChartObjectsEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public IReadonlyList<ChartObject> ChartObjects {get;}","python":"chartObjectsEventArgs.ChartObjects: IReadonlyList[ChartObject]","summary":"Gets chart objects.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartObject>","pythonType":"IReadonlyList[ChartObject]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsAdded += OnChartObjectsAdded;\n}\n\nprivate void OnChartObjectsAdded(ChartObjectsAddedEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Added object: {0} ({1})\", chartObject.Name, chartObject.ObjectType);\n}","python":"def on_start(self):\n    api.Chart.ObjectsAdded += self.on_chart_objects_added\n\ndef on_chart_objects_added(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Added object: {chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/ChartObjects/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsEventArgs/ChartObjects/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartObjectsMoveEndedEventArgs","kind":"class","name":"ChartObjectsMoveEndedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsMoveEndedEventArgs : ChartObjectsEventArgs","python":"ChartObjectsMoveEndedEventArgs","summary":"Provides data for the chart objects move ended event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoveEnded += OnChartObjectsMoveEnded;\n}\n\nprivate void OnChartObjectsMoveEnded(ChartObjectsMoveEndedEventArgs args)\n{\n    Print(\"{0} object(s) moved on chart {1} {2}\", args.ChartObjects.Count, args.Chart.SymbolName, args.Chart.TimeFrame);\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoveEnded += self.on_chart_objects_move_ended\n\ndef on_chart_objects_move_ended(self, args):\n    api.Print(f\"{args.ChartObjects.Count} object(s) moved on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMoveEndedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMoveEndedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsMoveEnded)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsMoveEnded)."}]}
{"id":"T:cAlgo.API.ChartObjectsMoveStartedEventArgs","kind":"class","name":"ChartObjectsMoveStartedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsMoveStartedEventArgs : ChartObjectsEventArgs","python":"ChartObjectsMoveStartedEventArgs","summary":"Provides data for the chart objects move started event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoveStarted += OnChartObjectsMoveStarted;\n}\n\nprivate void OnChartObjectsMoveStarted(ChartObjectsMoveStartedEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n        Print(\"Started moving {0} ({1})\", chartObject.Name, chartObject.ObjectType);\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoveStarted += self.on_chart_objects_move_started\n\ndef on_chart_objects_move_started(self, args):\n    for chartObject in args.ChartObjects:\n        api.Print(f\"Started moving {chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMoveStartedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMoveStartedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsMoveStarted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsMoveStarted)."}]}
{"id":"T:cAlgo.API.ChartObjectsMovingEventArgs","kind":"class","name":"ChartObjectsMovingEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsMovingEventArgs : ChartObjectsEventArgs","python":"ChartObjectsMovingEventArgs","summary":"Provides data for the chart objects moving event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsMoving += OnChartObjectsMoving;\n}\n\nprivate void OnChartObjectsMoving(ChartObjectsMovingEventArgs args)\n{\n    foreach (var chartObject in args.ChartObjects)\n    {\n        if (chartObject is ChartHorizontalLine line)\n            Chart.DrawStaticText(\"movingPrice\", \"Line price: \" + line.Y, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\n    }\n}","python":"def on_start(self):\n    api.Chart.ObjectsMoving += self.on_chart_objects_moving\n\ndef on_chart_objects_moving(self, args):\n    for chartObject in args.ChartObjects:\n        api.Chart.DrawStaticText(\"movingObject\", f\"Moving: {chartObject.Name}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMovingEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsMovingEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsMoving)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsMoving)."}]}
{"id":"T:cAlgo.API.ChartObjectsRemovedEventArgs","kind":"class","name":"ChartObjectsRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsRemovedEventArgs : ChartObjectsEventArgs","python":"ChartObjectsRemovedEventArgs","summary":"Provides data for the removing chart objects event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectsRemovedEventArgs\n    // ChartObjectsRemovedEventArgs is derived from ChartObjectsEventArgs\n    public partial class ChartObjectsRemovedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectsRemoved += Chart_ObjectsRemoved;\n        }\n\n        private void Chart_ObjectsRemoved(ChartObjectsRemovedEventArgs obj)\n        {\n            Print(\"{0} objects removed from chart\", obj.ChartObjects.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectsRemoved += self.on_chart_objects_removed\n\n    def on_chart_objects_removed(self, args):\n        print(f\"{args.ChartObjects.Count} objects removed from chart\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartObjectsSelectionChangedEventArgs","kind":"class","name":"ChartObjectsSelectionChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsSelectionChangedEventArgs","python":"ChartObjectsSelectionChangedEventArgs","summary":"Provides data for the chart objects selecting or deselecting event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectsSelectionChangedEventArgs\n    // Draw an object, select it and unselect it\n    public partial class ChartObjectsSelectionChangedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectsSelectionChanged += Chart_ObjectsSelectionChanged;\n        }\n\n        private void Chart_ObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs obj)\n        {\n            Print(\"Added objects #: {0} | Removed Objects #: {1}\", obj.ObjectsAddedToSelection.Count, obj.ObjectsRemovedFromSelection.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectsSelectionChanged += self.on_chart_objects_selection_changed\n\n    def on_chart_objects_selection_changed(self, args):\n        print(f\"Added objects #: {args.ObjectsAddedToSelection.Count} | Removed Objects #: {args.ObjectsRemovedFromSelection.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."}]}
{"id":"P:cAlgo.API.ChartObjectsSelectionChangedEventArgs.Area","kind":"property","name":"Area","type":"T:cAlgo.API.ChartObjectsSelectionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea Area {get;}","python":"chartObjectsSelectionChangedEventArgs.Area: ChartArea","summary":"A chart area where event occured","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsSelectionChanged += OnChartObjectsSelectionChanged;\n}\n\nprivate void OnChartObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs args)\n{\n    Print(\"Selection changed in an area with {0} objects\", args.Area.Objects.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsSelectionChanged += self.on_chart_objects_selection_changed\n\ndef on_chart_objects_selection_changed(self, args):\n    api.Print(f\"Selection changed in an area with {args.Area.Objects.Count} objects\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/Area/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/Area/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."}]}
{"id":"P:cAlgo.API.ChartObjectsSelectionChangedEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartObjectsSelectionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartObjectsSelectionChangedEventArgs.Chart: Chart","summary":"A chart where event occured","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsSelectionChanged += OnChartObjectsSelectionChanged;\n}\n\nprivate void OnChartObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs args)\n{\n    Print(\"Selection changed on chart {0} {1}, selected objects: {2}\", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.SelectedObjects.Count);\n}","python":"def on_start(self):\n    api.Chart.ObjectsSelectionChanged += self.on_chart_objects_selection_changed\n\ndef on_chart_objects_selection_changed(self, args):\n    api.Print(f\"Selection changed on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}, selected objects: {args.Chart.SelectedObjects.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."}]}
{"id":"P:cAlgo.API.ChartObjectsSelectionChangedEventArgs.ObjectsAddedToSelection","kind":"property","name":"ObjectsAddedToSelection","type":"T:cAlgo.API.ChartObjectsSelectionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public IReadonlyList<ChartObject> ObjectsAddedToSelection {get;}","python":"chartObjectsSelectionChangedEventArgs.ObjectsAddedToSelection: IReadonlyList[ChartObject]","summary":"A list of objects that were added to selection","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartObject>","pythonType":"IReadonlyList[ChartObject]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsSelectionChanged += OnChartObjectsSelectionChanged;\n}\n\nprivate void OnChartObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs args)\n{\n    foreach (var chartObject in args.ObjectsAddedToSelection)\n        Print(\"Selected: {0} ({1})\", chartObject.Name, chartObject.ObjectType);\n}","python":"def on_start(self):\n    api.Chart.ObjectsSelectionChanged += self.on_chart_objects_selection_changed\n\ndef on_chart_objects_selection_changed(self, args):\n    for chartObject in args.ObjectsAddedToSelection:\n        api.Print(f\"Selected: {chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/ObjectsAddedToSelection/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/ObjectsAddedToSelection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."}]}
{"id":"P:cAlgo.API.ChartObjectsSelectionChangedEventArgs.ObjectsRemovedFromSelection","kind":"property","name":"ObjectsRemovedFromSelection","type":"T:cAlgo.API.ChartObjectsSelectionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public IReadonlyList<ChartObject> ObjectsRemovedFromSelection {get;}","python":"chartObjectsSelectionChangedEventArgs.ObjectsRemovedFromSelection: IReadonlyList[ChartObject]","summary":"A list of objects that were removed from selection","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<ChartObject>","pythonType":"IReadonlyList[ChartObject]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ObjectsSelectionChanged += OnChartObjectsSelectionChanged;\n}\n\nprivate void OnChartObjectsSelectionChanged(ChartObjectsSelectionChangedEventArgs args)\n{\n    foreach (var chartObject in args.ObjectsRemovedFromSelection)\n        Print(\"Deselected: {0} ({1})\", chartObject.Name, chartObject.ObjectType);\n}","python":"def on_start(self):\n    api.Chart.ObjectsSelectionChanged += self.on_chart_objects_selection_changed\n\ndef on_chart_objects_selection_changed(self, args):\n    for chartObject in args.ObjectsRemovedFromSelection:\n        api.Print(f\"Deselected: {chartObject.Name} ({chartObject.ObjectType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/ObjectsRemovedFromSelection/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsSelectionChangedEventArgs/ObjectsRemovedFromSelection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ObjectsSelectionChanged)."}]}
{"id":"T:cAlgo.API.ChartObjectsUpdatedEventArgs","kind":"class","name":"ChartObjectsUpdatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartObjectsUpdatedEventArgs : ChartObjectsEventArgs","python":"ChartObjectsUpdatedEventArgs","summary":"Provides data for the chart objects update event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartObjectsUpdatedEventArgs\n    // Draw an object, and then modify it\n    public partial class ChartObjectsUpdatedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ObjectsUpdated += Chart_ObjectsUpdated;\n        }\n\n        private void Chart_ObjectsUpdated(ChartObjectsUpdatedEventArgs obj)\n        {\n            Print(\"Updated objects #: {0}\", obj.ChartObjects.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ObjectsUpdated += self.on_chart_Objects_updated\n\n    def on_chart_Objects_updated(self, args):\n        print(f\"Updated objects #: {args.ChartObjects.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsUpdatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectsUpdatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartPoint","kind":"struct","name":"ChartPoint","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public sealed struct ChartPoint : ValueType","python":"ChartPoint","summary":"Represents a single chart anchor point - a time value on the X-axis and a Y-axis value.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var start = new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40));\nvar waveA = new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30));\nvar waveB = new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20));\nvar waveC = new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10));\nChart.DrawElliottCorrection(\"correction\", start, waveA, waveB, waveC, Color.Blue);\nPrint(\"Wave C point: {0} at {1}\", waveC.Time, waveC.Y);","python":"start = ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40))\nwaveA = ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30))\nwaveB = ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20))\nwaveC = ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10))\napi.Chart.DrawElliottCorrection(\"correction\", start, waveA, waveB, waveC, Color.Blue)\napi.Print(f\"Wave C point: {waveC.Time} at {waveC.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartPoint.#ctor(System.DateTime,System.Double)","kind":"constructor","name":"ChartPoint","type":"T:cAlgo.API.ChartPoint","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartPoint(DateTime Time, double Y)","python":"ChartPoint(Time: DateTime, Y: float)","summary":"Represents a single chart anchor point - a time value on the X-axis and a Y-axis value.","remarks":null,"parameters":[{"name":"Time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time value on the X-axis."},{"name":"Y","csharpType":"double","pythonType":"float","summary":"The Y-axis value."}],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var start = new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40));\nvar waveA = new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30));\nvar waveB = new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20));\nvar waveC = new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10));\nChart.DrawElliottCorrection(\"correction\", start, waveA, waveB, waveC, Color.Blue);\nPrint(\"Wave C point: {0} at {1}\", waveC.Time, waveC.Y);","python":"start = ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40))\nwaveA = ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30))\nwaveB = ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20))\nwaveC = ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10))\napi.Chart.DrawElliottCorrection(\"correction\", start, waveA, waveB, waveC, Color.Blue)\napi.Print(f\"Wave C point: {waveC.Time} at {waveC.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartPoint.Time","kind":"property","name":"Time","type":"T:cAlgo.API.ChartPoint","namespace":"cAlgo.API","group":"Drawings","csharp":"public DateTime Time {get; set;}","python":"chartPoint.Time: DateTime","summary":"The time value on the X-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartPoint.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ChartPoint","namespace":"cAlgo.API","group":"Drawings","csharp":"public double Y {get; set;}","python":"chartPoint.Y: float","summary":"The Y-axis value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartPoint/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartPriceAxisPosition","kind":"enum","name":"ChartPriceAxisPosition","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum ChartPriceAxisPosition","python":"ChartPriceAxisPosition","summary":"Represents the side of the chart where the price axis is displayed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartPriceAxisPosition\n    public partial class ChartPriceAxisPositionSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.PriceAxisPosition = Chart.PriceAxisPosition == ChartPriceAxisPosition.Right\n                ? ChartPriceAxisPosition.Left\n                : ChartPriceAxisPosition.Right;\n\n            Print(\"Price axis position: {0}\", Chart.PriceAxisPosition);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        if api.Chart.PriceAxisPosition == ChartPriceAxisPosition.Right:\n            api.Chart.PriceAxisPosition = ChartPriceAxisPosition.Left\n        else:\n            api.Chart.PriceAxisPosition = ChartPriceAxisPosition.Right\n\n        print(f\"Price axis position: {api.Chart.PriceAxisPosition}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceAxisPosition.Right","kind":"enum value","name":"Right","type":"T:cAlgo.API.ChartPriceAxisPosition","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceAxisPosition.Right;","python":"ChartPriceAxisPosition.Right","summary":"The price axis is displayed on the right side of the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceAxisPosition","pythonType":"ChartPriceAxisPosition","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceAxisPosition.Left","kind":"enum value","name":"Left","type":"T:cAlgo.API.ChartPriceAxisPosition","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceAxisPosition.Left;","python":"ChartPriceAxisPosition.Left","summary":"The price axis is displayed on the left side of the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceAxisPosition","pythonType":"ChartPriceAxisPosition","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceAxisPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartPriceScaleEventArgs","kind":"class","name":"ChartPriceScaleEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartPriceScaleEventArgs","python":"ChartPriceScaleEventArgs","summary":"Provides data for the chart area price scale change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartPriceScaleEventArgs\n    public partial class ChartPriceScaleEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.PriceScaleChanged += Chart_PriceScaleChanged;\n\n            foreach (var indicatorArea in Chart.IndicatorAreas)\n            {\n                indicatorArea.PriceScaleChanged += Chart_PriceScaleChanged;\n            }\n        }\n\n        private void Chart_PriceScaleChanged(ChartPriceScaleEventArgs obj)\n        {\n            Print(\"Price scale changed | Is main area: {0} | Auto scale: {1} | Mode: {2} | Inverted: {3} | Ratio locked: {4}\",\n                obj.ChartArea == obj.Chart, obj.ChartArea.IsAutoScaleEnabled, obj.Chart.PriceScaleMode,\n                obj.Chart.IsPriceScaleInverted, obj.Chart.IsPriceToBarRatioLocked);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.PriceScaleChanged += self.on_price_scale_changed\n\n        for indicatorArea in api.Chart.IndicatorAreas:\n            indicatorArea.PriceScaleChanged += self.on_price_scale_changed\n\n    def on_price_scale_changed(self, args):\n        print(f\"Price scale changed | Auto scale: {args.ChartArea.IsAutoScaleEnabled} | Mode: {args.Chart.PriceScaleMode} | Inverted: {args.Chart.IsPriceScaleInverted} | Ratio locked: {args.Chart.IsPriceToBarRatioLocked}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartPriceScaleEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartPriceScaleEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartPriceScaleEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Chart.PriceScaleChanged += args => Print(\"Price scale changed on chart: {0} {1}\", args.Chart.SymbolName, args.Chart.TimeFrame);","python":"api.Chart.PriceScaleChanged += lambda args: print(f\"Price scale changed on chart: {args.Chart.SymbolName} {args.Chart.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartPriceScaleEventArgs.ChartArea","kind":"property","name":"ChartArea","type":"T:cAlgo.API.ChartPriceScaleEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea ChartArea {get;}","python":"chartPriceScaleEventArgs.ChartArea: ChartArea","summary":"Gets the chart area whose price scale changed. It is the chart itself for the main area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"foreach (var indicatorArea in Chart.IndicatorAreas)\n{\n    indicatorArea.PriceScaleChanged += args => Print(\"Indicator area price scale changed | Auto scale: {0} | Bottom Y: {1} | Top Y: {2}\", args.ChartArea.IsAutoScaleEnabled, args.ChartArea.BottomY, args.ChartArea.TopY);\n}","python":"for indicatorArea in api.Chart.IndicatorAreas:\n    indicatorArea.PriceScaleChanged += lambda args: print(f\"Indicator area price scale changed | Auto scale: {args.ChartArea.IsAutoScaleEnabled} | Bottom Y: {args.ChartArea.BottomY} | Top Y: {args.ChartArea.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartPriceScaleEventArgs/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartPriceScaleMode","kind":"enum","name":"ChartPriceScaleMode","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum ChartPriceScaleMode","python":"ChartPriceScaleMode","summary":"Represents the price scale mode of the chart main area.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartPriceScaleMode\n    public partial class ChartPriceScaleModeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.PriceScaleMode = PriceScaleMode;\n\n            Print(\"Price scale mode: {0} | Base price: {1}\", Chart.PriceScaleMode, Chart.PriceScaleBasePrice);\n\n            Chart.PriceScaleChanged += args => Print(\"Price scale mode changed to: {0}\", args.Chart.PriceScaleMode);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.PriceScaleMode = ChartPriceScaleMode.Percent\n\n        print(f\"Price scale mode: {api.Chart.PriceScaleMode} | Base price: {api.Chart.PriceScaleBasePrice}\")\n\n        api.Chart.PriceScaleChanged += lambda args: print(f\"Price scale mode changed to: {args.Chart.PriceScaleMode}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"PriceScaleMode\",\n      \"DisplayName\": \"Price Scale Mode\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.ChartPriceScaleMode\",\n      \"DefaultValue\": \"Percent\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceScaleMode.Regular","kind":"enum value","name":"Regular","type":"T:cAlgo.API.ChartPriceScaleMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceScaleMode.Regular;","python":"ChartPriceScaleMode.Regular","summary":"The regular linear price scale. The Y axis shows prices.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceScaleMode.Percent","kind":"enum value","name":"Percent","type":"T:cAlgo.API.ChartPriceScaleMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceScaleMode.Percent;","python":"ChartPriceScaleMode.Percent","summary":"The percentage price scale. The Y axis shows the percentage change of the price from the base price, which is the close price of the first visible bar. Auto scale is always enabled in this mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceScaleMode.IndexedTo100","kind":"enum value","name":"IndexedTo100","type":"T:cAlgo.API.ChartPriceScaleMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceScaleMode.IndexedTo100;","python":"ChartPriceScaleMode.IndexedTo100","summary":"The indexed to 100 price scale. The Y axis shows the price as an index where the base price, the close price of the first visible bar, equals 100. Auto scale is always enabled in this mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartPriceScaleMode.Logarithmic","kind":"enum value","name":"Logarithmic","type":"T:cAlgo.API.ChartPriceScaleMode","namespace":"cAlgo.API","group":"Chart","csharp":"ChartPriceScaleMode.Logarithmic;","python":"ChartPriceScaleMode.Logarithmic","summary":"The logarithmic price scale. Equal vertical distances represent equal percentage changes of the price. Zero and negative prices are drawn on a logarithmic scale mirrored below zero.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRectangle","kind":"interface","name":"ChartRectangle","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public interface ChartRectangle","python":"ChartRectangle","summary":"Represents the Rectangle chart object. A rectangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawRectangle method to draw a rectangle\n    public partial class ChartRectangleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;\n\n            var rectangle = Chart.DrawRectangle(\"rectangle_sample\", Chart.FirstVisibleBarIndex, Bars.LowPrices.Minimum(period), Chart.LastVisibleBarIndex, Bars.HighPrices.Maximum(period), Color.FromArgb(100, Color.Red));\n\n            rectangle.IsFilled = true;\n            rectangle.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        period = api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex\n        rectangle = api.Chart.DrawRectangle(\"rectangle_sample\", api.Chart.FirstVisibleBarIndex, Functions.Minimum(api.Bars.LowPrices, period), api.Chart.LastVisibleBarIndex, Functions.Maximum(api.Bars.HighPrices, period), Color.FromArgb(100, Color.Red))\n        rectangle.IsFilled = True\n        rectangle.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRectangle.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartRectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time1 {get; set;}","python":"chartRectangle.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nrectangle.Time1 = Bars.OpenTimes.Last(30);\nPrint(\"Zone start time: {0}\", rectangle.Time1);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nrectangle.Time1 = api.Bars.OpenTimes.Last(30)\napi.Print(f\"Zone start time: {rectangle.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRectangle.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartRectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time2 {get; set;}","python":"chartRectangle.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nrectangle.Time2 = Bars.OpenTimes.LastValue.AddHours(12);\nPrint(\"Zone end time: {0}\", rectangle.Time2);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nrectangle.Time2 = api.Bars.OpenTimes.LastValue.AddHours(12)\napi.Print(f\"Zone end time: {rectangle.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRectangle.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartRectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y1 {get; set;}","python":"chartRectangle.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nrectangle.Y1 = Bars.LowPrices.Last(20) - 10 * Symbol.PipSize;\nPrint(\"Zone bottom: {0}\", rectangle.Y1);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nrectangle.Y1 = api.Bars.LowPrices.Last(20) - 10 * api.Symbol.PipSize\napi.Print(f\"Zone bottom: {rectangle.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRectangle.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartRectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y2 {get; set;}","python":"chartRectangle.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue));\nrectangle.Y2 = Bars.HighPrices.LastValue + 10 * Symbol.PipSize;\nPrint(\"Zone top: {0}\", rectangle.Y2);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(80, Color.Blue))\nrectangle.Y2 = api.Bars.HighPrices.LastValue + 10 * api.Symbol.PipSize\napi.Print(f\"Zone top: {rectangle.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartRectangle/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartRiskReward","kind":"interface","name":"ChartRiskReward","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartRiskReward","python":"ChartRiskReward","summary":"Represents the risk reward chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var riskRewardType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1);\n\n        var riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\n\n        riskReward.IsInteractive = true;\n\n        Print($\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        riskRewardType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1)\n        riskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\n        riskReward.IsInteractive = True\n        print(f\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.EntryPrice","kind":"property","name":"EntryPrice","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double EntryPrice {get; set;}","python":"chartRiskReward.EntryPrice: float","summary":"Gets or sets the entry price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Limit, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.EntryPrice = Symbol.Bid - 20 * Symbol.PipSize;\nPrint(\"Entry price: {0}\", riskReward.EntryPrice);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Limit, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.EntryPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\napi.Print(f\"Entry price: {riskReward.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/EntryPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/EntryPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.IsFixedRatio","kind":"property","name":"IsFixedRatio","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsFixedRatio {get; set;}","python":"chartRiskReward.IsFixedRatio: bool","summary":"Gets or sets if risk reward ratio is fixed or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.IsFixedRatio = true;\nriskReward.RiskRewardRatio = 2;\nPrint(\"Ratio is fixed: {0}\", riskReward.IsFixedRatio);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.IsFixedRatio = True\nriskReward.RiskRewardRatio = 2\napi.Print(f\"Ratio is fixed: {riskReward.IsFixedRatio}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/IsFixedRatio/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/IsFixedRatio/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.IsMarketRange","kind":"property","name":"IsMarketRange","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsMarketRange {get; set;}","python":"chartRiskReward.IsMarketRange: bool","summary":"Gets or sets if order type is market range.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.IsMarketRange = true;\nriskReward.MarketRangePips = 2;\nPrint(\"Market range order: {0}\", riskReward.IsMarketRange);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.IsMarketRange = True\nriskReward.MarketRangePips = 2\napi.Print(f\"Market range order: {riskReward.IsMarketRange}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/IsMarketRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/IsMarketRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.LimitRangePips","kind":"property","name":"LimitRangePips","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double LimitRangePips {get; set;}","python":"chartRiskReward.LimitRangePips: float","summary":"Gets or sets order limit range pips amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask + 10 * Symbol.PipSize, OrderType.StopLimit, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.LimitRangePips = 2;\nPrint(\"Limit range in pips: {0}\", riskReward.LimitRangePips);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask + 10 * api.Symbol.PipSize, OrderType.StopLimit, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.LimitRangePips = 2\napi.Print(f\"Limit range in pips: {riskReward.LimitRangePips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/LimitRangePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/LimitRangePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.MarketRangePips","kind":"property","name":"MarketRangePips","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double MarketRangePips {get; set;}","python":"chartRiskReward.MarketRangePips: float","summary":"Gets or sets order market range pips amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.IsMarketRange = true;\nriskReward.MarketRangePips = 3;\nPrint(\"Market range in pips: {0}\", riskReward.MarketRangePips);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.IsMarketRange = True\nriskReward.MarketRangePips = 3\napi.Print(f\"Market range in pips: {riskReward.MarketRangePips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/MarketRangePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/MarketRangePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.OrderType","kind":"property","name":"OrderType","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"OrderType OrderType {get; set;}","python":"chartRiskReward.OrderType: OrderType","summary":"Gets or sets the order type.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.OrderType = OrderType.Limit;\nPrint(\"Order type: {0}\", riskReward.OrderType);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.OrderType = OrderType.Limit\napi.Print(f\"Order type: {riskReward.OrderType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RewardColor","kind":"property","name":"RewardColor","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"Color RewardColor {get; set;}","python":"chartRiskReward.RewardColor: Color","summary":"Gets or sets the reward color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RewardColor = Color.FromArgb(100, Color.Green);\nPrint(\"Reward color: {0}\", riskReward.RewardColor);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RewardColor = Color.FromArgb(100, Color.Green)\napi.Print(f\"Reward color: {riskReward.RewardColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RewardLineStyle","kind":"property","name":"RewardLineStyle","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle RewardLineStyle {get; set;}","python":"chartRiskReward.RewardLineStyle: LineStyle","summary":"Gets or sets the reward style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RewardLineStyle = LineStyle.Lines;\nPrint(\"Reward line style: {0}\", riskReward.RewardLineStyle);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RewardLineStyle = LineStyle.Lines\napi.Print(f\"Reward line style: {riskReward.RewardLineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardLineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardLineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RewardThickness","kind":"property","name":"RewardThickness","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"int RewardThickness {get; set;}","python":"chartRiskReward.RewardThickness: int","summary":"Gets or sets the reward thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RewardThickness = 2;\nPrint(\"Reward line thickness: {0}\", riskReward.RewardThickness);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RewardThickness = 2\napi.Print(f\"Reward line thickness: {riskReward.RewardThickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RewardThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RiskColor","kind":"property","name":"RiskColor","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"Color RiskColor {get; set;}","python":"chartRiskReward.RiskColor: Color","summary":"Gets or sets the risk color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RiskColor = Color.FromArgb(100, Color.Red);\nPrint(\"Risk color: {0}\", riskReward.RiskColor);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RiskColor = Color.FromArgb(100, Color.Red)\napi.Print(f\"Risk color: {riskReward.RiskColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RiskLineStyle","kind":"property","name":"RiskLineStyle","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle RiskLineStyle {get; set;}","python":"chartRiskReward.RiskLineStyle: LineStyle","summary":"Gets or sets the risk line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RiskLineStyle = LineStyle.Dots;\nPrint(\"Risk line style: {0}\", riskReward.RiskLineStyle);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RiskLineStyle = LineStyle.Dots\napi.Print(f\"Risk line style: {riskReward.RiskLineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskLineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskLineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RiskRewardRatio","kind":"property","name":"RiskRewardRatio","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double RiskRewardRatio {get; set;}","python":"chartRiskReward.RiskRewardRatio: float","summary":"Gets or sets risk reward ratio.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RiskRewardRatio = 3;\nPrint(\"Risk reward ratio: 1:{0}\", riskReward.RiskRewardRatio);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RiskRewardRatio = 3\napi.Print(f\"Risk reward ratio: 1:{riskReward.RiskRewardRatio}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskRewardRatio/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskRewardRatio/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.RiskThickness","kind":"property","name":"RiskThickness","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"int RiskThickness {get; set;}","python":"chartRiskReward.RiskThickness: int","summary":"Gets or sets the risk line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.RiskThickness = 2;\nPrint(\"Risk line thickness: {0}\", riskReward.RiskThickness);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.RiskThickness = 2\napi.Print(f\"Risk line thickness: {riskReward.RiskThickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/RiskThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.StopLossPrice","kind":"property","name":"StopLossPrice","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double StopLossPrice {get; set;}","python":"chartRiskReward.StopLossPrice: float","summary":"Gets or sets the stop loss price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.StopLossPrice = riskReward.EntryPrice - 30 * Symbol.PipSize;\nPrint(\"Stop loss price: {0}\", riskReward.StopLossPrice);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.StopLossPrice = riskReward.EntryPrice - 30 * api.Symbol.PipSize\napi.Print(f\"Stop loss price: {riskReward.StopLossPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/StopLossPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/StopLossPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.TakeProfitPrice","kind":"property","name":"TakeProfitPrice","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double TakeProfitPrice {get; set;}","python":"chartRiskReward.TakeProfitPrice: float","summary":"Gets or sets the take profit price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.TakeProfitPrice = riskReward.EntryPrice + 60 * Symbol.PipSize;\nPrint(\"Take profit price: {0}\", riskReward.TakeProfitPrice);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.TakeProfitPrice = riskReward.EntryPrice + 60 * api.Symbol.PipSize\napi.Print(f\"Take profit price: {riskReward.TakeProfitPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/TakeProfitPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/TakeProfitPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time1 {get; set;}","python":"chartRiskReward.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.Time1 = Bars.OpenTimes.Last(20);\nPrint(\"Risk reward start time: {0}\", riskReward.Time1);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.Time1 = api.Bars.OpenTimes.Last(20)\napi.Print(f\"Risk reward start time: {riskReward.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time2 {get; set;}","python":"chartRiskReward.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.Time2 = Bars.OpenTimes.LastValue.AddHours(4);\nPrint(\"Risk reward end time: {0}\", riskReward.Time2);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.Time2 = api.Bars.OpenTimes.LastValue.AddHours(4)\napi.Print(f\"Risk reward end time: {riskReward.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"TradeType TradeType {get; set;}","python":"chartRiskReward.TradeType: TradeType","summary":"Gets or sets the trade type.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Bid, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.TradeType = TradeType.Sell;\nPrint(\"Trade type: {0}\", riskReward.TradeType);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Bid, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.TradeType = TradeType.Sell\napi.Print(f\"Trade type: {riskReward.TradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.Type","kind":"property","name":"Type","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartRiskRewardType Type {get; set;}","python":"chartRiskReward.Type: ChartRiskRewardType","summary":"Gets or sets type.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardType","pythonType":"ChartRiskRewardType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nriskReward.Type = new ChartRiskRewardFixedSizeType(10000);\nPrint(\"Risk reward type: {0}\", riskReward.Type);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nriskReward.Type = ChartRiskRewardFixedSizeType(10000)\napi.Print(f\"Risk reward type: {riskReward.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartRiskReward.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.ChartRiskReward","namespace":"cAlgo.API","group":"Drawings","csharp":"double VolumeInUnits {get; set;}","python":"chartRiskReward.VolumeInUnits: float","summary":"Gets or sets the volume (in units).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1));\nvar volume = Symbol.NormalizeVolumeInUnits(riskReward.VolumeInUnits);\nPrint(\"Volume for a 1% risk: {0}\", volume);","python":"riskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1))\nvolume = api.Symbol.NormalizeVolumeInUnits(riskReward.VolumeInUnits)\napi.Print(f\"Volume for a 1% risk: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskReward/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartRiskRewardAmountType","kind":"enum","name":"ChartRiskRewardAmountType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public enum ChartRiskRewardAmountType","python":"ChartRiskRewardAmountType","summary":"Represents different amount types for chart risk reward.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var riskRewardType = new ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 1);\n\n        var riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\n\n        riskReward.IsInteractive = true;\n\n        Print($\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        riskRewardType = ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 1)\n        riskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\n        riskReward.IsInteractive = True\n        print(f\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartRiskRewardAmountType.Money","kind":"enum value","name":"Money","type":"T:cAlgo.API.ChartRiskRewardAmountType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartRiskRewardAmountType.Money;","python":"ChartRiskRewardAmountType.Money","summary":"Account currency amount.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartRiskRewardAmountType.BalancePercentage","kind":"enum value","name":"BalancePercentage","type":"T:cAlgo.API.ChartRiskRewardAmountType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartRiskRewardAmountType.BalancePercentage;","python":"ChartRiskRewardAmountType.BalancePercentage","summary":"Account balance percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartRiskRewardAmountType.EquityPercentage","kind":"enum value","name":"EquityPercentage","type":"T:cAlgo.API.ChartRiskRewardAmountType","namespace":"cAlgo.API","group":"Drawings","csharp":"ChartRiskRewardAmountType.EquityPercentage;","python":"ChartRiskRewardAmountType.EquityPercentage","summary":"Account equity percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRiskRewardFixedRewardType","kind":"record","name":"ChartRiskRewardFixedRewardType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public class ChartRiskRewardFixedRewardType","python":"ChartRiskRewardFixedRewardType","summary":"Represents fixed reward type of chart risk reward.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var riskRewardType = new ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 1);\n\n        var riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\n\n        riskReward.IsInteractive = true;\n\n        Print($\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        riskRewardType = ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 1)\n        riskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\n        riskReward.IsInteractive = True\n        print(f\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedRewardType.#ctor(cAlgo.API.ChartRiskRewardAmountType,System.Double)","kind":"constructor","name":"ChartRiskRewardFixedRewardType","type":"T:cAlgo.API.ChartRiskRewardFixedRewardType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType amountType, double amount)","python":"ChartRiskRewardFixedRewardType(amountType: ChartRiskRewardAmountType, amount: float)","summary":"Creates an instance of ChartRiskRewardFixedRewardType.","remarks":null,"parameters":[{"name":"amountType","csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":""},{"name":"amount","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var rewardType = new ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.Money, 200);\nvar riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, rewardType);\nPrint(\"Volume for a 200 reward: {0}\", riskReward.VolumeInUnits);","python":"rewardType = ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.Money, 200)\nriskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, rewardType)\napi.Print(f\"Volume for a 200 reward: {riskReward.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedRewardType.#ctor(cAlgo.API.ChartRiskRewardFixedRewardType)","kind":"constructor","name":"ChartRiskRewardFixedRewardType","type":"T:cAlgo.API.ChartRiskRewardFixedRewardType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedRewardType(ChartRiskRewardFixedRewardType original)","python":"ChartRiskRewardFixedRewardType(original: ChartRiskRewardFixedRewardType)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"ChartRiskRewardFixedRewardType","pythonType":"ChartRiskRewardFixedRewardType","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartRiskRewardFixedRewardType.Amount","kind":"property","name":"Amount","type":"T:cAlgo.API.ChartRiskRewardFixedRewardType","namespace":"cAlgo.API","group":"Drawings","csharp":"public double Amount {get;}","python":"chartRiskRewardFixedRewardType.Amount: float","summary":"Gets or sets amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var rewardType = new ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 2);\nPrint(\"Reward amount: {0}%\", rewardType.Amount);","python":"rewardType = ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 2)\napi.Print(f\"Reward amount: {rewardType.Amount}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Amount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/Amount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartRiskRewardFixedRewardType.AmountType","kind":"property","name":"AmountType","type":"T:cAlgo.API.ChartRiskRewardFixedRewardType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardAmountType AmountType {get;}","python":"chartRiskRewardFixedRewardType.AmountType: ChartRiskRewardAmountType","summary":"Gets or sets amount mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var rewardType = new ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 2);\nPrint(\"Reward amount type: {0}\", rewardType.AmountType);","python":"rewardType = ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType.EquityPercentage, 2)\napi.Print(f\"Reward amount type: {rewardType.AmountType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/AmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRewardType/AmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRiskRewardFixedRiskType","kind":"record","name":"ChartRiskRewardFixedRiskType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public class ChartRiskRewardFixedRiskType","python":"ChartRiskRewardFixedRiskType","summary":"Represents fixed risk type of chart risk reward.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var riskRewardType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1);\n\n        var riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\n\n        riskReward.IsInteractive = true;\n\n        Print($\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        riskRewardType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.EquityPercentage, 1)\n        riskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\n        riskReward.IsInteractive = True\n        print(f\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedRiskType.#ctor(cAlgo.API.ChartRiskRewardAmountType,System.Double)","kind":"constructor","name":"ChartRiskRewardFixedRiskType","type":"T:cAlgo.API.ChartRiskRewardFixedRiskType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType amountType, double amount)","python":"ChartRiskRewardFixedRiskType(amountType: ChartRiskRewardAmountType, amount: float)","summary":"Creates an instance of ChartRiskRewardFixedRiskType.","remarks":null,"parameters":[{"name":"amountType","csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":""},{"name":"amount","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1);\nvar riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, riskType);\nPrint(\"Volume for a 1% balance risk: {0}\", riskReward.VolumeInUnits);","python":"riskType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1)\nriskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, riskType)\napi.Print(f\"Volume for a 1% balance risk: {riskReward.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedRiskType.#ctor(cAlgo.API.ChartRiskRewardFixedRiskType)","kind":"constructor","name":"ChartRiskRewardFixedRiskType","type":"T:cAlgo.API.ChartRiskRewardFixedRiskType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedRiskType(ChartRiskRewardFixedRiskType original)","python":"ChartRiskRewardFixedRiskType(original: ChartRiskRewardFixedRiskType)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"ChartRiskRewardFixedRiskType","pythonType":"ChartRiskRewardFixedRiskType","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartRiskRewardFixedRiskType.Amount","kind":"property","name":"Amount","type":"T:cAlgo.API.ChartRiskRewardFixedRiskType","namespace":"cAlgo.API","group":"Drawings","csharp":"public double Amount {get;}","python":"chartRiskRewardFixedRiskType.Amount: float","summary":"Gets or sets amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.Money, 100);\nPrint(\"Risk amount: {0} {1}\", riskType.Amount, Account.Asset.Name);","python":"riskType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.Money, 100)\napi.Print(f\"Risk amount: {riskType.Amount} {api.Account.Asset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Amount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/Amount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartRiskRewardFixedRiskType.AmountType","kind":"property","name":"AmountType","type":"T:cAlgo.API.ChartRiskRewardFixedRiskType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardAmountType AmountType {get;}","python":"chartRiskRewardFixedRiskType.AmountType: ChartRiskRewardAmountType","summary":"Gets or sets amount mode.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRiskRewardAmountType","pythonType":"ChartRiskRewardAmountType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var riskType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.Money, 100);\nPrint(\"Risk amount type: {0}\", riskType.AmountType);","python":"riskType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.Money, 100)\napi.Print(f\"Risk amount type: {riskType.AmountType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/AmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedRiskType/AmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRiskRewardFixedSizeType","kind":"record","name":"ChartRiskRewardFixedSizeType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public class ChartRiskRewardFixedSizeType","python":"ChartRiskRewardFixedSizeType","summary":"Represents fixed size type of chart risk reward.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var riskRewardType = new ChartRiskRewardFixedSizeType(1000);\n\n        var riskReward = Chart.DrawRiskReward(\"RR\", Chart.LastVisibleBarIndex - 10, Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType);\n\n        riskReward.IsInteractive = true;\n\n        Print($\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        riskRewardType = ChartRiskRewardFixedSizeType(1000)\n        riskReward = api.Chart.DrawRiskReward(\"RR\", api.Chart.LastVisibleBarIndex - 10, api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], OrderType.Market, TradeType.Buy, riskRewardType)\n        riskReward.IsInteractive = True\n        print(f\"Name: {riskReward.Name} | Entry: {riskReward.EntryPrice}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedSizeType.#ctor(System.Double)","kind":"constructor","name":"ChartRiskRewardFixedSizeType","type":"T:cAlgo.API.ChartRiskRewardFixedSizeType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedSizeType(double volumeInUnits)","python":"ChartRiskRewardFixedSizeType(volumeInUnits: float)","summary":"Creates an instance of ChartRiskRewardFixedSizeType.","remarks":null,"parameters":[{"name":"volumeInUnits","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var sizeType = new ChartRiskRewardFixedSizeType(Symbol.QuantityToVolumeInUnits(0.1));\nvar riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, sizeType);\nPrint(\"Risk reward volume: {0}\", riskReward.VolumeInUnits);","python":"sizeType = ChartRiskRewardFixedSizeType(api.Symbol.QuantityToVolumeInUnits(0.1))\nriskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, sizeType)\napi.Print(f\"Risk reward volume: {riskReward.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ChartRiskRewardFixedSizeType.#ctor(cAlgo.API.ChartRiskRewardFixedSizeType)","kind":"constructor","name":"ChartRiskRewardFixedSizeType","type":"T:cAlgo.API.ChartRiskRewardFixedSizeType","namespace":"cAlgo.API","group":"Drawings","csharp":"public ChartRiskRewardFixedSizeType(ChartRiskRewardFixedSizeType original)","python":"ChartRiskRewardFixedSizeType(original: ChartRiskRewardFixedSizeType)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"ChartRiskRewardFixedSizeType","pythonType":"ChartRiskRewardFixedSizeType","summary":""}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartRiskRewardFixedSizeType.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.ChartRiskRewardFixedSizeType","namespace":"cAlgo.API","group":"Drawings","csharp":"public double VolumeInUnits {get;}","python":"chartRiskRewardFixedSizeType.VolumeInUnits: float","summary":"Gets or sets volume (in units).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var sizeType = new ChartRiskRewardFixedSizeType(10000);\nPrint(\"Fixed volume in units: {0}\", sizeType.VolumeInUnits);","python":"sizeType = ChartRiskRewardFixedSizeType(10000)\napi.Print(f\"Fixed volume in units: {sizeType.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardFixedSizeType/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRiskRewardType","kind":"interface","name":"ChartRiskRewardType","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartRiskRewardType","python":"ChartRiskRewardType","summary":"Represents different types of chart risk reward.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"ChartRiskRewardType riskRewardType = new ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1);\nvar riskReward = Chart.DrawRiskReward(\"rr\", Bars.OpenTimes.Last(10), Bars.OpenTimes.LastValue, Symbol.Ask, OrderType.Market, TradeType.Buy, riskRewardType);\nPrint(\"Risk reward type: {0} | Volume: {1}\", riskReward.Type, riskReward.VolumeInUnits);","python":"riskRewardType = ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType.BalancePercentage, 1)\nriskReward = api.Chart.DrawRiskReward(\"rr\", api.Bars.OpenTimes.Last(10), api.Bars.OpenTimes.LastValue, api.Symbol.Ask, OrderType.Market, TradeType.Buy, riskRewardType)\napi.Print(f\"Risk reward type: {riskReward.Type} | Volume: {riskReward.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartRiskRewardType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartRobot","kind":"interface","name":"ChartRobot","type":null,"namespace":"cAlgo.API","group":"Robots","csharp":"public interface ChartRobot","python":"ChartRobot","summary":"The interface representing a Robot instance attached to a chart. Provides properties that allow for accessing various information about a Robot.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartRobot in ChartRobots)\n       {\n            Print($\"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}\");\n       }\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartRobot in api.ChartRobots:\n            print(f\"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"M:cAlgo.API.ChartRobot.Start","kind":"method","name":"Start","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"void Start()","python":"chartRobot.Start() -> None","summary":"Starts the Robot instance.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartRobot = ChartRobots.Add(\"Sample Break Even\");\nif (chartRobot.State == RobotState.Stopped)\n    chartRobot.Start();","python":"chartRobot = api.ChartRobots.Add(\"Sample Break Even\")\nif chartRobot.State == RobotState.Stopped:\n    chartRobot.Start()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"M:cAlgo.API.ChartRobot.Stop","kind":"method","name":"Stop","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"void Stop()","python":"chartRobot.Stop() -> None","summary":"Stops the Robot instance.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartRobot in ChartRobots)\n{\n    if (chartRobot.State == RobotState.Running)\n    {\n        chartRobot.Stop();\n        Print(\"Stop requested for {0}\", chartRobot.Name);\n    }\n}","python":"for chartRobot in api.ChartRobots:\n    if chartRobot.State == RobotState.Running:\n        chartRobot.Stop()\n        api.Print(f\"Stop requested for {chartRobot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Stop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Stop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"P:cAlgo.API.ChartRobot.InstanceId","kind":"property","name":"InstanceId","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"string InstanceId {get;}","python":"chartRobot.InstanceId: str","summary":"Gets the ID of a specific Robot instance.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartRobot = ChartRobots.Add(\"Sample Break Even\");\nvar sameRobot = ChartRobots[chartRobot.InstanceId];\nPrint(\"Instance id: {0} | Found: {1}\", chartRobot.InstanceId, sameRobot != null);","python":"chartRobot = api.ChartRobots.Add(\"Sample Break Even\")\nsameRobot = api.ChartRobots[chartRobot.InstanceId]\napi.Print(f\"Instance id: {chartRobot.InstanceId} | Found: {sameRobot is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/InstanceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/InstanceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"P:cAlgo.API.ChartRobot.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"string Name {get;}","python":"chartRobot.Name: str","summary":"Gets the name of a Robot instance.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartRobot in ChartRobots)\n    Print(\"cBot on the chart: {0}\", chartRobot.Name);","python":"for chartRobot in api.ChartRobots:\n    api.Print(f\"cBot on the chart: {chartRobot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"P:cAlgo.API.ChartRobot.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"AlgoInstanceParameters Parameters {get;}","python":"chartRobot.Parameters: AlgoInstanceParameters","summary":"Gets the collection of Robot parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoInstanceParameters","pythonType":"AlgoInstanceParameters","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartRobot in ChartRobots)\n{\n    for (var i = 0; i < chartRobot.Parameters.Count; i++)\n        Print(\"{0}: {1} = {2}\", chartRobot.Name, chartRobot.Parameters[i].Name, chartRobot.Parameters[i].Value);\n}","python":"for chartRobot in api.ChartRobots:\n    for i in range(chartRobot.Parameters.Count):\n        api.Print(f\"{chartRobot.Name}: {chartRobot.Parameters[i].Name} = {chartRobot.Parameters[i].Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Values can be read; setting a value fails and resets it, because changing cBot parameters is desktop-only."},{"name":"Cloud","support":"None","behaviour":"No chart robots exist in the cloud, so there are no parameters."}]}
{"id":"P:cAlgo.API.ChartRobot.State","kind":"property","name":"State","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"RobotState State {get;}","python":"chartRobot.State: RobotState","summary":"Gets the current state of a Robot instance.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotState","pythonType":"RobotState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartRobot in ChartRobots)\n{\n    if (chartRobot.State == RobotState.Running)\n        Print(\"{0} is running\", chartRobot.Name);\n}","python":"for chartRobot in api.ChartRobots:\n    if chartRobot.State == RobotState.Running:\n        api.Print(f\"{chartRobot.Name} is running\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/State/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/State/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"P:cAlgo.API.ChartRobot.Type","kind":"property","name":"Type","type":"T:cAlgo.API.ChartRobot","namespace":"cAlgo.API","group":"Robots","csharp":"RobotType Type {get;}","python":"chartRobot.Type: RobotType","summary":"Gets the RobotType of a Robot instance.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotType","pythonType":"RobotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var chartRobot in ChartRobots)\n    Print(\"{0} | Type: {1} | Parameters: {2}\", chartRobot.Name, chartRobot.Type.Name, chartRobot.Type.Parameters.Count);","python":"for chartRobot in api.ChartRobots:\n    api.Print(f\"{chartRobot.Name} | Type: {chartRobot.Type.Name} | Parameters: {chartRobot.Type.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more)."}]}
{"id":"T:cAlgo.API.ChartRobotAddedEventArgs","kind":"class","name":"ChartRobotAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartRobotAddedEventArgs : ChartRobotEventArgs","python":"ChartRobotAddedEventArgs","summary":"The class representing AddedEventArgs for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotAdded += OnChartRobotAdded;\n}\n\nprivate void OnChartRobotAdded(ChartRobotAddedEventArgs args)\n{\n    Print(\"cBot {0} added to the chart, instance: {1}\", args.Robot.Name, args.Robot.InstanceId);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotAdded += self.on_chart_robot_added\n\ndef on_chart_robot_added(self, args):\n    api.Print(f\"cBot {args.Robot.Name} added to the chart, instance: {args.Robot.InstanceId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartRobots.RobotAdded)."}]}
{"id":"T:cAlgo.API.ChartRobotEventArgs","kind":"class","name":"ChartRobotEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class ChartRobotEventArgs","python":"ChartRobotEventArgs","summary":"The base class representing event args for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotAdded += OnChartRobotEvent;\n    Chart.Robots.RobotRemoved += OnChartRobotEvent;\n    Chart.Robots.RobotModified += OnChartRobotEvent;\n    Chart.Robots.RobotStarted += OnChartRobotEvent;\n    Chart.Robots.RobotStopped += OnChartRobotEvent;\n}\n\nprivate void OnChartRobotEvent(ChartRobotEventArgs args)\n{\n    Print(\"{0}: {1} is {2}\", args.GetType().Name, args.Robot.Name, args.Robot.State);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotAdded += self.on_chart_robot_event\n    api.Chart.Robots.RobotRemoved += self.on_chart_robot_event\n    api.Chart.Robots.RobotModified += self.on_chart_robot_event\n    api.Chart.Robots.RobotStarted += self.on_chart_robot_event\n    api.Chart.Robots.RobotStopped += self.on_chart_robot_event\n\ndef on_chart_robot_event(self, args):\n    api.Print(f\"{type(args).__name__}: {args.Robot.Name} is {args.Robot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the ChartRobots events never fire there."}]}
{"id":"P:cAlgo.API.ChartRobotEventArgs.Robot","kind":"property","name":"Robot","type":"T:cAlgo.API.ChartRobotEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartRobot Robot {get;}","python":"chartRobotEventArgs.Robot: ChartRobot","summary":"Gets the ChartRobot that raised an event.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRobot","pythonType":"ChartRobot","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotStarted += OnChartRobotStarted;\n}\n\nprivate void OnChartRobotStarted(ChartRobotStartedEventArgs args)\n{\n    var robot = args.Robot;\n    Print(\"Name: {0} | Instance: {1} | State: {2}\", robot.Name, robot.InstanceId, robot.State);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotStarted += self.on_chart_robot_started\n\ndef on_chart_robot_started(self, args):\n    robot = args.Robot\n    api.Print(f\"Name: {robot.Name} | Instance: {robot.InstanceId} | State: {robot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the ChartRobots events never fire there."}]}
{"id":"T:cAlgo.API.ChartRobotModifiedEventArgs","kind":"class","name":"ChartRobotModifiedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartRobotModifiedEventArgs : ChartRobotEventArgs","python":"ChartRobotModifiedEventArgs","summary":"The class representing ModifiedEventArgs for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotModified += OnChartRobotModified;\n}\n\nprivate void OnChartRobotModified(ChartRobotModifiedEventArgs args)\n{\n    Print(\"cBot {0} ({1}) parameters were modified\", args.Robot.Name, args.Robot.InstanceId);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotModified += self.on_chart_robot_modified\n\ndef on_chart_robot_modified(self, args):\n    api.Print(f\"cBot {args.Robot.Name} ({args.Robot.InstanceId}) parameters were modified\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotModifiedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotModifiedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartRobots.RobotModified)."}]}
{"id":"T:cAlgo.API.ChartRobotRemovedEventArgs","kind":"class","name":"ChartRobotRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartRobotRemovedEventArgs : ChartRobotEventArgs","python":"ChartRobotRemovedEventArgs","summary":"The class representing RemovedEventArgs for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotRemoved += OnChartRobotRemoved;\n}\n\nprivate void OnChartRobotRemoved(ChartRobotRemovedEventArgs args)\n{\n    Print(\"cBot {0} removed from the chart\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotRemoved += self.on_chart_robot_removed\n\ndef on_chart_robot_removed(self, args):\n    api.Print(f\"cBot {args.Robot.Name} removed from the chart\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartRobots.RobotRemoved)."}]}
{"id":"T:cAlgo.API.ChartRobotStartedEventArgs","kind":"class","name":"ChartRobotStartedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartRobotStartedEventArgs : ChartRobotEventArgs","python":"ChartRobotStartedEventArgs","summary":"The class representing StartedEventArgs for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotStarted += OnChartRobotStarted;\n}\n\nprivate void OnChartRobotStarted(ChartRobotStartedEventArgs args)\n{\n    Print(\"cBot {0} started, state: {1}\", args.Robot.Name, args.Robot.State);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotStarted += self.on_chart_robot_started\n\ndef on_chart_robot_started(self, args):\n    api.Print(f\"cBot {args.Robot.Name} started, state: {args.Robot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotStartedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotStartedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartRobots.RobotStarted)."}]}
{"id":"T:cAlgo.API.ChartRobotStoppedEventArgs","kind":"class","name":"ChartRobotStoppedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartRobotStoppedEventArgs : ChartRobotEventArgs","python":"ChartRobotStoppedEventArgs","summary":"The class representing StoppedEventArgs for a ChartRobot .","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.Robots.RobotStopped += OnChartRobotStopped;\n}\n\nprivate void OnChartRobotStopped(ChartRobotStoppedEventArgs args)\n{\n    Print(\"cBot {0} stopped, state: {1}\", args.Robot.Name, args.Robot.State);\n}","python":"def on_start(self):\n    api.Chart.Robots.RobotStopped += self.on_chart_robot_stopped\n\ndef on_chart_robot_stopped(self, args):\n    api.Print(f\"cBot {args.Robot.Name} stopped, state: {args.Robot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotStoppedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotStoppedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartRobots.RobotStopped)."}]}
{"id":"T:cAlgo.API.ChartRobots","kind":"interface","name":"ChartRobots","type":null,"namespace":"cAlgo.API","group":"Robots","csharp":"public interface ChartRobots","python":"ChartRobots","summary":"The interface representing a chart Robot instances collection. Provides properties and events that allow for accessing various information about Robots attached to a chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartRobot in ChartRobots)\n       {\n            Print($\"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}\");\n       }\n\n        ChartRobots.RobotAdded += args => Print($\"Robot added, {args.Robot.Name}\");\n        ChartRobots.RobotRemoved += args => Print($\"Robot removed, {args.Robot.Name}\");\n        ChartRobots.RobotModified += args => Print($\"Robot modified, {args.Robot.Name}\");\n        ChartRobots.RobotStarted += args => Print($\"Robot started, {args.Robot.Name}\");\n        ChartRobots.RobotStopped += args => Print($\"Robot stopped, {args.Robot.Name}\");\n\n       var addedChartRobot = ChartRobots.Add(\"Sample Break Even\");\n\n       addedChartRobot.Start();\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartRobot in api.ChartRobots:\n            print(f\"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}\")\n\n        api.ChartRobots.RobotAdded += lambda args: print(f\"Robot added, {args.Robot.Name}\")\n        api.ChartRobots.RobotRemoved += lambda args: print(f\"Robot removed, {args.Robot.Name}\")\n        api.ChartRobots.RobotModified += lambda args: print(f\"Robot modified, {args.Robot.Name}\")\n        api.ChartRobots.RobotStarted += lambda args: print(f\"Robot started, {args.Robot.Name}\")\n        api.ChartRobots.RobotStopped += lambda args: print(f\"Robot stopped, {args.Robot.Name}\")\n\n        addedChartRobot = api.ChartRobots.Add(\"Sample Break Even\")\n        addedChartRobot.Start()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartRobots.Add(System.String,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"ChartRobot Add(string name, object[] parameterValues)","python":"api.ChartRobots.Add(name: str, parameterValues: list[object]) -> ChartRobot","summary":"Adds a new Robot instance to a chart.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The name of a Robot."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The Robot parameter values or an anonymous object that contains Robot parameter values."}],"returns":{"csharpType":"ChartRobot","pythonType":"ChartRobot","summary":"An ChartRobot representing the added Robot instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var martingaleBot = ChartRobots.Add(\"Sample Martingale cBot\", 0.01, 10, 10);\nvar trendBot = ChartRobots.Add(\"Sample Trend cBot\", new { Quantity = 0.01 });\nmartingaleBot.Start();\nPrint(\"Added {0} and {1}\", martingaleBot.Name, trendBot.Name);","python":"martingaleBot = api.ChartRobots.Add(\"Sample Martingale cBot\", 0.01, 10, 10)\nmartingaleBot.Start()\napi.Print(f\"Added {martingaleBot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartRobots.Add(cAlgo.API.RobotType,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"ChartRobot Add(RobotType type, object[] parameterValues)","python":"api.ChartRobots.Add(type: RobotType, parameterValues: list[object]) -> ChartRobot","summary":"Adds a new Robot instance to a chart.","remarks":null,"parameters":[{"name":"type","csharpType":"RobotType","pythonType":"RobotType","summary":"The type of Robot, you can get RobotType from AlgoRegistry."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The Robot parameter values or an anonymous object that contains Robot parameter values."}],"returns":{"csharpType":"ChartRobot","pythonType":"ChartRobot","summary":"An ChartRobot representing the added Robot instance.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Martingale cBot\", AlgoKind.Robot) is RobotType martingaleBotType)\n{\n    var martingaleBot = ChartRobots.Add(martingaleBotType, new { InitialQuantity = 0.01, StopLoss = 10, TakeProfit = 10 });\n    Print(\"Added cBot: {0}\", martingaleBot.Name);\n}","python":"martingaleBotType = api.AlgoRegistry.Get(\"Sample Martingale cBot\", AlgoKind.Robot)\nif martingaleBotType is not None:\n    martingaleBot = api.ChartRobots.Add(martingaleBotType, 0.01, 10, 10)\n    api.Print(f\"Added cBot: {martingaleBot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"M:cAlgo.API.ChartRobots.Remove(cAlgo.API.ChartRobot)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"bool Remove(ChartRobot robot)","python":"api.ChartRobots.Remove(robot: ChartRobot) -> bool","summary":"Removes a Robot instance from a chart.","remarks":null,"parameters":[{"name":"robot","csharpType":"ChartRobot","pythonType":"ChartRobot","summary":"The ChartRobot to be removed from a chart."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartRobot = ChartRobots.Add(\"Sample Break Even\");\nvar isRemoved = ChartRobots.Remove(chartRobot);\nPrint(\"cBot removed: {0}\", isRemoved);","python":"chartRobot = api.ChartRobots.Add(\"Sample Break Even\")\nisRemoved = api.ChartRobots.Remove(chartRobot)\napi.Print(f\"cBot removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartRobots.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"int Count {get;}","python":"api.ChartRobots.Count: int","summary":"Gets the number of all Robots attached to a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"cBots on the chart: {0}\", ChartRobots.Count);","python":"api.Print(f\"cBots on the chart: {api.ChartRobots.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"P:cAlgo.API.ChartRobots.Item(System.String)","kind":"property","name":"Item","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"ChartRobot Item {get;}","python":"api.ChartRobots[instanceId: str] -> ChartRobot","summary":"Gets a Robot attached instance to a chart by its instance ID.","remarks":null,"parameters":[{"name":"instanceId","csharpType":"string","pythonType":"str","summary":"The instance ID of a Robot attached to a chart."}],"returns":{"csharpType":"ChartRobot","pythonType":"ChartRobot","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var added = ChartRobots.Add(\"Sample Break Even\");\nvar chartRobot = ChartRobots[added.InstanceId];\nif (chartRobot != null)\n    Print(\"Found cBot: {0} | State: {1}\", chartRobot.Name, chartRobot.State);","python":"added = api.ChartRobots.Add(\"Sample Break Even\")\nchartRobot = api.ChartRobots[added.InstanceId]\nif chartRobot is not None:\n    api.Print(f\"Found cBot: {chartRobot.Name} | State: {chartRobot.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartRobots.RobotAdded","kind":"event","name":"RobotAdded","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"event Action<ChartRobotAddedEventArgs> RobotAdded;","python":"api.ChartRobots.RobotAdded += handler  # handler(obj: ChartRobotAddedEventArgs)","summary":"Occurs when a Robot is added to a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartRobotAddedEventArgs>","pythonType":"Callable[[ChartRobotAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartRobots.RobotAdded += OnRobotAdded;\n}\n\nprivate void OnRobotAdded(ChartRobotAddedEventArgs args)\n{\n    Print(\"cBot added: {0}\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.ChartRobots.RobotAdded += self.on_robot_added\n\ndef on_robot_added(self, args):\n    api.Print(f\"cBot added: {args.Robot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartRobots.RobotModified","kind":"event","name":"RobotModified","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"event Action<ChartRobotModifiedEventArgs> RobotModified;","python":"api.ChartRobots.RobotModified += handler  # handler(obj: ChartRobotModifiedEventArgs)","summary":"Occurs when a chart Robot instance is modified.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartRobotModifiedEventArgs>","pythonType":"Callable[[ChartRobotModifiedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartRobots.RobotModified += OnRobotModified;\n}\n\nprivate void OnRobotModified(ChartRobotModifiedEventArgs args)\n{\n    Print(\"cBot modified: {0}\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.ChartRobots.RobotModified += self.on_robot_modified\n\ndef on_robot_modified(self, args):\n    api.Print(f\"cBot modified: {args.Robot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotModified/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotModified/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartRobots.RobotRemoved","kind":"event","name":"RobotRemoved","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"event Action<ChartRobotRemovedEventArgs> RobotRemoved;","python":"api.ChartRobots.RobotRemoved += handler  # handler(obj: ChartRobotRemovedEventArgs)","summary":"Occurs when a Robot is removed from a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartRobotRemovedEventArgs>","pythonType":"Callable[[ChartRobotRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartRobots.RobotRemoved += OnRobotRemoved;\n}\n\nprivate void OnRobotRemoved(ChartRobotRemovedEventArgs args)\n{\n    Print(\"cBot removed: {0}\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.ChartRobots.RobotRemoved += self.on_robot_removed\n\ndef on_robot_removed(self, args):\n    api.Print(f\"cBot removed: {args.Robot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartRobots.RobotStarted","kind":"event","name":"RobotStarted","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"event Action<ChartRobotStartedEventArgs> RobotStarted;","python":"api.ChartRobots.RobotStarted += handler  # handler(obj: ChartRobotStartedEventArgs)","summary":"Occurs when a chart Robot instance is started.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartRobotStartedEventArgs>","pythonType":"Callable[[ChartRobotStartedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartRobots.RobotStarted += OnRobotStarted;\n}\n\nprivate void OnRobotStarted(ChartRobotStartedEventArgs args)\n{\n    Print(\"cBot started: {0}\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.ChartRobots.RobotStarted += self.on_robot_started\n\ndef on_robot_started(self, args):\n    api.Print(f\"cBot started: {args.Robot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotStarted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotStarted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"E:cAlgo.API.ChartRobots.RobotStopped","kind":"event","name":"RobotStopped","type":"T:cAlgo.API.ChartRobots","namespace":"cAlgo.API","group":"Robots","csharp":"event Action<ChartRobotStoppedEventArgs> RobotStopped;","python":"api.ChartRobots.RobotStopped += handler  # handler(obj: ChartRobotStoppedEventArgs)","summary":"Occurs when a chart Robot instance is stopped.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartRobotStoppedEventArgs>","pythonType":"Callable[[ChartRobotStoppedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartRobots.RobotStopped += OnRobotStopped;\n}\n\nprivate void OnRobotStopped(ChartRobotStoppedEventArgs args)\n{\n    Print(\"cBot stopped: {0}\", args.Robot.Name);\n}","python":"def on_start(self):\n    api.ChartRobots.RobotStopped += self.on_robot_stopped\n\ndef on_robot_stopped(self, args):\n    api.Print(f\"cBot stopped: {args.Robot.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotStopped/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotStopped/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire."}]}
{"id":"T:cAlgo.API.ChartRobotsPermission","kind":"interface","name":"ChartRobotsPermission","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface ChartRobotsPermission","python":"ChartRobotsPermission","summary":"Chart Robots Permission","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Permissions.ChartRobotsPermission.Request())\n    Print(\"Adding and removing chart cBots is allowed\");","python":"if api.Permissions.ChartRobotsPermission.Request():\n    api.Print(\"Adding and removing chart cBots is allowed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/ChartRobotsPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/ChartRobotsPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartScrollEventArgs","kind":"class","name":"ChartScrollEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartScrollEventArgs","python":"ChartScrollEventArgs","summary":"Provides data for the chart scrolling event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartScrollEventArgs\n    public partial class ChartScrollEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ScrollChanged += Chart_ScrollChanged;\n        }\n\n        private void Chart_ScrollChanged(ChartScrollEventArgs obj)\n        {\n            Print(\"Scrolled, Bars Delta : {0} | Top Y Delta: {1} | Bottom Y Delta: {2}\", obj.BarsDelta, obj.TopYDelta, obj.BottomYDelta);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\n    def on_chart_scroll_changed(self, args):\n        print(f\"Scrolled, Bars Delta : {args.BarsDelta} | Top Y Delta: {args.TopYDelta} | Bottom Y Delta: {args.BottomYDelta}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"P:cAlgo.API.ChartScrollEventArgs.BarsDelta","kind":"property","name":"BarsDelta","type":"T:cAlgo.API.ChartScrollEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int BarsDelta {get;}","python":"chartScrollEventArgs.BarsDelta: int","summary":"Gets a value that indicates the amount of bars that the chart was scrolled for","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    if (args.BarsDelta != 0)\n        Print(\"Chart scrolled horizontally by {0} bars\", args.BarsDelta);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    if args.BarsDelta != 0:\n        api.Print(f\"Chart scrolled horizontally by {args.BarsDelta} bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/BarsDelta/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/BarsDelta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"P:cAlgo.API.ChartScrollEventArgs.BottomYDelta","kind":"property","name":"BottomYDelta","type":"T:cAlgo.API.ChartScrollEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double BottomYDelta {get;}","python":"chartScrollEventArgs.BottomYDelta: float","summary":"Gets the lowest value of the bars delta.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The bottom y delta.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    Print(\"Bottom Y changed by {0}, new bottom Y: {1}\", args.BottomYDelta, args.ChartArea.BottomY);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    api.Print(f\"Bottom Y changed by {args.BottomYDelta}, new bottom Y: {args.ChartArea.BottomY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/BottomYDelta/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/BottomYDelta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"P:cAlgo.API.ChartScrollEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartScrollEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartScrollEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    Print(\"First visible bar: {0}, last visible bar: {1}\", args.Chart.FirstVisibleBarIndex, args.Chart.LastVisibleBarIndex);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    api.Print(f\"First visible bar: {args.Chart.FirstVisibleBarIndex}, last visible bar: {args.Chart.LastVisibleBarIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"P:cAlgo.API.ChartScrollEventArgs.ChartArea","kind":"property","name":"ChartArea","type":"T:cAlgo.API.ChartScrollEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea ChartArea {get;}","python":"chartScrollEventArgs.ChartArea: ChartArea","summary":"Gets the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    Print(\"Visible price range: {0} - {1}\", args.ChartArea.BottomY, args.ChartArea.TopY);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    api.Print(f\"Visible price range: {args.ChartArea.BottomY} - {args.ChartArea.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/ChartArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/ChartArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"P:cAlgo.API.ChartScrollEventArgs.TopYDelta","kind":"property","name":"TopYDelta","type":"T:cAlgo.API.ChartScrollEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double TopYDelta {get;}","python":"chartScrollEventArgs.TopYDelta: float","summary":"Gets the highest value of the bars delta.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The top y delta.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ScrollChanged += OnChartScrollChanged;\n}\n\nprivate void OnChartScrollChanged(ChartScrollEventArgs args)\n{\n    Print(\"Top Y changed by {0}, new top Y: {1}\", args.TopYDelta, args.ChartArea.TopY);\n}","python":"def on_start(self):\n    api.Chart.ScrollChanged += self.on_chart_scroll_changed\n\ndef on_chart_scroll_changed(self, args):\n    api.Print(f\"Top Y changed by {args.TopYDelta}, new top Y: {args.ChartArea.TopY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/TopYDelta/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartScrollEventArgs/TopYDelta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartArea.ScrollChanged)."}]}
{"id":"T:cAlgo.API.ChartShape","kind":"interface","name":"ChartShape","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public interface ChartShape","python":"ChartShape","summary":"Represents the Shape chart object. Allows drawing a Rectangle, a Triangle, and an Ellipse on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ChartShape shape = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue));\nshape.IsFilled = true;\nshape.LineStyle = LineStyle.Dots;\nPrint(\"Shape: {0} | Filled: {1}\", shape.Name, shape.IsFilled);","python":"shape = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue))\nshape.IsFilled = True\nshape.LineStyle = LineStyle.Dots\napi.Print(f\"Shape: {shape.Name} | Filled: {shape.IsFilled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartShape.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartShape","namespace":"cAlgo.API","group":"Shapes","csharp":"Color Color {get; set;}","python":"chartShape.Color: Color","summary":"Gets or sets the line color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nrectangle.Color = Color.FromArgb(60, Color.Gold);\nPrint(\"Shape color: {0}\", rectangle.Color);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\nrectangle.Color = Color.FromArgb(60, Color.Gold)\napi.Print(f\"Shape color: {rectangle.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartShape.IsFilled","kind":"property","name":"IsFilled","type":"T:cAlgo.API.ChartShape","namespace":"cAlgo.API","group":"Shapes","csharp":"bool IsFilled {get; set;}","python":"chartShape.IsFilled: bool","summary":"Defines if the shape is filled.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue));\nrectangle.IsFilled = true;\nPrint(\"Shape is filled: {0}\", rectangle.IsFilled);","python":"rectangle = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue))\nrectangle.IsFilled = True\napi.Print(f\"Shape is filled: {rectangle.IsFilled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/IsFilled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/IsFilled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartShape.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartShape","namespace":"cAlgo.API","group":"Shapes","csharp":"LineStyle LineStyle {get; set;}","python":"chartShape.LineStyle: LineStyle","summary":"Gets or sets the line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = Chart.DrawEllipse(\"ellipse\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);\nellipse.LineStyle = LineStyle.DotsRare;\nPrint(\"Shape line style: {0}\", ellipse.LineStyle);","python":"ellipse = api.Chart.DrawEllipse(\"ellipse\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)\nellipse.LineStyle = LineStyle.DotsRare\napi.Print(f\"Shape line style: {ellipse.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartShape.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartShape","namespace":"cAlgo.API","group":"Shapes","csharp":"int Thickness {get; set;}","python":"chartShape.Thickness: int","summary":"Gets or sets the line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Thickness = 2;\nPrint(\"Shape thickness: {0}\", triangle.Thickness);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Thickness = 2\napi.Print(f\"Shape thickness: {triangle.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartSizeEventArgs","kind":"class","name":"ChartSizeEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartSizeEventArgs","python":"ChartSizeEventArgs","summary":"Provides data for the chart size change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartSizeEventArgs\n    public partial class ChartSizeEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.SizeChanged += Chart_SizeChanged;\n        }\n\n        private void Chart_SizeChanged(ChartSizeEventArgs obj)\n        {\n            Chart.DrawStaticText(\"size\", \"Size Changed\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.SizeChanged += self.on_chart_size_changed\n\n    def on_chart_size_changed(self, args):\n        api.Chart.DrawStaticText(\"size\", \"Size Changed\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartSizeEventArgs.Area","kind":"property","name":"Area","type":"T:cAlgo.API.ChartSizeEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartArea Area {get;}","python":"chartSizeEventArgs.Area: ChartArea","summary":"Gets the chart area.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartArea","pythonType":"ChartArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.SizeChanged += OnChartSizeChanged;\n}\n\nprivate void OnChartSizeChanged(ChartSizeEventArgs args)\n{\n    Print(\"Resized area: {0} x {1}\", args.Area.Width, args.Area.Height);\n}","python":"def on_start(self):\n    api.Chart.SizeChanged += self.on_chart_size_changed\n\ndef on_chart_size_changed(self, args):\n    api.Print(f\"Resized area: {args.Area.Width} x {args.Area.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/Area/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/Area/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ChartSizeEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartSizeEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartSizeEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.SizeChanged += OnChartSizeChanged;\n}\n\nprivate void OnChartSizeChanged(ChartSizeEventArgs args)\n{\n    Print(\"Chart {0} {1} size: {2} x {3}\", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.Width, args.Chart.Height);\n}","python":"def on_start(self):\n    api.Chart.SizeChanged += self.on_chart_size_changed\n\ndef on_chart_size_changed(self, args):\n    api.Print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} size: {args.Chart.Width} x {args.Chart.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartSizeEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartStaticText","kind":"interface","name":"ChartStaticText","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartStaticText","python":"ChartStaticText","summary":"Represents the chart static text.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Text;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawStaticText method to draw static locked text on chart\n    public partial class ChartStaticTextSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stringBuilder = new StringBuilder();\n\n            stringBuilder.AppendLine(\"Symbol: \" + SymbolName);\n            stringBuilder.AppendLine(\"TimeFrame: \" + TimeFrame);\n            stringBuilder.AppendLine(\"Chart Type: \" + Chart.ChartType);\n\n            Chart.DrawStaticText(\"Static_Sample\", stringBuilder.ToString(), VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        text = f\"Symbol: {api.SymbolName}\\nTimeFrame: {api.TimeFrame}\\nChart Type: {api.Chart.ChartType}\"\n        api.Chart.DrawStaticText(\"Static_Sample\", text, VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartStaticText.Color: Color","summary":"Gets or sets the chart static text color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", \"Spread: \" + Symbol.Spread / Symbol.PipSize, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.Color = Color.Yellow;\nPrint(\"Static text color: {0}\", text.Color);","python":"text = api.Chart.DrawStaticText(\"info\", f\"Spread: {api.Symbol.Spread / api.Symbol.PipSize}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.Color = Color.Yellow\napi.Print(f\"Static text color: {text.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.FontFamily","kind":"property","name":"FontFamily","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"string FontFamily {get; set;}","python":"chartStaticText.FontFamily: str","summary":"Gets or sets the font style of the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.FontFamily = \"Consolas\";\nPrint(\"Static text font family: {0}\", text.FontFamily);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.FontFamily = \"Consolas\"\napi.Print(f\"Static text font family: {text.FontFamily}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontFamily/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontFamily/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.FontSize","kind":"property","name":"FontSize","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"double FontSize {get; set;}","python":"chartStaticText.FontSize: float","summary":"Gets or sets the font size of text","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.FontSize = 16;\nPrint(\"Static text font size: {0}\", text.FontSize);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.FontSize = 16\napi.Print(f\"Static text font size: {text.FontSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.HorizontalAlignment","kind":"property","name":"HorizontalAlignment","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"HorizontalAlignment HorizontalAlignment {get; set;}","python":"chartStaticText.HorizontalAlignment: HorizontalAlignment","summary":"Gets or sets the chart static text horizontal alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.HorizontalAlignment = HorizontalAlignment.Left;\nPrint(\"Static text horizontal alignment: {0}\", text.HorizontalAlignment);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.HorizontalAlignment = HorizontalAlignment.Left\napi.Print(f\"Static text horizontal alignment: {text.HorizontalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.IsBold","kind":"property","name":"IsBold","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsBold {get; set;}","python":"chartStaticText.IsBold: bool","summary":"Gets or sets if the text is Bold or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.IsBold = true;\nPrint(\"Static text is bold: {0}\", text.IsBold);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.IsBold = True\napi.Print(f\"Static text is bold: {text.IsBold}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsBold/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsBold/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.IsItalic","kind":"property","name":"IsItalic","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsItalic {get; set;}","python":"chartStaticText.IsItalic: bool","summary":"Gets or sets if the text is Italic or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.IsItalic = true;\nPrint(\"Static text is italic: {0}\", text.IsItalic);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.IsItalic = True\napi.Print(f\"Static text is italic: {text.IsItalic}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsItalic/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsItalic/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.IsUnderlined","kind":"property","name":"IsUnderlined","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsUnderlined {get; set;}","python":"chartStaticText.IsUnderlined: bool","summary":"Gets or sets if the text is Underlined or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.IsUnderlined = true;\nPrint(\"Static text is underlined: {0}\", text.IsUnderlined);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.IsUnderlined = True\napi.Print(f\"Static text is underlined: {text.IsUnderlined}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsUnderlined/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsUnderlined/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.Text","kind":"property","name":"Text","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"string Text {get; set;}","python":"chartStaticText.Text: str","summary":"Gets or sets the chart static text content.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", string.Empty, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.Text = string.Format(\"Positions: {0} | Equity: {1}\", Positions.Count, Account.Equity);\nPrint(\"Static text: {0}\", text.Text);","python":"text = api.Chart.DrawStaticText(\"info\", \"\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.Text = f\"Positions: {api.Positions.Count} | Equity: {api.Account.Equity}\"\napi.Print(f\"Static text: {text.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartStaticText.VerticalAlignment","kind":"property","name":"VerticalAlignment","type":"T:cAlgo.API.ChartStaticText","namespace":"cAlgo.API","group":"Drawings","csharp":"VerticalAlignment VerticalAlignment {get; set;}","python":"chartStaticText.VerticalAlignment: VerticalAlignment","summary":"Gets or sets the chart static text vertical alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawStaticText(\"info\", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);\ntext.VerticalAlignment = VerticalAlignment.Bottom;\nPrint(\"Static text vertical alignment: {0}\", text.VerticalAlignment);","python":"text = api.Chart.DrawStaticText(\"info\", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)\ntext.VerticalAlignment = VerticalAlignment.Bottom\napi.Print(f\"Static text vertical alignment: {text.VerticalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartTemplate","kind":"interface","name":"ChartTemplate","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplate","python":"ChartTemplate","summary":"Represents chart template.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class ChartTemplate : Robot\n{\n    protected override void OnStart()\n    {\n        foreach (var chartTemplate in ChartTemplates)\n        {\n            Print($\"Name: {chartTemplate.Name} | Indicators: {chartTemplate.Indicators.Count} | Robots: {chartTemplate.Robots.Count}\");\n        }\n\n        ChartTemplates.Get(\"Template Name\")?.Apply(Chart);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartTemplate in api.ChartTemplates:\n            print(f\"Name: {chartTemplate.Name} | Indicators: {chartTemplate.Indicators.Count} | Robots: {chartTemplate.Robots.Count}\")\n\n        api.ChartTemplates.Get(\"Template Name\").Apply(api.Chart)","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"M:cAlgo.API.ChartTemplate.Apply(cAlgo.API.Chart)","kind":"method","name":"Apply","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"void Apply(Chart chart)","python":"chartTemplate.Apply(chart: Chart) -> None","summary":"Applies current chart template to a chart.","remarks":null,"parameters":[{"name":"chart","csharpType":"Chart","pythonType":"Chart","summary":"Chart that will be current template applied to."}],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.Apply(Chart);\n    Print(\"Applied template {0}\", template.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.Apply(api.Chart)\n    api.Print(f\"Applied template {template.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Apply/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Apply/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"P:cAlgo.API.ChartTemplate.ColorSettings","kind":"property","name":"ColorSettings","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateColorSettings ColorSettings {get;}","python":"chartTemplate.ColorSettings: ChartTemplateColorSettings","summary":"Gets the chart template color settings.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateColorSettings","pythonType":"ChartTemplateColorSettings","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BackgroundColor = Color.Black;\n    Print(\"Template background: {0}\", template.ColorSettings.BackgroundColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BackgroundColor = Color.Black\n    api.Print(f\"Template background: {template.ColorSettings.BackgroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/ColorSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/ColorSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"P:cAlgo.API.ChartTemplate.DisplaySettings","kind":"property","name":"DisplaySettings","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateDisplaySettings DisplaySettings {get;}","python":"chartTemplate.DisplaySettings: ChartTemplateDisplaySettings","summary":"Gets the chart template display settings.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateDisplaySettings","pythonType":"ChartTemplateDisplaySettings","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Grid = false;\n    Print(\"Template grid shown: {0}\", template.DisplaySettings.Grid);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Grid = False\n    api.Print(f\"Template grid shown: {template.DisplaySettings.Grid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/DisplaySettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/DisplaySettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"P:cAlgo.API.ChartTemplate.Indicators","kind":"property","name":"Indicators","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateIndicators Indicators {get;}","python":"chartTemplate.Indicators: ChartTemplateIndicators","summary":"Gets the indicators of chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateIndicators","pythonType":"ChartTemplateIndicators","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var indicator in template.Indicators)\n        Print(\"Template indicator: {0}\", indicator.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        api.Print(f\"Template indicator: {indicator.Type.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Indicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Indicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"P:cAlgo.API.ChartTemplate.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"string Name {get;}","python":"chartTemplate.Name: str","summary":"Gets the chart template name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"foreach (var template in ChartTemplates)\n    Print(\"Chart template: {0}\", template.Name);","python":"for template in api.ChartTemplates:\n    api.Print(f\"Chart template: {template.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"P:cAlgo.API.ChartTemplate.Robots","kind":"property","name":"Robots","type":"T:cAlgo.API.ChartTemplate","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateRobots Robots {get;}","python":"chartTemplate.Robots: ChartTemplateRobots","summary":"Gets the robots of chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateRobots","pythonType":"ChartTemplateRobots","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var robot in template.Robots)\n        Print(\"Template cBot: {0}\", robot.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        api.Print(f\"Template cBot: {robot.Type.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Robots/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplate/Robots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more)."}]}
{"id":"T:cAlgo.API.ChartTemplateAddedEventArgs","kind":"class","name":"ChartTemplateAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartTemplateAddedEventArgs","python":"ChartTemplateAddedEventArgs","summary":"Occurs when a new chart template is added.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Added += OnChartTemplatesAdded;\n}\n\nprivate void OnChartTemplatesAdded(ChartTemplateAddedEventArgs args)\n{\n    Print(\"Chart template {0} added\", args.ChartTemplate.Name);\n}","python":"def on_start(self):\n    api.ChartTemplates.Added += self.on_chart_templates_added\n\ndef on_chart_templates_added(self, args):\n    api.Print(f\"Chart template {args.ChartTemplate.Name} added\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartTemplates.Added)."}]}
{"id":"P:cAlgo.API.ChartTemplateAddedEventArgs.ChartTemplate","kind":"property","name":"ChartTemplate","type":"T:cAlgo.API.ChartTemplateAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartTemplate ChartTemplate {get;}","python":"chartTemplateAddedEventArgs.ChartTemplate: ChartTemplate","summary":"Gets the chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Added += OnChartTemplatesAdded;\n}\n\nprivate void OnChartTemplatesAdded(ChartTemplateAddedEventArgs args)\n{\n    if (args.ChartTemplate.Name == \"My Template\")\n        args.ChartTemplate.Apply(Chart);\n}","python":"def on_start(self):\n    api.ChartTemplates.Added += self.on_chart_templates_added\n\ndef on_chart_templates_added(self, args):\n    if args.ChartTemplate.Name == \"My Template\":\n        args.ChartTemplate.Apply(api.Chart)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateAddedEventArgs/ChartTemplate/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateAddedEventArgs/ChartTemplate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartTemplates.Added)."}]}
{"id":"T:cAlgo.API.ChartTemplateAlgoInstanceParameter","kind":"interface","name":"ChartTemplateAlgoInstanceParameter","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateAlgoInstanceParameter","python":"ChartTemplateAlgoInstanceParameter","summary":"The interface representing a chart template indicator / robot instance parameter.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var indicator in template.Indicators)\n    {\n        foreach (var parameter in indicator.Parameters)\n            Print(\"{0}: {1} = {2}\", indicator.Type.Name, parameter.Name, parameter.Value);\n    }\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        for parameter in indicator.Parameters:\n            api.Print(f\"{indicator.Type.Name}: {parameter.Name} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateAlgoInstanceParameters, ChartTemplateAlgoInstanceParameters.Item)."}]}
{"id":"P:cAlgo.API.ChartTemplateAlgoInstanceParameter.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ChartTemplateAlgoInstanceParameter","namespace":"cAlgo.API","group":"Templates","csharp":"string Name {get;}","python":"chartTemplateAlgoInstanceParameter.Name: str","summary":"Gets the name of a parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nif (indicator != null)\n{\n    foreach (var parameter in indicator.Parameters)\n        Print(\"Parameter name: {0}\", parameter.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        for parameter in indicator.Parameters:\n            api.Print(f\"Parameter name: {parameter.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateAlgoInstanceParameters, ChartTemplateAlgoInstanceParameters.Item)."}]}
{"id":"P:cAlgo.API.ChartTemplateAlgoInstanceParameter.Value","kind":"property","name":"Value","type":"T:cAlgo.API.ChartTemplateAlgoInstanceParameter","namespace":"cAlgo.API","group":"Templates","csharp":"object Value {get; set;}","python":"chartTemplateAlgoInstanceParameter.Value: object","summary":"Gets the value of a parameter.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nvar periods = indicator?.Parameters[\"Periods\"];\nif (periods != null)\n{\n    periods.Value = 50;\n    Print(\"Periods: {0}\", periods.Value);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        periods = indicator.Parameters[\"Periods\"]\n        if periods is not None:\n            periods.Value = 50\n            api.Print(f\"Periods: {periods.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameter/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateAlgoInstanceParameters, ChartTemplateAlgoInstanceParameters.Item)."}]}
{"id":"T:cAlgo.API.ChartTemplateAlgoInstanceParameters","kind":"interface","name":"ChartTemplateAlgoInstanceParameters","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateAlgoInstanceParameters","python":"ChartTemplateAlgoInstanceParameters","summary":"Represents the collection of all the parameters of a chart template indicator or Robot.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar robot = template?.Robots.FirstOrDefault();\nif (robot != null)\n{\n    Print(\"{0} has {1} parameters\", robot.Type.Name, robot.Parameters.Count);\n    foreach (var parameter in robot.Parameters)\n        Print(\"{0} = {1}\", parameter.Name, parameter.Value);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        api.Print(f\"{robot.Type.Name} has {robot.Parameters.Count} parameters\")\n        for parameter in robot.Parameters:\n            api.Print(f\"{parameter.Name} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicator.Parameters, ChartTemplateRobot.Parameters)."}]}
{"id":"P:cAlgo.API.ChartTemplateAlgoInstanceParameters.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartTemplateAlgoInstanceParameters","namespace":"cAlgo.API","group":"Templates","csharp":"int Count {get;}","python":"chartTemplateAlgoInstanceParameters.Count: int","summary":"Gets the number of parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nif (indicator != null)\n    Print(\"{0} parameters count: {1}\", indicator.Type.Name, indicator.Parameters.Count);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        api.Print(f\"{indicator.Type.Name} parameters count: {indicator.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicator.Parameters, ChartTemplateRobot.Parameters)."}]}
{"id":"P:cAlgo.API.ChartTemplateAlgoInstanceParameters.Item(System.String)","kind":"property","name":"Item","type":"T:cAlgo.API.ChartTemplateAlgoInstanceParameters","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateAlgoInstanceParameter Item {get;}","python":"chartTemplateAlgoInstanceParameters[name: str] -> ChartTemplateAlgoInstanceParameter","summary":"Gets a parameter by it is name.","remarks":"It will return null if parameter not found.","parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Parameter Name"}],"returns":{"csharpType":"ChartTemplateAlgoInstanceParameter","pythonType":"ChartTemplateAlgoInstanceParameter","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nvar source = indicator?.Parameters[\"Source\"];\nif (source != null)\n    Print(\"Source parameter value: {0}\", source.Value);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        source = indicator.Parameters[\"Source\"]\n        if source is not None:\n            api.Print(f\"Source parameter value: {source.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateAlgoInstanceParameters/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicator.Parameters, ChartTemplateRobot.Parameters)."}]}
{"id":"T:cAlgo.API.ChartTemplateColorSettings","kind":"interface","name":"ChartTemplateColorSettings","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateColorSettings","python":"ChartTemplateColorSettings","summary":"Represents the chart template Color Settings.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class ChartTemplate : Robot\n{\n    protected override void OnStart()\n    {\n        var template = ChartTemplates.Get(\"Template Name\");\n\n        if (template is null)\n        {\n            Print(\"Template not found\");\n            return;\n        }\n\n        template.ColorSettings.AskPriceLineColor = Color.Red;\n        template.ColorSettings.BidPriceLineColor = Color.Red;\n        template.ColorSettings.BackgroundColor = Color.Red;\n        template.ColorSettings.BearFillColor = Color.Red;\n        template.ColorSettings.BearOutlineColor = Color.Red;\n        template.ColorSettings.BullFillColor = Color.Red;\n        template.ColorSettings.BullOutlineColor = Color.Red;\n        template.ColorSettings.BuyColor = Color.Red;\n        template.ColorSettings.ForegroundColor = Color.Red;\n        template.ColorSettings.GridLinesColor = Color.Red;\n        template.ColorSettings.LosingDealColor = Color.Red;\n        template.ColorSettings.PeriodSeparatorColor = Color.Red;\n        template.ColorSettings.SellColor = Color.Red;\n        template.ColorSettings.TickVolumeColor = Color.Red;\n        template.ColorSettings.WinningDealColor = Color.Red;\n        template.ColorSettings.AreaFillColor = Color.Red;\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        template = api.ChartTemplates.Get(\"Template Name\")\n\n        if template is None:\n            print(\"Template not found\")\n            return\n\n        template.ColorSettings.AskPriceLineColor = Color.Red\n        template.ColorSettings.BidPriceLineColor = Color.Red\n        template.ColorSettings.BackgroundColor = Color.Red\n        template.ColorSettings.BearFillColor = Color.Red\n        template.ColorSettings.BearOutlineColor = Color.Red\n        template.ColorSettings.BullFillColor = Color.Red\n        template.ColorSettings.BullOutlineColor = Color.Red\n        template.ColorSettings.BuyColor = Color.Red\n        template.ColorSettings.ForegroundColor = Color.Red\n        template.ColorSettings.GridLinesColor = Color.Red\n        template.ColorSettings.LosingDealColor = Color.Red\n        template.ColorSettings.PeriodSeparatorColor = Color.Red\n        template.ColorSettings.SellColor = Color.Red\n        template.ColorSettings.TickVolumeColor = Color.Red\n        template.ColorSettings.WinningDealColor = Color.Red\n        template.ColorSettings.AreaFillColor = Color.Red","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.AreaFillColor","kind":"property","name":"AreaFillColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color AreaFillColor {get; set;}","python":"chartTemplateColorSettings.AreaFillColor: Color","summary":"Gets or sets the color of area chart fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.AreaFillColor = Color.FromArgb(60, Color.SteelBlue);\n    Print(\"Template area fill color: {0}\", template.ColorSettings.AreaFillColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.AreaFillColor = Color.FromArgb(60, Color.SteelBlue)\n    api.Print(f\"Template area fill color: {template.ColorSettings.AreaFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/AreaFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/AreaFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.AskPriceLineColor","kind":"property","name":"AskPriceLineColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color AskPriceLineColor {get; set;}","python":"chartTemplateColorSettings.AskPriceLineColor: Color","summary":"Gets or sets the color of the ask price line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.AskPriceLineColor = Color.Tomato;\n    Print(\"Template ask line color: {0}\", template.ColorSettings.AskPriceLineColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.AskPriceLineColor = Color.Tomato\n    api.Print(f\"Template ask line color: {template.ColorSettings.AskPriceLineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/AskPriceLineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/AskPriceLineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BackgroundColor {get; set;}","python":"chartTemplateColorSettings.BackgroundColor: Color","summary":"Gets or sets the color of the chart background.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BackgroundColor = Color.Black;\n    Print(\"Template background color: {0}\", template.ColorSettings.BackgroundColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BackgroundColor = Color.Black\n    api.Print(f\"Template background color: {template.ColorSettings.BackgroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BearFillColor","kind":"property","name":"BearFillColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BearFillColor {get; set;}","python":"chartTemplateColorSettings.BearFillColor: Color","summary":"Gets or sets the color of the bear candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BearFillColor = Color.OrangeRed;\n    Print(\"Template bear fill color: {0}\", template.ColorSettings.BearFillColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BearFillColor = Color.OrangeRed\n    api.Print(f\"Template bear fill color: {template.ColorSettings.BearFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BearFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BearFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BearOutlineColor","kind":"property","name":"BearOutlineColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BearOutlineColor {get; set;}","python":"chartTemplateColorSettings.BearOutlineColor: Color","summary":"Gets or sets the color of the bear candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BearOutlineColor = Color.Red;\n    Print(\"Template bear outline color: {0}\", template.ColorSettings.BearOutlineColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BearOutlineColor = Color.Red\n    api.Print(f\"Template bear outline color: {template.ColorSettings.BearOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BearOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BearOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BidPriceLineColor","kind":"property","name":"BidPriceLineColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BidPriceLineColor {get; set;}","python":"chartTemplateColorSettings.BidPriceLineColor: Color","summary":"Gets or sets the color of the bid price line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BidPriceLineColor = Color.DodgerBlue;\n    Print(\"Template bid line color: {0}\", template.ColorSettings.BidPriceLineColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BidPriceLineColor = Color.DodgerBlue\n    api.Print(f\"Template bid line color: {template.ColorSettings.BidPriceLineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BidPriceLineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BidPriceLineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BullFillColor","kind":"property","name":"BullFillColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BullFillColor {get; set;}","python":"chartTemplateColorSettings.BullFillColor: Color","summary":"Gets or sets the color of the bull candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BullFillColor = Color.LimeGreen;\n    Print(\"Template bull fill color: {0}\", template.ColorSettings.BullFillColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BullFillColor = Color.LimeGreen\n    api.Print(f\"Template bull fill color: {template.ColorSettings.BullFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BullFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BullFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BullOutlineColor","kind":"property","name":"BullOutlineColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BullOutlineColor {get; set;}","python":"chartTemplateColorSettings.BullOutlineColor: Color","summary":"Gets or sets the color of the bull candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BullOutlineColor = Color.Green;\n    Print(\"Template bull outline color: {0}\", template.ColorSettings.BullOutlineColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BullOutlineColor = Color.Green\n    api.Print(f\"Template bull outline color: {template.ColorSettings.BullOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BullOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BullOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.BuyColor","kind":"property","name":"BuyColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color BuyColor {get; set;}","python":"chartTemplateColorSettings.BuyColor: Color","summary":"Gets or sets the color of Buy positions and orders.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.BuyColor = Color.RoyalBlue;\n    Print(\"Template buy color: {0}\", template.ColorSettings.BuyColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.BuyColor = Color.RoyalBlue\n    api.Print(f\"Template buy color: {template.ColorSettings.BuyColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BuyColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/BuyColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.ForegroundColor","kind":"property","name":"ForegroundColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color ForegroundColor {get; set;}","python":"chartTemplateColorSettings.ForegroundColor: Color","summary":"Gets or sets the color of the chart foreground.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.ForegroundColor = Color.WhiteSmoke;\n    Print(\"Template foreground color: {0}\", template.ColorSettings.ForegroundColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.ForegroundColor = Color.WhiteSmoke\n    api.Print(f\"Template foreground color: {template.ColorSettings.ForegroundColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/ForegroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/ForegroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.GridLinesColor","kind":"property","name":"GridLinesColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color GridLinesColor {get; set;}","python":"chartTemplateColorSettings.GridLinesColor: Color","summary":"Gets or sets the color of the grid lines.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.GridLinesColor = Color.FromArgb(40, Color.Gray);\n    Print(\"Template grid lines color: {0}\", template.ColorSettings.GridLinesColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.GridLinesColor = Color.FromArgb(40, Color.Gray)\n    api.Print(f\"Template grid lines color: {template.ColorSettings.GridLinesColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/GridLinesColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/GridLinesColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.LosingDealColor","kind":"property","name":"LosingDealColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color LosingDealColor {get; set;}","python":"chartTemplateColorSettings.LosingDealColor: Color","summary":"Gets or sets the color of the losing deal.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.LosingDealColor = Color.Red;\n    Print(\"Template losing deal color: {0}\", template.ColorSettings.LosingDealColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.LosingDealColor = Color.Red\n    api.Print(f\"Template losing deal color: {template.ColorSettings.LosingDealColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/LosingDealColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/LosingDealColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.PeriodSeparatorColor","kind":"property","name":"PeriodSeparatorColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color PeriodSeparatorColor {get; set;}","python":"chartTemplateColorSettings.PeriodSeparatorColor: Color","summary":"Gets or sets the color of the period separator.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.PeriodSeparatorColor = Color.DimGray;\n    Print(\"Template period separator color: {0}\", template.ColorSettings.PeriodSeparatorColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.PeriodSeparatorColor = Color.DimGray\n    api.Print(f\"Template period separator color: {template.ColorSettings.PeriodSeparatorColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/PeriodSeparatorColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/PeriodSeparatorColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.SellColor","kind":"property","name":"SellColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color SellColor {get; set;}","python":"chartTemplateColorSettings.SellColor: Color","summary":"Gets or sets the color of Sell order positions and orders.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.SellColor = Color.Crimson;\n    Print(\"Template sell color: {0}\", template.ColorSettings.SellColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.SellColor = Color.Crimson\n    api.Print(f\"Template sell color: {template.ColorSettings.SellColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/SellColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/SellColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.TickVolumeColor","kind":"property","name":"TickVolumeColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color TickVolumeColor {get; set;}","python":"chartTemplateColorSettings.TickVolumeColor: Color","summary":"Gets or sets the color of the tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.TickVolumeColor = Color.SteelBlue;\n    Print(\"Template tick volume color: {0}\", template.ColorSettings.TickVolumeColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.TickVolumeColor = Color.SteelBlue\n    api.Print(f\"Template tick volume color: {template.ColorSettings.TickVolumeColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/TickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/TickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateColorSettings.WinningDealColor","kind":"property","name":"WinningDealColor","type":"T:cAlgo.API.ChartTemplateColorSettings","namespace":"cAlgo.API","group":"Templates","csharp":"Color WinningDealColor {get; set;}","python":"chartTemplateColorSettings.WinningDealColor: Color","summary":"Gets or sets the color of the winning deal.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.ColorSettings.WinningDealColor = Color.Green;\n    Print(\"Template winning deal color: {0}\", template.ColorSettings.WinningDealColor);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.ColorSettings.WinningDealColor = Color.Green\n    api.Print(f\"Template winning deal color: {template.ColorSettings.WinningDealColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/WinningDealColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateColorSettings/WinningDealColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings)."}]}
{"id":"T:cAlgo.API.ChartTemplateDisplaySettings","kind":"interface","name":"ChartTemplateDisplaySettings","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateDisplaySettings","python":"ChartTemplateDisplaySettings","summary":"Represents the chart template display Settings.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class ChartTemplate : Robot\n{\n    protected override void OnStart()\n    {\n        var template = ChartTemplates.Get(\"Template Name\");\n\n        if (template is null)\n        {\n            Print(\"Template not found\");\n            return;\n        }\n\n        template.DisplaySettings.AskPriceLine = true;\n        template.DisplaySettings.Bars = true;\n        template.DisplaySettings.BidPriceLine = true;\n        template.DisplaySettings.ChartScale = true;\n        template.DisplaySettings.DealMap = true;\n        template.DisplaySettings.Grid = true;\n        template.DisplaySettings.IndicatorTitles = true;\n        template.DisplaySettings.MarketSentiment = true;\n        template.DisplaySettings.Orders = true;\n        template.DisplaySettings.PeriodSeparators = true;\n        template.DisplaySettings.Positions = true;\n        template.DisplaySettings.PriceAlerts = true;\n        template.DisplaySettings.PriceAxisOverlayButtons = true;\n        template.DisplaySettings.QuickTradeButtons = true;\n        template.DisplaySettings.Targets = true;\n        template.DisplaySettings.TickVolume = true;\n        template.DisplaySettings.AddRobotButton = true;\n        template.DisplaySettings.PriceScaleMode = ChartPriceScaleMode.Percent;\n        template.DisplaySettings.IsPriceScaleInverted = true;\n        template.DisplaySettings.IsPriceToBarRatioLocked = false;\n        template.DisplaySettings.IsScalePriceChartOnly = true;\n        template.DisplaySettings.PriceAxisPosition = ChartPriceAxisPosition.Left;\n\n        Print(\"Price to bar ratio: {0}\", template.DisplaySettings.PriceToBarRatio);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        template = api.ChartTemplates.Get(\"Template Name\")\n\n        if template is None:\n            print(\"Template not found\")\n            return\n\n        template.DisplaySettings.AskPriceLine = True\n        template.DisplaySettings.Bars = True\n        template.DisplaySettings.BidPriceLine = True\n        template.DisplaySettings.ChartScale = True\n        template.DisplaySettings.DealMap = True\n        template.DisplaySettings.Grid = True\n        template.DisplaySettings.IndicatorTitles = True\n        template.DisplaySettings.MarketSentiment = True\n        template.DisplaySettings.Orders = True\n        template.DisplaySettings.PeriodSeparators = True\n        template.DisplaySettings.Positions = True\n        template.DisplaySettings.PriceAlerts = True\n        template.DisplaySettings.PriceAxisOverlayButtons = True\n        template.DisplaySettings.QuickTradeButtons = True\n        template.DisplaySettings.Targets = True\n        template.DisplaySettings.TickVolume = True\n        template.DisplaySettings.AddRobotButton = True\n        template.DisplaySettings.PriceScaleMode = ChartPriceScaleMode.Percent\n        template.DisplaySettings.IsPriceScaleInverted = True\n        template.DisplaySettings.IsPriceToBarRatioLocked = False\n        template.DisplaySettings.IsScalePriceChartOnly = True\n        template.DisplaySettings.PriceAxisPosition = ChartPriceAxisPosition.Left\n\n        print(f\"Price to bar ratio: {template.DisplaySettings.PriceToBarRatio}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.AddRobotButton","kind":"property","name":"AddRobotButton","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool AddRobotButton {get; set;}","python":"chartTemplateDisplaySettings.AddRobotButton: bool","summary":"Defines if the Add cBot button is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.AddRobotButton = false;\n    Print(\"Template shows the Add cBot button: {0}\", template.DisplaySettings.AddRobotButton);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.AddRobotButton = False\n    api.Print(f\"Template shows the Add cBot button: {template.DisplaySettings.AddRobotButton}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/AddRobotButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/AddRobotButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.AskPriceLine","kind":"property","name":"AskPriceLine","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool AskPriceLine {get; set;}","python":"chartTemplateDisplaySettings.AskPriceLine: bool","summary":"Defines if the Ask Price Line is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.AskPriceLine = true;\n    Print(\"Template shows the ask line: {0}\", template.DisplaySettings.AskPriceLine);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.AskPriceLine = True\n    api.Print(f\"Template shows the ask line: {template.DisplaySettings.AskPriceLine}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/AskPriceLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/AskPriceLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool Bars {get; set;}","python":"chartTemplateDisplaySettings.Bars: bool","summary":"Defines if the Bars is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Bars = true;\n    Print(\"Template shows bars: {0}\", template.DisplaySettings.Bars);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Bars = True\n    api.Print(f\"Template shows bars: {template.DisplaySettings.Bars}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.BidPriceLine","kind":"property","name":"BidPriceLine","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool BidPriceLine {get; set;}","python":"chartTemplateDisplaySettings.BidPriceLine: bool","summary":"Defines if the Bid Price Line is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.BidPriceLine = true;\n    Print(\"Template shows the bid line: {0}\", template.DisplaySettings.BidPriceLine);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.BidPriceLine = True\n    api.Print(f\"Template shows the bid line: {template.DisplaySettings.BidPriceLine}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/BidPriceLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/BidPriceLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.ChartScale","kind":"property","name":"ChartScale","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool ChartScale {get; set;}","python":"chartTemplateDisplaySettings.ChartScale: bool","summary":"Defines if the Chart Scale is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.ChartScale = true;\n    Print(\"Template shows the chart scale: {0}\", template.DisplaySettings.ChartScale);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.ChartScale = True\n    api.Print(f\"Template shows the chart scale: {template.DisplaySettings.ChartScale}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ChartScale/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ChartScale/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.ChartType","kind":"property","name":"ChartType","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"ChartType ChartType {get; set;}","python":"chartTemplateDisplaySettings.ChartType: ChartType","summary":"Gets or sets the type of the chart for chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.ChartType = ChartType.Candlesticks;\n    Print(\"Template chart type: {0}\", template.DisplaySettings.ChartType);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.ChartType = ChartType.Candlesticks\n    api.Print(f\"Template chart type: {template.DisplaySettings.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.DealMap","kind":"property","name":"DealMap","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool DealMap {get; set;}","python":"chartTemplateDisplaySettings.DealMap: bool","summary":"Defines if the Deal Map is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.DealMap = true;\n    Print(\"Template shows the deal map: {0}\", template.DisplaySettings.DealMap);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.DealMap = True\n    api.Print(f\"Template shows the deal map: {template.DisplaySettings.DealMap}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/DealMap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/DealMap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.Grid","kind":"property","name":"Grid","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool Grid {get; set;}","python":"chartTemplateDisplaySettings.Grid: bool","summary":"Defines if the Grid is displayed on the chart background.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Grid = false;\n    Print(\"Template shows the grid: {0}\", template.DisplaySettings.Grid);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Grid = False\n    api.Print(f\"Template shows the grid: {template.DisplaySettings.Grid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Grid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Grid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.IndicatorTitles","kind":"property","name":"IndicatorTitles","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool IndicatorTitles {get; set;}","python":"chartTemplateDisplaySettings.IndicatorTitles: bool","summary":"Defines if the Indicator Titles are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.IndicatorTitles = true;\n    Print(\"Template shows indicator titles: {0}\", template.DisplaySettings.IndicatorTitles);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.IndicatorTitles = True\n    api.Print(f\"Template shows indicator titles: {template.DisplaySettings.IndicatorTitles}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IndicatorTitles/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IndicatorTitles/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.IsPriceScaleInverted","kind":"property","name":"IsPriceScaleInverted","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool IsPriceScaleInverted {get; set;}","python":"chartTemplateDisplaySettings.IsPriceScaleInverted: bool","summary":"Defines if the price scale is inverted for chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.IsPriceScaleInverted = true;\n\nPrint(\"Template price scale inverted: {0}\", template.DisplaySettings.IsPriceScaleInverted);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.IsPriceScaleInverted = True\n\nprint(f\"Template price scale inverted: {template.DisplaySettings.IsPriceScaleInverted}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsPriceScaleInverted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsPriceScaleInverted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.IsPriceToBarRatioLocked","kind":"property","name":"IsPriceToBarRatioLocked","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool IsPriceToBarRatioLocked {get; set;}","python":"chartTemplateDisplaySettings.IsPriceToBarRatioLocked: bool","summary":"Defines if the price to bar ratio is locked for chart template. Locking sets the price scale mode to Regular.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.IsPriceToBarRatioLocked = true;\n\nPrint(\"Template price to bar ratio locked: {0} | Price scale mode: {1}\", template.DisplaySettings.IsPriceToBarRatioLocked, template.DisplaySettings.PriceScaleMode);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.IsPriceToBarRatioLocked = True\n\nprint(f\"Template price to bar ratio locked: {template.DisplaySettings.IsPriceToBarRatioLocked} | Price scale mode: {template.DisplaySettings.PriceScaleMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsPriceToBarRatioLocked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsPriceToBarRatioLocked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.IsScalePriceChartOnly","kind":"property","name":"IsScalePriceChartOnly","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool IsScalePriceChartOnly {get; set;}","python":"chartTemplateDisplaySettings.IsScalePriceChartOnly: bool","summary":"Defines if the auto scale fits only the bars for chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.IsScalePriceChartOnly = true;\n\nPrint(\"Template scale price chart only: {0}\", template.DisplaySettings.IsScalePriceChartOnly);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.IsScalePriceChartOnly = True\n\nprint(f\"Template scale price chart only: {template.DisplaySettings.IsScalePriceChartOnly}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsScalePriceChartOnly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/IsScalePriceChartOnly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.MarketSentiment","kind":"property","name":"MarketSentiment","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool MarketSentiment {get; set;}","python":"chartTemplateDisplaySettings.MarketSentiment: bool","summary":"Defines if the Market Sentiment is visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.MarketSentiment = true;\n    Print(\"Template shows market sentiment: {0}\", template.DisplaySettings.MarketSentiment);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.MarketSentiment = True\n    api.Print(f\"Template shows market sentiment: {template.DisplaySettings.MarketSentiment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/MarketSentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/MarketSentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.Orders","kind":"property","name":"Orders","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool Orders {get; set;}","python":"chartTemplateDisplaySettings.Orders: bool","summary":"Defines if the Orders are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Orders = true;\n    Print(\"Template shows orders: {0}\", template.DisplaySettings.Orders);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Orders = True\n    api.Print(f\"Template shows orders: {template.DisplaySettings.Orders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Orders/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Orders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PeriodSeparators","kind":"property","name":"PeriodSeparators","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool PeriodSeparators {get; set;}","python":"chartTemplateDisplaySettings.PeriodSeparators: bool","summary":"Defines if the Period Separators are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.PeriodSeparators = true;\n    Print(\"Template shows period separators: {0}\", template.DisplaySettings.PeriodSeparators);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.PeriodSeparators = True\n    api.Print(f\"Template shows period separators: {template.DisplaySettings.PeriodSeparators}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PeriodSeparators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PeriodSeparators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool Positions {get; set;}","python":"chartTemplateDisplaySettings.Positions: bool","summary":"Defines if the Positions are displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Positions = true;\n    Print(\"Template shows positions: {0}\", template.DisplaySettings.Positions);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Positions = True\n    api.Print(f\"Template shows positions: {template.DisplaySettings.Positions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PriceAlerts","kind":"property","name":"PriceAlerts","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool PriceAlerts {get; set;}","python":"chartTemplateDisplaySettings.PriceAlerts: bool","summary":"Defines if the Price Alerts are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.PriceAlerts = true;\n    Print(\"Template shows price alerts: {0}\", template.DisplaySettings.PriceAlerts);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.PriceAlerts = True\n    api.Print(f\"Template shows price alerts: {template.DisplaySettings.PriceAlerts}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAlerts/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAlerts/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PriceAxisOverlayButtons","kind":"property","name":"PriceAxisOverlayButtons","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool PriceAxisOverlayButtons {get; set;}","python":"chartTemplateDisplaySettings.PriceAxisOverlayButtons: bool","summary":"Defines if the price axis overlays buttons are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.PriceAxisOverlayButtons = false;\n    Print(\"Template shows price axis overlay buttons: {0}\", template.DisplaySettings.PriceAxisOverlayButtons);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.PriceAxisOverlayButtons = False\n    api.Print(f\"Template shows price axis overlay buttons: {template.DisplaySettings.PriceAxisOverlayButtons}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAxisOverlayButtons/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAxisOverlayButtons/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PriceAxisPosition","kind":"property","name":"PriceAxisPosition","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"ChartPriceAxisPosition PriceAxisPosition {get; set;}","python":"chartTemplateDisplaySettings.PriceAxisPosition: ChartPriceAxisPosition","summary":"Gets or sets the price axis position for chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceAxisPosition","pythonType":"ChartPriceAxisPosition","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.PriceAxisPosition = ChartPriceAxisPosition.Left;\n\nPrint(\"Template price axis position: {0}\", template.DisplaySettings.PriceAxisPosition);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.PriceAxisPosition = ChartPriceAxisPosition.Left\n\nprint(f\"Template price axis position: {template.DisplaySettings.PriceAxisPosition}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAxisPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceAxisPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PriceScaleMode","kind":"property","name":"PriceScaleMode","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"ChartPriceScaleMode PriceScaleMode {get; set;}","python":"chartTemplateDisplaySettings.PriceScaleMode: ChartPriceScaleMode","summary":"Gets or sets the price scale mode for chart template. While the template price to bar ratio is locked only Regular can be set, and setting any other mode is ignored.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartPriceScaleMode","pythonType":"ChartPriceScaleMode","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.PriceScaleMode = ChartPriceScaleMode.Percent;\n\nPrint(\"Template price scale mode: {0}\", template.DisplaySettings.PriceScaleMode);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.PriceScaleMode = ChartPriceScaleMode.Percent\n\nprint(f\"Template price scale mode: {template.DisplaySettings.PriceScaleMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceScaleMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceScaleMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.PriceToBarRatio","kind":"property","name":"PriceToBarRatio","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"double PriceToBarRatio {get; set;}","python":"chartTemplateDisplaySettings.PriceToBarRatio: float","summary":"Gets or sets the price to bar ratio for chart template. Values that are not greater than zero, NaN or infinite are ignored.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Template Name\");\n\nif (template is null)\n{\n    Print(\"Template not found\");\n    return;\n}\n\ntemplate.DisplaySettings.PriceToBarRatio = Symbol.PipSize * 10;\ntemplate.DisplaySettings.IsPriceToBarRatioLocked = true;\n\nPrint(\"Template price to bar ratio: {0}\", template.DisplaySettings.PriceToBarRatio);","python":"template = api.ChartTemplates.Get(\"Template Name\")\n\nif template is None:\n    print(\"Template not found\")\n    return\n\ntemplate.DisplaySettings.PriceToBarRatio = api.Symbol.PipSize * 10\ntemplate.DisplaySettings.IsPriceToBarRatioLocked = True\n\nprint(f\"Template price to bar ratio: {template.DisplaySettings.PriceToBarRatio}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceToBarRatio/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/PriceToBarRatio/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.QuickTradeButtons","kind":"property","name":"QuickTradeButtons","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool QuickTradeButtons {get; set;}","python":"chartTemplateDisplaySettings.QuickTradeButtons: bool","summary":"Defines if the QuickTrade buttons are visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.QuickTradeButtons = false;\n    Print(\"Template shows QuickTrade buttons: {0}\", template.DisplaySettings.QuickTradeButtons);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.QuickTradeButtons = False\n    api.Print(f\"Template shows QuickTrade buttons: {template.DisplaySettings.QuickTradeButtons}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/QuickTradeButtons/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/QuickTradeButtons/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.Targets","kind":"property","name":"Targets","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool Targets {get; set;}","python":"chartTemplateDisplaySettings.Targets: bool","summary":"Defines if the Target is visible on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.Targets = true;\n    Print(\"Template shows targets: {0}\", template.DisplaySettings.Targets);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.Targets = True\n    api.Print(f\"Template shows targets: {template.DisplaySettings.Targets}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Targets/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/Targets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.TickVolume","kind":"property","name":"TickVolume","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"bool TickVolume {get; set;}","python":"chartTemplateDisplaySettings.TickVolume: bool","summary":"Defines if the Tick Volume is displayed on the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.TickVolume = false;\n    Print(\"Template shows tick volume: {0}\", template.DisplaySettings.TickVolume);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.TickVolume = False\n    api.Print(f\"Template shows tick volume: {template.DisplaySettings.TickVolume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"P:cAlgo.API.ChartTemplateDisplaySettings.ZoomLevel","kind":"property","name":"ZoomLevel","type":"T:cAlgo.API.ChartTemplateDisplaySettings","namespace":"cAlgo.API","group":"Templates","csharp":"int ZoomLevel {get; set;}","python":"chartTemplateDisplaySettings.ZoomLevel: int","summary":"Gets or sets the chart zoom percent value for chart template. Valid values are from 5 to 500 with a step of 5, as can be seen on UI in the charts Zoom control.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    template.DisplaySettings.ZoomLevel = 50;\n    Print(\"Template zoom level: {0}%\", template.DisplaySettings.ZoomLevel);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    template.DisplaySettings.ZoomLevel = 50\n    api.Print(f\"Template zoom level: {template.DisplaySettings.ZoomLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ZoomLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateDisplaySettings/ZoomLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.DisplaySettings)."}]}
{"id":"T:cAlgo.API.ChartTemplateIndicator","kind":"interface","name":"ChartTemplateIndicator","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateIndicator","python":"ChartTemplateIndicator","summary":"The interface representing an indicator of to a chart template.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var indicator in template.Indicators)\n        Print(\"Id: {0} | Type: {1} | Parameters: {2}\", indicator.Id, indicator.Type.Name, indicator.Parameters.Count);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        api.Print(f\"Id: {indicator.Id} | Type: {indicator.Type.Name} | Parameters: {indicator.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicators, ChartTemplateIndicators.Add, ChartTemplateIndicators.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateIndicator.Id","kind":"property","name":"Id","type":"T:cAlgo.API.ChartTemplateIndicator","namespace":"cAlgo.API","group":"Templates","csharp":"string Id {get;}","python":"chartTemplateIndicator.Id: str","summary":"Gets the ID of a specific indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nif (indicator != null)\n    Print(\"Found again by id: {0}\", template.Indicators.Get(indicator.Id) != null);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        api.Print(f\"Indicator id: {indicator.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicators, ChartTemplateIndicators.Add, ChartTemplateIndicators.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateIndicator.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.ChartTemplateIndicator","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateAlgoInstanceParameters Parameters {get;}","python":"chartTemplateIndicator.Parameters: ChartTemplateAlgoInstanceParameters","summary":"Gets the collection of indicator parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateAlgoInstanceParameters","pythonType":"ChartTemplateAlgoInstanceParameters","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nif (indicator != null)\n{\n    foreach (var parameter in indicator.Parameters)\n        Print(\"{0} = {1}\", parameter.Name, parameter.Value);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        for parameter in indicator.Parameters:\n            api.Print(f\"{parameter.Name} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicators, ChartTemplateIndicators.Add, ChartTemplateIndicators.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateIndicator.Type","kind":"property","name":"Type","type":"T:cAlgo.API.ChartTemplateIndicator","namespace":"cAlgo.API","group":"Templates","csharp":"IndicatorType Type {get;}","python":"chartTemplateIndicator.Type: IndicatorType","summary":"Gets the IndicatorType of an indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorType","pythonType":"IndicatorType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var indicator in template.Indicators)\n        Print(\"Indicator type: {0} | Kind: {1}\", indicator.Type.Name, indicator.Type.AlgoKind);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for indicator in template.Indicators:\n        api.Print(f\"Indicator type: {indicator.Type.Name} | Kind: {indicator.Type.AlgoKind}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicator/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicators, ChartTemplateIndicators.Add, ChartTemplateIndicators.Get)."}]}
{"id":"T:cAlgo.API.ChartTemplateIndicators","kind":"interface","name":"ChartTemplateIndicators","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateIndicators","python":"ChartTemplateIndicators","summary":"The interface representing a chart template indicator instances collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class ChartTemplate : Robot\n{\n    protected override void OnStart()\n    {\n        var template = ChartTemplates.Get(\"Template Name\");\n\n        if (template is null)\n        {\n            Print(\"Template not found\");\n            return;\n        }\n\n        template.Indicators.Add(\"Simple Moving Average\", Bars.OpenPrices, 100);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        template = api.ChartTemplates.Get(\"Template Name\")\n\n        if template is None:\n            print(\"Template not found\")\n            return\n\n        template.Indicators.Add(\"Simple Moving Average\", api.Bars.OpenPrices, 100)","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"M:cAlgo.API.ChartTemplateIndicators.Add(System.String,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartTemplateIndicators","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateIndicator Add(string name, object[] parameterValues)","python":"chartTemplateIndicators.Add(name: str, parameterValues: list[object]) -> ChartTemplateIndicator","summary":"Adds a new indicator to a chart template.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The name of an indicator."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The indicator parameter values or an anonymous object that contains indicator parameter values."}],"returns":{"csharpType":"ChartTemplateIndicator","pythonType":"ChartTemplateIndicator","summary":"An ChartTemplateIndicator representing the added indicator instance.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    var indicator = template.Indicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 50);\n    Print(\"Added indicator {0} to the template\", indicator.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    indicator = template.Indicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 50)\n    api.Print(f\"Added indicator {indicator.Type.Name} to the template\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"M:cAlgo.API.ChartTemplateIndicators.Add(cAlgo.API.IndicatorType,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartTemplateIndicators","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateIndicator Add(IndicatorType type, object[] parameterValues)","python":"chartTemplateIndicators.Add(type: IndicatorType, parameterValues: list[object]) -> ChartTemplateIndicator","summary":"Adds a new indicator to a chart template.","remarks":null,"parameters":[{"name":"type","csharpType":"IndicatorType","pythonType":"IndicatorType","summary":"The type of Indicator, you can get IndicatorType from AlgoRegistry."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The indicator parameter values or an anonymous object that contains indicator parameter values."}],"returns":{"csharpType":"ChartTemplateIndicator","pythonType":"ChartTemplateIndicator","summary":"An ChartTemplateIndicator representing the added indicator instance.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null && AlgoRegistry.Get(\"Relative Strength Index\", AlgoKind.StandardIndicator) is IndicatorType rsiType)\n{\n    var indicator = template.Indicators.Add(rsiType, new { Source = Bars.ClosePrices, Periods = 14 });\n    Print(\"Added indicator {0} to the template\", indicator.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nrsiType = api.AlgoRegistry.Get(\"Relative Strength Index\", AlgoKind.StandardIndicator)\nif template is not None and rsiType is not None:\n    indicator = template.Indicators.Add(rsiType, api.Bars.ClosePrices, 14)\n    api.Print(f\"Added indicator {indicator.Type.Name} to the template\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"M:cAlgo.API.ChartTemplateIndicators.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.ChartTemplateIndicators","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateIndicator Get(string id)","python":"chartTemplateIndicators.Get(id: str) -> ChartTemplateIndicator | None","summary":"Returns a chart template indicator by type if exists otherwise null.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"The id of Indicator, you can get."}],"returns":{"csharpType":"ChartTemplateIndicator","pythonType":"ChartTemplateIndicator","summary":"ChartTemplateIndicator if found otherwise null.","nullable":true},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicatorId = template?.Indicators.FirstOrDefault()?.Id;\nvar indicator = indicatorId != null ? template.Indicators.Get(indicatorId) : null;\nif (indicator != null)\n    Print(\"Found template indicator: {0}\", indicator.Type.Name);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for item in template.Indicators:\n        indicator = template.Indicators.Get(item.Id)\n        if indicator is not None:\n            api.Print(f\"Found template indicator: {indicator.Type.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"M:cAlgo.API.ChartTemplateIndicators.Remove(cAlgo.API.ChartTemplateIndicator)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartTemplateIndicators","namespace":"cAlgo.API","group":"Templates","csharp":"bool Remove(ChartTemplateIndicator chartTemplateIndicator)","python":"chartTemplateIndicators.Remove(chartTemplateIndicator: ChartTemplateIndicator) -> bool","summary":"Removes an indicator from a chart template.","remarks":null,"parameters":[{"name":"chartTemplateIndicator","csharpType":"ChartTemplateIndicator","pythonType":"ChartTemplateIndicator","summary":"The ChartTemplateIndicator to be removed from a chart template."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar indicator = template?.Indicators.FirstOrDefault();\nif (indicator != null)\n    Print(\"Indicator removed from the template: {0}\", template.Indicators.Remove(indicator));","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None and template.Indicators.Count > 0:\n    indicator = list(template.Indicators)[0]\n    api.Print(f\"Indicator removed from the template: {template.Indicators.Remove(indicator)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"P:cAlgo.API.ChartTemplateIndicators.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartTemplateIndicators","namespace":"cAlgo.API","group":"Templates","csharp":"int Count {get;}","python":"chartTemplateIndicators.Count: int","summary":"Gets the number of all indicators attached to a chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n    Print(\"Indicators in the template: {0}\", template.Indicators.Count);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    api.Print(f\"Indicators in the template: {template.Indicators.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateIndicators/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators)."}]}
{"id":"T:cAlgo.API.ChartTemplateRemovedEventArgs","kind":"class","name":"ChartTemplateRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartTemplateRemovedEventArgs","python":"ChartTemplateRemovedEventArgs","summary":"Occurs when a chart template is removed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Removed += OnChartTemplatesRemoved;\n}\n\nprivate void OnChartTemplatesRemoved(ChartTemplateRemovedEventArgs args)\n{\n    Print(\"Chart template {0} removed\", args.ChartTemplate.Name);\n}","python":"def on_start(self):\n    api.ChartTemplates.Removed += self.on_chart_templates_removed\n\ndef on_chart_templates_removed(self, args):\n    api.Print(f\"Chart template {args.ChartTemplate.Name} removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartTemplates.Removed)."}]}
{"id":"P:cAlgo.API.ChartTemplateRemovedEventArgs.ChartTemplate","kind":"property","name":"ChartTemplate","type":"T:cAlgo.API.ChartTemplateRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ChartTemplate ChartTemplate {get;}","python":"chartTemplateRemovedEventArgs.ChartTemplate: ChartTemplate","summary":"Gets the chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Removed += OnChartTemplatesRemoved;\n}\n\nprivate void OnChartTemplatesRemoved(ChartTemplateRemovedEventArgs args)\n{\n    Print(\"Template {0} is no longer available\", args.ChartTemplate.Name);\n}","python":"def on_start(self):\n    api.ChartTemplates.Removed += self.on_chart_templates_removed\n\ndef on_chart_templates_removed(self, args):\n    api.Print(f\"Template {args.ChartTemplate.Name} is no longer available\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateRemovedEventArgs/ChartTemplate/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTemplateRemovedEventArgs/ChartTemplate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ChartTemplates.Removed)."}]}
{"id":"T:cAlgo.API.ChartTemplateRobot","kind":"interface","name":"ChartTemplateRobot","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateRobot","python":"ChartTemplateRobot","summary":"The interface representing a Robot of a chart template.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var robot in template.Robots)\n        Print(\"Id: {0} | Type: {1} | Parameters: {2}\", robot.Id, robot.Type.Name, robot.Parameters.Count);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        api.Print(f\"Id: {robot.Id} | Type: {robot.Type.Name} | Parameters: {robot.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateRobots, ChartTemplateRobots.Add, ChartTemplateRobots.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateRobot.Id","kind":"property","name":"Id","type":"T:cAlgo.API.ChartTemplateRobot","namespace":"cAlgo.API","group":"Templates","csharp":"string Id {get;}","python":"chartTemplateRobot.Id: str","summary":"Gets the ID of a specific indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar robot = template?.Robots.FirstOrDefault();\nif (robot != null)\n    Print(\"Found again by id: {0}\", template.Robots.Get(robot.Id) != null);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        api.Print(f\"cBot id: {robot.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateRobots, ChartTemplateRobots.Add, ChartTemplateRobots.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateRobot.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.ChartTemplateRobot","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateAlgoInstanceParameters Parameters {get;}","python":"chartTemplateRobot.Parameters: ChartTemplateAlgoInstanceParameters","summary":"Gets the collection of Robot parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplateAlgoInstanceParameters","pythonType":"ChartTemplateAlgoInstanceParameters","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar robot = template?.Robots.FirstOrDefault();\nif (robot != null)\n{\n    foreach (var parameter in robot.Parameters)\n        Print(\"{0} = {1}\", parameter.Name, parameter.Value);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        for parameter in robot.Parameters:\n            api.Print(f\"{parameter.Name} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateRobots, ChartTemplateRobots.Add, ChartTemplateRobots.Get)."}]}
{"id":"P:cAlgo.API.ChartTemplateRobot.Type","kind":"property","name":"Type","type":"T:cAlgo.API.ChartTemplateRobot","namespace":"cAlgo.API","group":"Templates","csharp":"RobotType Type {get;}","python":"chartTemplateRobot.Type: RobotType","summary":"Gets the RobotType of a Robot instance.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotType","pythonType":"RobotType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    foreach (var robot in template.Robots)\n        Print(\"cBot type: {0} | Parameters: {1}\", robot.Type.Name, robot.Type.Parameters.Count);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for robot in template.Robots:\n        api.Print(f\"cBot type: {robot.Type.Name} | Parameters: {robot.Type.Parameters.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobot/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplateRobots, ChartTemplateRobots.Add, ChartTemplateRobots.Get)."}]}
{"id":"T:cAlgo.API.ChartTemplateRobots","kind":"interface","name":"ChartTemplateRobots","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplateRobots","python":"ChartTemplateRobots","summary":"The interface representing a chart template robots instances collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class ChartTemplate : Robot\n{\n    protected override void OnStart()\n    {\n        var template = ChartTemplates.Get(\"Template Name\");\n\n        if (template is null)\n        {\n            Print(\"Template not found\");\n            return;\n        }\n\n        template.Robots.Add(\"Sample Break Even\", 655732, 5, 5);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        template = api.ChartTemplates.Get(\"Template Name\")\n\n        if template is None:\n            print(\"Template not found\")\n            return\n\n        template.Robots.Add(\"Sample Break Even\", 655732, 5, 5)","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"M:cAlgo.API.ChartTemplateRobots.Add(System.String,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartTemplateRobots","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateRobot Add(string name, object[] parameterValues)","python":"chartTemplateRobots.Add(name: str, parameterValues: list[object]) -> ChartTemplateRobot","summary":"Adds a new Robot instance to a chart template.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The name of a Robot."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The Robot parameter values or an anonymous object that contains Robot parameter values."}],"returns":{"csharpType":"ChartTemplateRobot","pythonType":"ChartTemplateRobot","summary":"An ChartTemplateRobot representing the added Robot instance.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n{\n    var robot = template.Robots.Add(\"Sample Martingale cBot\", new { InitialQuantity = 0.01, StopLoss = 10, TakeProfit = 10 });\n    Print(\"Added cBot {0} to the template\", robot.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    robot = template.Robots.Add(\"Sample Martingale cBot\", 0.01, 10, 10)\n    api.Print(f\"Added cBot {robot.Type.Name} to the template\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"M:cAlgo.API.ChartTemplateRobots.Add(cAlgo.API.RobotType,System.Object[])","kind":"method","name":"Add","type":"T:cAlgo.API.ChartTemplateRobots","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateRobot Add(RobotType type, object[] parameterValues)","python":"chartTemplateRobots.Add(type: RobotType, parameterValues: list[object]) -> ChartTemplateRobot","summary":"Adds a new Robot instance to a chart template.","remarks":null,"parameters":[{"name":"type","csharpType":"RobotType","pythonType":"RobotType","summary":"The type of Robot, you can get RobotType from AlgoRegistry."},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The Robot parameter values or an anonymous object that contains Robot parameter values."}],"returns":{"csharpType":"ChartTemplateRobot","pythonType":"ChartTemplateRobot","summary":"An ChartTemplateRobot representing the added Robot instance.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null && AlgoRegistry.Get(\"Sample Martingale cBot\", AlgoKind.Robot) is RobotType robotType)\n{\n    var robot = template.Robots.Add(robotType, 0.01, 10, 10);\n    Print(\"Added cBot {0} to the template\", robot.Type.Name);\n}","python":"template = api.ChartTemplates.Get(\"My Template\")\nrobotType = api.AlgoRegistry.Get(\"Sample Martingale cBot\", AlgoKind.Robot)\nif template is not None and robotType is not None:\n    robot = template.Robots.Add(robotType, 0.01, 10, 10)\n    api.Print(f\"Added cBot {robot.Type.Name} to the template\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"M:cAlgo.API.ChartTemplateRobots.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.ChartTemplateRobots","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplateRobot Get(string id)","python":"chartTemplateRobots.Get(id: str) -> ChartTemplateRobot | None","summary":"Returns a chart template robot by type if exists otherwise null.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"The id of Robot, you can get."}],"returns":{"csharpType":"ChartTemplateRobot","pythonType":"ChartTemplateRobot","summary":"ChartTemplateRobot if found otherwise null.","nullable":true},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar robotId = template?.Robots.FirstOrDefault()?.Id;\nvar robot = robotId != null ? template.Robots.Get(robotId) : null;\nif (robot != null)\n    Print(\"Found template cBot: {0}\", robot.Type.Name);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    for item in template.Robots:\n        robot = template.Robots.Get(item.Id)\n        if robot is not None:\n            api.Print(f\"Found template cBot: {robot.Type.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"M:cAlgo.API.ChartTemplateRobots.Remove(cAlgo.API.ChartTemplateRobot)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartTemplateRobots","namespace":"cAlgo.API","group":"Templates","csharp":"bool Remove(ChartTemplateRobot chartTemplateRobot)","python":"chartTemplateRobots.Remove(chartTemplateRobot: ChartTemplateRobot) -> bool","summary":"Removes a Robot instance from a chart template.","remarks":null,"parameters":[{"name":"chartTemplateRobot","csharpType":"ChartTemplateRobot","pythonType":"ChartTemplateRobot","summary":"The ChartTemplateRobot to be removed from a chart template."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise false.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nvar robot = template?.Robots.FirstOrDefault();\nif (robot != null)\n    Print(\"cBot removed from the template: {0}\", template.Robots.Remove(robot));","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None and template.Robots.Count > 0:\n    robot = list(template.Robots)[0]\n    api.Print(f\"cBot removed from the template: {template.Robots.Remove(robot)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"P:cAlgo.API.ChartTemplateRobots.Count","kind":"property","name":"Count","type":"T:cAlgo.API.ChartTemplateRobots","namespace":"cAlgo.API","group":"Templates","csharp":"int Count {get;}","python":"chartTemplateRobots.Count: int","summary":"Gets the number of all Robots attached to a chart.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n    Print(\"cBots in the template: {0}\", template.Robots.Count);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    api.Print(f\"cBots in the template: {template.Robots.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplateRobots/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots)."}]}
{"id":"T:cAlgo.API.ChartTemplates","kind":"interface","name":"ChartTemplates","type":null,"namespace":"cAlgo.API","group":"Templates","csharp":"public interface ChartTemplates","python":"ChartTemplates","summary":"Represents collection of chart templates and provide access to chart template API.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing cAlgo.API.Collections;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\nusing System.Linq;\n\nnamespace cAlgo.Robots\n{\n    public partial class ChartTemplatesTest : Robot\n    {\n        protected override void OnStart()\n        {\n            var templatesComboBox = new ComboBox();\n\n            foreach (var template in ChartTemplates)\n            {\n                templatesComboBox.AddItem(template.Name);\n            }\n\n            ChartTemplates.Added += args =>\n            {\n                templatesComboBox.AddItem(args.ChartTemplate.Name);\n                Print($\"New Template added: {args.ChartTemplate.Name}\");\n            };\n\n            ChartTemplates.Removed += args =>\n            {\n                templatesComboBox.RemoveItem(args.ChartTemplate.Name);\n                Print($\"Template Removed: {args.ChartTemplate.Name}\");\n            };\n\n            var showTemplateInfoButton = new Button {Text = \"Show Template Info\"};\n\n            showTemplateInfoButton.Click += args =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                Print($\"Name: {template.Name} | Bots #: {template.Robots.Count} | Indicators #: {template.Indicators.Count}\");\n            };\n\n            var showDefaultTemplateInfoButton = new Button {Text = \"Show Default Template Info\"};\n\n            showDefaultTemplateInfoButton.Click += args =>\n            {\n                Print($\"Name: {ChartTemplates.DefaultTemplate.Name} | Bots #: {ChartTemplates.DefaultTemplate.Robots.Count} | Indicators #: {ChartTemplates.DefaultTemplate.Indicators.Count}\");\n            };\n\n            var removeTemplateButton = new Button {Text = \"Remove Template\"};\n\n            removeTemplateButton.Click += _ => ChartTemplates.Remove(ChartTemplates.Get(templatesComboBox.SelectedItem));\n\n            var applyTemplateButton = new Button {Text = \"Apply Template\"};\n\n            applyTemplateButton.Click += _ => ChartTemplates.Get(templatesComboBox.SelectedItem).Apply(Chart);\n\n            var duplicateTemplateButton = new Button {Text = \"Duplicate Template\"};\n\n            duplicateTemplateButton.Click += _ => ChartTemplates.Duplicate($\"{templatesComboBox.SelectedItem} Duplicate\", ChartTemplates.Get(templatesComboBox.SelectedItem));\n\n            var createTemplateTextBox = new TextBox {Text = \"Template Name\"};\n\n            var createEmptyTemplateButton = new Button {Text = \"Create Empty Template\"};\n\n            createEmptyTemplateButton.Click += _ => ChartTemplates.Create(createTemplateTextBox.Text);\n\n            var createTemplateBasedOnChartButton = new Button {Text = \"Create Template Based On Chart\"};\n\n            createTemplateBasedOnChartButton.Click += _ => ChartTemplates.Create(createTemplateTextBox.Text, Chart);\n\n            var changeDefaultTemplateToSelectedButton = new Button {Text = \"Change Default Template To Selected\"};\n\n            changeDefaultTemplateToSelectedButton.Click += _ => ChartTemplates.DefaultTemplate = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n            var checkSelectedTemplateExistsButton = new Button {Text = \"Check Selected Template Exists\"};\n\n            checkSelectedTemplateExistsButton.Click += _ => Print($\"Template {templatesComboBox.SelectedItem} Exists: {ChartTemplates.Contains(templatesComboBox.SelectedItem)}\");\n\n            var removeSelectedTemplateIndicator = new Button {Text = \"Remove Selected Template Indicator\"};\n\n            removeSelectedTemplateIndicator.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                if (template.Indicators.Count == 0)\n                    return;\n\n                Print($\"Remove Result: {template.Indicators.Remove(template.Indicators.First())}\");\n            };\n\n            var removeSelectedTemplateBot = new Button {Text = \"Remove Selected Template Bot\"};\n\n            removeSelectedTemplateBot.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                if (template.Robots.Count == 0)\n                    return;\n\n                Print($\"Remove Result: {template.Robots.Remove(template.Robots.First())}\");\n            };\n\n            var indicatorsCombobox = new ComboBox();\n\n            foreach (var indicator in AlgoRegistry.Indicators.OrderBy(i => i.Name))\n            {\n                indicatorsCombobox.AddItem(indicator.Name);\n            }\n\n            var addIndicatorWithDefaultParametersToSelectedTemplate = new Button {Text = \"Add Indicator with default parameters to Selected Template\"};\n\n            addIndicatorWithDefaultParametersToSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                if (string.IsNullOrWhiteSpace(indicatorsCombobox.SelectedItem))\n                {\n                    Print(\"No indicator is selected\");\n                    return;\n                }\n\n                Print($\"Adding indicator {indicatorsCombobox.SelectedItem}\");\n\n                template.Indicators.Add(indicatorsCombobox.SelectedItem);\n            };\n\n            var robotsCombobox = new ComboBox();\n\n            foreach (var robot in AlgoRegistry.Robots.OrderBy(i => i.Name))\n            {\n                robotsCombobox.AddItem(robot.Name);\n            }\n\n            var addRobotWithDefaultParametersToSelectedTemplate = new Button {Text = \"Add Robot with default parameters to Selected Template\"};\n\n            addRobotWithDefaultParametersToSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                if (string.IsNullOrWhiteSpace(robotsCombobox.SelectedItem))\n                {\n                    Print(\"No robot is selected\");\n                    return;\n                }\n\n                Print($\"Adding Robot {robotsCombobox.SelectedItem}\");\n\n                template.Robots.Add(robotsCombobox.SelectedItem);\n            };\n\n            var addEmaIndicatorWithDifferentParametersToSelectedTemplate = new Button {Text = \"Add EMA indicator with Different parameters to Selected Template\"};\n\n            addEmaIndicatorWithDifferentParametersToSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                var emaType = AlgoRegistry.Get(\"Exponential Moving Average\", AlgoKind.StandardIndicator) as IndicatorType;\n\n                Print($\"Adding Indicator {emaType.Name} with Period 100\");\n\n                template.Indicators.Add(emaType, Bars.OpenPrices, 100);\n            };\n\n            var changeEmaIndicatorParametersForSelectedTemplate = new Button {Text = \"Change EMA indicator parameters for Selected Template\"};\n\n            changeEmaIndicatorParametersForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                var emaType = AlgoRegistry.Get(\"Exponential Moving Average\", AlgoKind.StandardIndicator) as IndicatorType;\n\n                if (template.Indicators.FirstOrDefault(i => i.Type == emaType) is not {} templateIndicator)\n                {\n                    Print($\"EMA indicator not found in template '{template.Name}'\");\n                    return;\n                }\n\n                Print($\"Changing Indicator {emaType.Name} Period to 200\");\n\n                templateIndicator.Parameters[\"Periods\"].Value = 200;\n            };\n\n            var setAllColorSettingsToRedForSelectedTemplate = new Button {Text = \"Set All Color Setting to Red for Selected Template\"};\n\n            setAllColorSettingsToRedForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                template.ColorSettings.AskPriceLineColor = Color.Red;\n                template.ColorSettings.BidPriceLineColor = Color.Red;\n                template.ColorSettings.BackgroundColor = Color.Red;\n                template.ColorSettings.BearFillColor = Color.Red;\n                template.ColorSettings.BearOutlineColor = Color.Red;\n                template.ColorSettings.BullFillColor = Color.Red;\n                template.ColorSettings.BullOutlineColor = Color.Red;\n                template.ColorSettings.BuyColor = Color.Red;\n                template.ColorSettings.ForegroundColor = Color.Red;\n                template.ColorSettings.GridLinesColor = Color.Red;\n                template.ColorSettings.LosingDealColor = Color.Red;\n                template.ColorSettings.PeriodSeparatorColor = Color.Red;\n                template.ColorSettings.SellColor = Color.Red;\n                template.ColorSettings.TickVolumeColor = Color.Red;\n                template.ColorSettings.WinningDealColor = Color.Red;\n                template.ColorSettings.AreaFillColor = Color.Red;\n            };\n\n            var enableAllDisplayOptionsForSelectedTemplate = new Button {Text = \"Enable all display options for Selected Template\"};\n\n            enableAllDisplayOptionsForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                template.DisplaySettings.AskPriceLine = true;\n                template.DisplaySettings.Bars = true;\n                template.DisplaySettings.BidPriceLine = true;\n                template.DisplaySettings.ChartScale = true;\n                template.DisplaySettings.DealMap = true;\n                template.DisplaySettings.Grid = true;\n                template.DisplaySettings.IndicatorTitles = true;\n                template.DisplaySettings.MarketSentiment = true;\n                template.DisplaySettings.Orders = true;\n                template.DisplaySettings.PeriodSeparators = true;\n                template.DisplaySettings.Positions = true;\n                template.DisplaySettings.PriceAlerts = true;\n                template.DisplaySettings.PriceAxisOverlayButtons = true;\n                template.DisplaySettings.QuickTradeButtons = true;\n                template.DisplaySettings.Targets = true;\n                template.DisplaySettings.TickVolume = true;\n                template.DisplaySettings.AddRobotButton = true;\n            };\n\n            var disableAllDisplayOptionsForSelectedTemplate = new Button {Text = \"Disable all display options for Selected Template\"};\n\n            disableAllDisplayOptionsForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                template.DisplaySettings.AskPriceLine = false;\n                template.DisplaySettings.Bars = false;\n                template.DisplaySettings.BidPriceLine = false;\n                template.DisplaySettings.ChartScale = false;\n                template.DisplaySettings.DealMap = false;\n                template.DisplaySettings.Grid = false;\n                template.DisplaySettings.IndicatorTitles = false;\n                template.DisplaySettings.MarketSentiment = false;\n                template.DisplaySettings.Orders = false;\n                template.DisplaySettings.PeriodSeparators = false;\n                template.DisplaySettings.Positions = false;\n                template.DisplaySettings.PriceAlerts = false;\n                template.DisplaySettings.PriceAxisOverlayButtons = false;\n                template.DisplaySettings.QuickTradeButtons = false;\n                template.DisplaySettings.Targets = false;\n                template.DisplaySettings.TickVolume = false;\n                template.DisplaySettings.AddRobotButton = false;\n            };\n\n            var changeChartTypeForSelectedTemplate = new Button {Text = \"Change Chart Type for Selected Template\"};\n\n            changeChartTypeForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                template.DisplaySettings.ChartType = template.DisplaySettings.ChartType switch\n                {\n                    ChartType.Area => ChartType.Bars,\n                    ChartType.Bars => ChartType.Candlesticks,\n                    ChartType.Candlesticks => ChartType.Dots,\n                    ChartType.Dots => ChartType.Hlc,\n                    ChartType.Hlc => ChartType.Line,\n                    _ => ChartType.Area\n                };\n\n                Print($\"Changed template '{template.Name}' chart type to '{template.DisplaySettings.ChartType}'\");\n            };\n\n            var changeZoomLevelForSelectedTemplate = new Button {Text = \"Change Zoom Level for Selected Template\"};\n\n            changeZoomLevelForSelectedTemplate.Click += _ =>\n            {\n                if (string.IsNullOrWhiteSpace(templatesComboBox.SelectedItem))\n                {\n                    Print(\"No template is selected\");\n                    return;\n                }\n\n                var template = ChartTemplates.Get(templatesComboBox.SelectedItem);\n\n                template.DisplaySettings.ZoomLevel = template.DisplaySettings.ZoomLevel switch\n                {\n                    5 => 400,\n                    400 => 5,\n                    _ => 5\n                };\n\n                Print($\"Changed template '{template.Name}' zoom level to '{template.DisplaySettings.ZoomLevel}'\");\n            };\n\n            var panel = new StackPanel {Orientation = Orientation.Vertical, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center};\n\n            panel.AddChild(templatesComboBox);\n            panel.AddChild(showTemplateInfoButton);\n            panel.AddChild(showDefaultTemplateInfoButton);\n            panel.AddChild(removeTemplateButton);\n            panel.AddChild(applyTemplateButton);\n            panel.AddChild(duplicateTemplateButton);\n            panel.AddChild(createTemplateTextBox);\n            panel.AddChild(createEmptyTemplateButton);\n            panel.AddChild(createTemplateBasedOnChartButton);\n            panel.AddChild(changeDefaultTemplateToSelectedButton);\n            panel.AddChild(checkSelectedTemplateExistsButton);\n            panel.AddChild(removeSelectedTemplateIndicator);\n            panel.AddChild(removeSelectedTemplateBot);\n            panel.AddChild(indicatorsCombobox);\n            panel.AddChild(addIndicatorWithDefaultParametersToSelectedTemplate);\n            panel.AddChild(robotsCombobox);\n            panel.AddChild(addRobotWithDefaultParametersToSelectedTemplate);\n            panel.AddChild(addEmaIndicatorWithDifferentParametersToSelectedTemplate);\n            panel.AddChild(changeEmaIndicatorParametersForSelectedTemplate);\n            panel.AddChild(setAllColorSettingsToRedForSelectedTemplate);\n            panel.AddChild(enableAllDisplayOptionsForSelectedTemplate);\n            panel.AddChild(disableAllDisplayOptionsForSelectedTemplate);\n            panel.AddChild(changeChartTypeForSelectedTemplate);\n            panel.AddChild(changeZoomLevelForSelectedTemplate);\n\n            Chart.AddControl(panel);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_chart_template_added(self, args):\n        self.templatesComboBox.AddItem(args.ChartTemplate.Name)\n        print(f\"New Template added: {args.ChartTemplate.Name}\")\n\n    def on_chart_template_removed(self, args):\n        self.templatesComboBox.RemoveItem(args.ChartTemplate.Name)\n        print(f\"Template Removed: {args.ChartTemplate.Name}\")\n\n    def on_show_template_info_button_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        print(f\"Name: {template.Name} | Bots #: {template.Robots.Count} | Indicators #: {template.Indicators.Count}\")\n\n    def on_remove_selected_template_indicator_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        if template.Indicators.Count == 0:\n            return\n\n        print(f\"Remove Result: {template.Indicators.Remove(next(i for i in template.Indicators))}\")\n\n    def on_remove_selected_template_bot_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        if template.Robots.Count == 0:\n            return\n\n        print(f\"Remove Result: {template.Robots.Remove(next(r for r in template.Robots))}\")\n\n    def on_add_indicator_with_default_parameters_to_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        if self.indicatorsCombobox.SelectedItem is None:\n            print(\"No indicator is selected\")\n            return\n\n        print(f\"Adding indicator {self.indicatorsCombobox.SelectedItem}\")\n\n        template.Indicators.Add(self.indicatorsCombobox.SelectedItem)\n\n    def on_add_robot_with_default_parameters_to_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        if self.robotsCombobox.SelectedItem is None:\n            print(\"No robot is selected\")\n            return\n\n        print(f\"Adding robot {self.robotsCombobox.SelectedItem}\")\n\n        template.Robots.Add(self.robotsCombobox.SelectedItem)\n\n    def on_add_ema_indicator_with_different_parameters_to_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n        emaType = IndicatorType(api.AlgoRegistry.Get(\"Exponential Moving Average\", AlgoKind.StandardIndicator))\n\n        print(f\"Adding Indicator {emaType.Name} with Period 100\")\n\n        template.Indicators.Add(emaType, api.Bars.OpenPrices, 100)\n\n    def on_change_ema_indicator_parameters_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        emaType = IndicatorType(api.AlgoRegistry.Get(\"Exponential Moving Average\", AlgoKind.StandardIndicator))\n\n        templateIndicator = next((x for x in template.Indicators if x.Type == emaType), None)\n        if templateIndicator is None:\n            print(f\"EMA indicator not found in template '{template.Name}'\")\n            return\n\n        print(f\"Changing Indicator {emaType.Name} Period to 200\")\n\n        templateIndicator.Parameters[\"Periods\"].Value = 200\n\n    def on_set_all_color_settings_to_red_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        template.ColorSettings.AskPriceLineColor = Color.Red\n        template.ColorSettings.BidPriceLineColor = Color.Red\n        template.ColorSettings.BackgroundColor = Color.Red\n        template.ColorSettings.BearFillColor = Color.Red\n        template.ColorSettings.BearOutlineColor = Color.Red\n        template.ColorSettings.BullFillColor = Color.Red\n        template.ColorSettings.BullOutlineColor = Color.Red\n        template.ColorSettings.BuyColor = Color.Red\n        template.ColorSettings.ForegroundColor = Color.Red\n        template.ColorSettings.GridLinesColor = Color.Red\n        template.ColorSettings.LosingDealColor = Color.Red\n        template.ColorSettings.PeriodSeparatorColor = Color.Red\n        template.ColorSettings.SellColor = Color.Red\n        template.ColorSettings.TickVolumeColor = Color.Red\n        template.ColorSettings.WinningDealColor = Color.Red\n        template.ColorSettings.AreaFillColor = Color.Red\n\n    def on_enable_all_display_options_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        template.DisplaySettings.AskPriceLine = True\n        template.DisplaySettings.Bars = True\n        template.DisplaySettings.BidPriceLine = True\n        template.DisplaySettings.ChartScale = True\n        template.DisplaySettings.DealMap = True\n        template.DisplaySettings.Grid = True\n        template.DisplaySettings.IndicatorTitles = True\n        template.DisplaySettings.MarketSentiment = True\n        template.DisplaySettings.Orders = True\n        template.DisplaySettings.PeriodSeparators = True\n        template.DisplaySettings.Positions = True\n        template.DisplaySettings.PriceAlerts = True\n        template.DisplaySettings.PriceAxisOverlayButtons = True\n        template.DisplaySettings.QuickTradeButtons = True\n        template.DisplaySettings.Targets = True\n        template.DisplaySettings.TickVolume = True\n        template.DisplaySettings.AddRobotButton = True\n\n    def on_disable_all_display_options_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        template.DisplaySettings.AskPriceLine = False\n        template.DisplaySettings.Bars = False\n        template.DisplaySettings.BidPriceLine = False\n        template.DisplaySettings.ChartScale = False\n        template.DisplaySettings.DealMap = False\n        template.DisplaySettings.Grid = False\n        template.DisplaySettings.IndicatorTitles = False\n        template.DisplaySettings.MarketSentiment = False\n        template.DisplaySettings.Orders = False\n        template.DisplaySettings.PeriodSeparators = False\n        template.DisplaySettings.Positions = False\n        template.DisplaySettings.PriceAlerts = False\n        template.DisplaySettings.PriceAxisOverlayButtons = False\n        template.DisplaySettings.QuickTradeButtons = False\n        template.DisplaySettings.Targets = False\n        template.DisplaySettings.TickVolume = False\n        template.DisplaySettings.AddRobotButton = False\n\n    def on_change_chart_type_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        match template.DisplaySettings.ChartType:\n            case ChartType.Area:\n                template.DisplaySettings.ChartType = ChartType.Bars\n            case ChartType.Bars:\n                template.DisplaySettings.ChartType = ChartType.Candlesticks\n            case ChartType.Candlesticks:\n                template.DisplaySettings.ChartType = ChartType.Dots\n            case ChartType.Dots:\n                template.DisplaySettings.ChartType = ChartType.Hlc\n            case ChartType.Hlc:\n                template.DisplaySettings.ChartType = ChartType.Line\n            case _:\n                template.DisplaySettings.ChartType = ChartType.Area\n\n        print(f\"Changed template '{template.Name}' chart type to '{template.DisplaySettings.ChartType}'\")\n\n    def on_change_zoom_level_for_selected_template_clicked(self, args):\n        if self.templatesComboBox.SelectedItem is None:\n            print(\"No template is selected\")\n            return\n\n        template = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n        match template.DisplaySettings.ZoomLevel:\n            case 5:\n                template.DisplaySettings.ZoomLevel = 400\n            case _:\n                template.DisplaySettings.ZoomLevel = 5\n\n        print(f\"Changed template '{template.Name}' zoom level to '{template.DisplaySettings.ZoomLevel}'\")\n\n    def on_change_default_template_to_selected_button_clicked(self, args):\n        api.ChartTemplates.DefaultTemplate = api.ChartTemplates.Get(self.templatesComboBox.SelectedItem)\n\n    def on_start(self):\n        self.templatesComboBox = ComboBox()\n\n        for template in api.ChartTemplates:\n            self.templatesComboBox.AddItem(template.Name)\n\n        api.ChartTemplates.Added += self.on_chart_template_added\n        api.ChartTemplates.Removed += self.on_chart_template_removed\n\n        showTemplateInfoButton = Button()\n        showTemplateInfoButton.Text = \"Show Template Info\"\n        showTemplateInfoButton.Click += self.on_show_template_info_button_clicked\n\n        showDefaultTemplateInfoButton = Button()\n        showDefaultTemplateInfoButton.Text = \"Show Default Template Info\"\n        showDefaultTemplateInfoButton.Click += lambda args: print(f\"Name: {api.ChartTemplates.DefaultTemplate.Name} | Bots #: {api.ChartTemplates.DefaultTemplate.Robots.Count} | Indicators #: {api.ChartTemplates.DefaultTemplate.Indicators.Count}\")\n\n        removeTemplateButton = Button()\n        removeTemplateButton.Text = \"Remove Template\"\n        removeTemplateButton.Click += lambda _: api.ChartTemplates.Remove(api.ChartTemplates.Get(self.templatesComboBox.SelectedItem))\n\n        applyTemplateButton = Button()\n        applyTemplateButton.Text = \"Apply Template\"\n        applyTemplateButton.Click += lambda _: api.ChartTemplates.Get(self.templatesComboBox.SelectedItem).Apply(api.Chart)\n\n        duplicateTemplateButton = Button()\n        duplicateTemplateButton.Text = \"Duplicate Template\"\n        duplicateTemplateButton.Click += lambda _: api.ChartTemplates.Duplicate(f\"{self.templatesComboBox.SelectedItem} Duplicate\", api.ChartTemplates.Get(self.templatesComboBox.SelectedItem))\n\n        createTemplateTextBox = TextBox()\n        createTemplateTextBox.Text = \"Template Name\"\n\n        createEmptyTemplateButton = Button()\n        createEmptyTemplateButton.Text = \"Create Empty Template\"\n        createEmptyTemplateButton.Click += lambda _: api.ChartTemplates.Create(createTemplateTextBox.Text)\n\n        createTemplateBasedOnChartButton = Button()\n        createTemplateBasedOnChartButton.Text = \"Create Template Based On Chart\"\n        createTemplateBasedOnChartButton.Click += lambda _: api.ChartTemplates.Create(createTemplateTextBox.Text, api.Chart)\n\n        changeDefaultTemplateToSelectedButton = Button()\n        changeDefaultTemplateToSelectedButton.Text = \"Change Default Template To Selected\"\n        changeDefaultTemplateToSelectedButton.Click += self.on_change_default_template_to_selected_button_clicked\n\n        checkSelectedTemplateExistsButton = Button()\n        checkSelectedTemplateExistsButton.Text = \"Check Selected Template Exists\"\n        checkSelectedTemplateExistsButton.Click += lambda _: print(f\"Template {self.templatesComboBox.SelectedItem} Exists: {api.ChartTemplates.Contains(self.templatesComboBox.SelectedItem)}\")\n\n        removeSelectedTemplateIndicator = Button()\n        removeSelectedTemplateIndicator.Text = \"Remove Selected Template Indicator\"\n        removeSelectedTemplateIndicator.Click += self.on_remove_selected_template_indicator_clicked\n\n        removeSelectedTemplateBot = Button()\n        removeSelectedTemplateBot.Text = \"Remove Selected Template Bot\"\n        removeSelectedTemplateBot.Click += self.on_remove_selected_template_bot_clicked\n\n        self.indicatorsCombobox = ComboBox()\n\n        for indicatorName in sorted([i.Name for i in api.AlgoRegistry.Indicators]):\n            self.indicatorsCombobox.AddItem(indicatorName)\n\n        addIndicatorWithDefaultParametersToSelectedTemplate = Button()\n        addIndicatorWithDefaultParametersToSelectedTemplate.Text = \"Add Indicator with default parameters to Selected Template\"\n        addIndicatorWithDefaultParametersToSelectedTemplate.Click += self.on_add_indicator_with_default_parameters_to_selected_template_clicked\n\n        self.robotsCombobox = ComboBox()\n\n        for robotName in sorted([i.Name for i in api.AlgoRegistry.Robots]):\n            self.robotsCombobox.AddItem(robotName)\n\n        addRobotWithDefaultParametersToSelectedTemplate = Button()\n        addRobotWithDefaultParametersToSelectedTemplate.Text = \"Add Robot with default parameters to Selected Template\"\n        addRobotWithDefaultParametersToSelectedTemplate.Click += self.on_add_robot_with_default_parameters_to_selected_template_clicked\n\n        addEmaIndicatorWithDifferentParametersToSelectedTemplate = Button()\n        addEmaIndicatorWithDifferentParametersToSelectedTemplate.Text = \"Add EMA indicator with Different parameters to Selected Template\"\n        addEmaIndicatorWithDifferentParametersToSelectedTemplate.Click += self.on_add_ema_indicator_with_different_parameters_to_selected_template_clicked\n\n        changeEmaIndicatorParametersForSelectedTemplate = Button()\n        changeEmaIndicatorParametersForSelectedTemplate.Text = \"Change EMA indicator parameters for Selected Template\"\n        changeEmaIndicatorParametersForSelectedTemplate.Click += self.on_change_ema_indicator_parameters_for_selected_template_clicked\n\n        setAllColorSettingsToRedForSelectedTemplate = Button()\n        setAllColorSettingsToRedForSelectedTemplate.Text = \"Set All Color Setting to Red for Selected Template\"\n        setAllColorSettingsToRedForSelectedTemplate.Click += self.on_set_all_color_settings_to_red_for_selected_template_clicked\n\n        enableAllDisplayOptionsForSelectedTemplate = Button()\n        enableAllDisplayOptionsForSelectedTemplate.Text = \"Enable all display options for Selected Template\"\n        enableAllDisplayOptionsForSelectedTemplate.Click += self.on_enable_all_display_options_for_selected_template_clicked\n\n        disableAllDisplayOptionsForSelectedTemplate = Button()\n        disableAllDisplayOptionsForSelectedTemplate.Text = \"Disable all display options for Selected Template\"\n        disableAllDisplayOptionsForSelectedTemplate.Click += self.on_disable_all_display_options_for_selected_template_clicked\n\n        changeChartTypeForSelectedTemplate = Button()\n        changeChartTypeForSelectedTemplate.Text = \"Change Chart Type for Selected Template\"\n        changeChartTypeForSelectedTemplate.Click += self.on_change_chart_type_for_selected_template_clicked\n\n        changeZoomLevelForSelectedTemplate = Button()\n        changeZoomLevelForSelectedTemplate.Text = \"Change Zoom Level for Selected Template\"\n        changeZoomLevelForSelectedTemplate.Click += self.on_change_zoom_level_for_selected_template_clicked\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        panel.AddChild(self.templatesComboBox)\n        panel.AddChild(showTemplateInfoButton)\n        panel.AddChild(showDefaultTemplateInfoButton)\n        panel.AddChild(removeTemplateButton)\n        panel.AddChild(applyTemplateButton)\n        panel.AddChild(duplicateTemplateButton)\n        panel.AddChild(createTemplateTextBox)\n        panel.AddChild(createEmptyTemplateButton)\n        panel.AddChild(createTemplateBasedOnChartButton)\n        panel.AddChild(changeDefaultTemplateToSelectedButton)\n        panel.AddChild(checkSelectedTemplateExistsButton)\n        panel.AddChild(removeSelectedTemplateIndicator)\n        panel.AddChild(removeSelectedTemplateBot)\n        panel.AddChild(self.indicatorsCombobox)\n        panel.AddChild(addIndicatorWithDefaultParametersToSelectedTemplate)\n        panel.AddChild(self.robotsCombobox)\n        panel.AddChild(addRobotWithDefaultParametersToSelectedTemplate)\n        panel.AddChild(addEmaIndicatorWithDifferentParametersToSelectedTemplate)\n        panel.AddChild(changeEmaIndicatorParametersForSelectedTemplate)\n        panel.AddChild(setAllColorSettingsToRedForSelectedTemplate)\n        panel.AddChild(enableAllDisplayOptionsForSelectedTemplate)\n        panel.AddChild(disableAllDisplayOptionsForSelectedTemplate)\n        panel.AddChild(changeChartTypeForSelectedTemplate)\n        panel.AddChild(changeZoomLevelForSelectedTemplate)\n\n        api.Chart.AddControl(panel)","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Contains(System.String)","kind":"method","name":"Contains","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"bool Contains(string chartTemplateName)","python":"api.ChartTemplates.Contains(chartTemplateName: str) -> bool","summary":"Checks if a chart template with passed name exists or not.","remarks":null,"parameters":[{"name":"chartTemplateName","csharpType":"string","pythonType":"str","summary":"Chart template name"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if exists otherwise False.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var exists = ChartTemplates.Contains(\"My Template\");\nPrint(\"Template My Template exists: {0}\", exists);","python":"exists = api.ChartTemplates.Contains(\"My Template\")\napi.Print(f\"Template My Template exists: {exists}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Contains/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Contains/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Create(System.String,cAlgo.API.Chart)","kind":"method","name":"Create","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplate Create(string chartTemplateName, Chart chart)","python":"api.ChartTemplates.Create(chartTemplateName: str, chart: Chart) -> ChartTemplate","summary":"Creates a new chart template based on a chart.","remarks":null,"parameters":[{"name":"chartTemplateName","csharpType":"string","pythonType":"str","summary":"Unique name of new chart template"},{"name":"chart","csharpType":"Chart","pythonType":"Chart","summary":"Chart that will be used for creation of chart template."}],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"ChartTemplate","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Create(\"EURUSD Daily Setup\", Chart);\nPrint(\"Created template {0} with {1} indicators\", template.Name, template.Indicators.Count);","python":"template = api.ChartTemplates.Create(\"EURUSD Daily Setup\", api.Chart)\napi.Print(f\"Created template {template.Name} with {template.Indicators.Count} indicators\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Create/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Create/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Create(System.String)","kind":"method","name":"Create","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplate Create(string chartTemplateName)","python":"api.ChartTemplates.Create(chartTemplateName: str) -> ChartTemplate","summary":"Creates a new chart template.","remarks":null,"parameters":[{"name":"chartTemplateName","csharpType":"string","pythonType":"str","summary":"Unique name of new chart template"}],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"ChartTemplate","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"if (!ChartTemplates.Contains(\"Clean Chart\"))\n{\n    var template = ChartTemplates.Create(\"Clean Chart\");\n    template.DisplaySettings.Grid = false;\n    Print(\"Created empty template {0}\", template.Name);\n}","python":"if not api.ChartTemplates.Contains(\"Clean Chart\"):\n    template = api.ChartTemplates.Create(\"Clean Chart\")\n    template.DisplaySettings.Grid = False\n    api.Print(f\"Created empty template {template.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Create/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Create/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Duplicate(System.String,cAlgo.API.ChartTemplate)","kind":"method","name":"Duplicate","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplate Duplicate(string chartTemplateName, ChartTemplate chartTemplate)","python":"api.ChartTemplates.Duplicate(chartTemplateName: str, chartTemplate: ChartTemplate) -> ChartTemplate","summary":"Duplicates or creates a copy of an existing chart template.","remarks":null,"parameters":[{"name":"chartTemplateName","csharpType":"string","pythonType":"str","summary":"New chart template name."},{"name":"chartTemplate","csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"Existing chart template."}],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"ChartTemplate","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var copy = ChartTemplates.Duplicate(\"Default Copy\", ChartTemplates.DefaultTemplate);\nPrint(\"Duplicated template: {0}\", copy.Name);","python":"copy = api.ChartTemplates.Duplicate(\"Default Copy\", api.ChartTemplates.DefaultTemplate)\napi.Print(f\"Duplicated template: {copy.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Duplicate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Duplicate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplate Get(string chartTemplateName)","python":"api.ChartTemplates.Get(chartTemplateName: str) -> ChartTemplate | None","summary":"Returns a chart template by name if exists otherwise null.","remarks":null,"parameters":[{"name":"chartTemplateName","csharpType":"string","pythonType":"str","summary":"Chart template name"}],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"ChartTemplate if found otherwise null.","nullable":true},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"My Template\");\nif (template == null)\n    Print(\"Template not found\");\nelse\n    template.Apply(Chart);","python":"template = api.ChartTemplates.Get(\"My Template\")\nif template is None:\n    api.Print(\"Template not found\")\nelse:\n    template.Apply(api.Chart)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"M:cAlgo.API.ChartTemplates.Remove(cAlgo.API.ChartTemplate)","kind":"method","name":"Remove","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"bool Remove(ChartTemplate chartTemplate)","python":"api.ChartTemplates.Remove(chartTemplate: ChartTemplate) -> bool","summary":"Removes an existing chart template.","remarks":null,"parameters":[{"name":"chartTemplate","csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"ChartTemplate that will removed"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise False.","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var template = ChartTemplates.Get(\"Old Template\");\nif (template != null)\n    Print(\"Template removed: {0}\", ChartTemplates.Remove(template));","python":"template = api.ChartTemplates.Get(\"Old Template\")\nif template is not None:\n    api.Print(f\"Template removed: {api.ChartTemplates.Remove(template)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"P:cAlgo.API.ChartTemplates.DefaultTemplate","kind":"property","name":"DefaultTemplate","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"ChartTemplate DefaultTemplate {get; set;}","python":"api.ChartTemplates.DefaultTemplate: ChartTemplate","summary":"Gets or sets default chart template.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplate","pythonType":"ChartTemplate","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"Print(\"Default chart template: {0}\", ChartTemplates.DefaultTemplate.Name);\nvar template = ChartTemplates.Get(\"My Template\");\nif (template != null)\n    ChartTemplates.DefaultTemplate = template;","python":"api.Print(f\"Default chart template: {api.ChartTemplates.DefaultTemplate.Name}\")\ntemplate = api.ChartTemplates.Get(\"My Template\")\nif template is not None:\n    api.ChartTemplates.DefaultTemplate = template"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/DefaultTemplate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/DefaultTemplate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"E:cAlgo.API.ChartTemplates.Added","kind":"event","name":"Added","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"event Action<ChartTemplateAddedEventArgs> Added;","python":"api.ChartTemplates.Added += handler  # handler(obj: ChartTemplateAddedEventArgs)","summary":"Occurs when a new chart template is added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartTemplateAddedEventArgs>","pythonType":"Callable[[ChartTemplateAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Added += OnChartTemplateAdded;\n}\n\nprivate void OnChartTemplateAdded(ChartTemplateAddedEventArgs args)\n{\n    Print(\"Chart template added: {0}\", args.ChartTemplate.Name);\n}","python":"def on_start(self):\n    api.ChartTemplates.Added += self.on_chart_template_added\n\ndef on_chart_template_added(self, args):\n    api.Print(f\"Chart template added: {args.ChartTemplate.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"E:cAlgo.API.ChartTemplates.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.ChartTemplates","namespace":"cAlgo.API","group":"Templates","csharp":"event Action<ChartTemplateRemovedEventArgs> Removed;","python":"api.ChartTemplates.Removed += handler  # handler(obj: ChartTemplateRemovedEventArgs)","summary":"Occurs when a chart template is removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ChartTemplateRemovedEventArgs>","pythonType":"Callable[[ChartTemplateRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartTemplates.Removed += OnChartTemplateRemoved;\n}\n\nprivate void OnChartTemplateRemoved(ChartTemplateRemovedEventArgs args)\n{\n    Print(\"Chart template removed: {0}\", args.ChartTemplate.Name);\n}","python":"def on_start(self):\n    api.ChartTemplates.Removed += self.on_chart_template_removed\n\ndef on_chart_template_removed(self, args):\n    api.Print(f\"Chart template removed: {args.ChartTemplate.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Templates/ChartTemplates/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"No templates are listed; Create works for this run only and is not saved; Remove returns false; DefaultTemplate throws NullReferenceException."},{"name":"Cloud","support":"None","behaviour":"Empty: Get returns null, Contains and Remove return false, Create and Duplicate throw, DefaultTemplate throws NullReferenceException."}]}
{"id":"T:cAlgo.API.ChartText","kind":"interface","name":"ChartText","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartText","python":"ChartText","summary":"Represents the Text chart object. Allows place the text anywhere on the chart, bound to the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawText method to draw text\n    public partial class ChartTextSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            for (int iBarIndex = Chart.FirstVisibleBarIndex; iBarIndex <= Chart.LastVisibleBarIndex; iBarIndex++)\n            {\n                string text;\n\n                double y;\n\n                Color color;\n\n                if (Bars.ClosePrices[iBarIndex] > Bars.OpenPrices[iBarIndex])\n                {\n                    text = \"U\";\n                    y = Bars.LowPrices[iBarIndex];\n                    color = Color.Green;\n                }\n                else\n                {\n                    text = \"D\";\n                    y = Bars.HighPrices[iBarIndex];\n                    color = Color.Red;\n                }\n\n                Chart.DrawText(\"Text_\" + iBarIndex, text, iBarIndex, y, color);\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"for barIndex in range(api.Chart.FirstVisibleBarIndex, api.Chart.LastVisibleBarIndex + 1):\n    if api.Bars.ClosePrices[barIndex] > api.Bars.OpenPrices[barIndex]:\n        api.Chart.DrawText(f\"Text_{barIndex}\", \"U\", barIndex, api.Bars.LowPrices[barIndex], Color.Green)\n    else:\n        api.Chart.DrawText(f\"Text_{barIndex}\", \"D\", barIndex, api.Bars.HighPrices[barIndex], Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.Angle","kind":"property","name":"Angle","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"double Angle {get; set;}","python":"chartText.Angle: float","summary":"Gets or sets the rotation angle of the text in degrees, measured clockwise around the text anchor point. The text can be fully rotated; any value is accepted and normalized to the 0 to 360 range. The default value is 0, which renders horizontal text.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"// Draw text and rotate it 45 degrees.\nvar text = Chart.DrawText(\"angled\", \"Trend Line\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.Angle = 45;","python":"import clr\nclr.AddReference(\"cAlgo.API\")\nfrom cAlgo.API import *\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        text = api.Chart.DrawText(\"angled\", \"Trend Line\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\n        text.Angle = 45"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Angle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Angle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartText.Color: Color","summary":"Gets or sets the text color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.Color = Color.Orange;\nPrint(\"Text color: {0}\", text.Color);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.Color = Color.Orange\napi.Print(f\"Text color: {text.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.FontFamily","kind":"property","name":"FontFamily","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"string FontFamily {get; set;}","python":"chartText.FontFamily: str","summary":"Gets or sets the font style of the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.FontFamily = \"Arial\";\nPrint(\"Text font family: {0}\", text.FontFamily);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.FontFamily = \"Arial\"\napi.Print(f\"Text font family: {text.FontFamily}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/FontFamily/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/FontFamily/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.FontSize","kind":"property","name":"FontSize","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"double FontSize {get; set;}","python":"chartText.FontSize: float","summary":"Gets or sets the font size of text","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.FontSize = 14;\nPrint(\"Text font size: {0}\", text.FontSize);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.FontSize = 14\napi.Print(f\"Text font size: {text.FontSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/FontSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/FontSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.HorizontalAlignment","kind":"property","name":"HorizontalAlignment","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"HorizontalAlignment HorizontalAlignment {get; set;}","python":"chartText.HorizontalAlignment: HorizontalAlignment","summary":"Gets or sets the horizontal alignment of the text regarding the anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.HorizontalAlignment = HorizontalAlignment.Center;\nPrint(\"Text horizontal alignment: {0}\", text.HorizontalAlignment);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.HorizontalAlignment = HorizontalAlignment.Center\napi.Print(f\"Text horizontal alignment: {text.HorizontalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.IsBold","kind":"property","name":"IsBold","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsBold {get; set;}","python":"chartText.IsBold: bool","summary":"Gets or sets if the text is Bold or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.IsBold = true;\nPrint(\"Text is bold: {0}\", text.IsBold);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.IsBold = True\napi.Print(f\"Text is bold: {text.IsBold}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsBold/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsBold/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.IsItalic","kind":"property","name":"IsItalic","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsItalic {get; set;}","python":"chartText.IsItalic: bool","summary":"Gets or sets if the text is Italic or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.IsItalic = true;\nPrint(\"Text is italic: {0}\", text.IsItalic);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.IsItalic = True\napi.Print(f\"Text is italic: {text.IsItalic}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsItalic/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsItalic/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.IsUnderlined","kind":"property","name":"IsUnderlined","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"bool IsUnderlined {get; set;}","python":"chartText.IsUnderlined: bool","summary":"Gets or sets if the text is Underlined or not","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.IsUnderlined = true;\nPrint(\"Text is underlined: {0}\", text.IsUnderlined);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.IsUnderlined = True\napi.Print(f\"Text is underlined: {text.IsUnderlined}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsUnderlined/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/IsUnderlined/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.Text","kind":"property","name":"Text","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"string Text {get; set;}","python":"chartText.Text: str","summary":"Gets or sets the text content.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.Text = \"High: \" + Bars.HighPrices.LastValue;\nPrint(\"Text content: {0}\", text.Text);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.Text = f\"High: {api.Bars.HighPrices.LastValue}\"\napi.Print(f\"Text content: {text.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.Time","kind":"property","name":"Time","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time {get; set;}","python":"chartText.Time: DateTime","summary":"Gets or sets the Time line value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.Time = Bars.OpenTimes.Last(1);\nPrint(\"Text time: {0}\", text.Time);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.Time = api.Bars.OpenTimes.Last(1)\napi.Print(f\"Text time: {text.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.VerticalAlignment","kind":"property","name":"VerticalAlignment","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"VerticalAlignment VerticalAlignment {get; set;}","python":"chartText.VerticalAlignment: VerticalAlignment","summary":"Gets or sets the vertical alignment of the text regarding the anchor point.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.VerticalAlignment = VerticalAlignment.Top;\nPrint(\"Text vertical alignment: {0}\", text.VerticalAlignment);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.VerticalAlignment = VerticalAlignment.Top\napi.Print(f\"Text vertical alignment: {text.VerticalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartText.Y","kind":"property","name":"Y","type":"T:cAlgo.API.ChartText","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y {get; set;}","python":"chartText.Y: float","summary":"Gets or sets the Y-axis value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var text = Chart.DrawText(\"label\", \"High\", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);\ntext.Y = Bars.HighPrices.LastValue + 3 * Symbol.PipSize;\nPrint(\"Text price: {0}\", text.Y);","python":"text = api.Chart.DrawText(\"label\", \"High\", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)\ntext.Y = api.Bars.HighPrices.LastValue + 3 * api.Symbol.PipSize\napi.Print(f\"Text price: {text.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartText/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartTrendLine","kind":"interface","name":"ChartTrendLine","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartTrendLine","python":"ChartTrendLine","summary":"Represents the Trend Line chart object. A straight line that can be drawn from point 1 to the point 2 in any direction to mark the trends on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Chart.DrawTrendLine to draw a trend line on chart\n    public partial class ChartTrendLineSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var trendLine = Chart.DrawTrendLine(\"trendLine\", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], Color.Red, 2, LineStyle.Dots);\n\n            trendLine.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        trendLine = api.Chart.DrawTrendLine(\"trendLine\", api.Chart.FirstVisibleBarIndex, api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.HighPrices[api.Chart.LastVisibleBarIndex], Color.Red, 2, LineStyle.Dots)\n        trendLine.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartTrendLine.CalculateY(System.Int32)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(int barIndex)","python":"chartTrendLine.CalculateY(barIndex: int) -> float","summary":"Calculates Y-axis value corresponding the specified bar index.","remarks":null,"parameters":[{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Index of the bar."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"support\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\ntrendLine.ExtendToInfinity = true;\nvar supportValue = trendLine.CalculateY(Bars.Count - 1);\nif (Bars.ClosePrices.LastValue < supportValue)\n    Print(\"Price closed below the support trend line at {0}\", supportValue);","python":"trendLine = api.Chart.DrawTrendLine(\"support\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\ntrendLine.ExtendToInfinity = True\nsupportValue = trendLine.CalculateY(api.Bars.Count - 1)\nif api.Bars.ClosePrices.LastValue < supportValue:\n    api.Print(f\"Price closed below the support trend line at {supportValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"M:cAlgo.API.ChartTrendLine.CalculateY(System.DateTime)","kind":"method","name":"CalculateY","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"double CalculateY(DateTime time)","python":"chartTrendLine.CalculateY(time: DateTime) -> float","summary":"Calculates Y-axis value corresponding the specified time value.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"The time."}],"returns":{"csharpType":"double","pythonType":"float","summary":"Y-axis value","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"resistance\", Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.HighPrices.Last(10), Color.Red);\ntrendLine.ExtendToInfinity = true;\nvar resistanceValue = trendLine.CalculateY(Server.Time);\nPrint(\"Resistance trend line value now: {0}\", resistanceValue);","python":"trendLine = api.Chart.DrawTrendLine(\"resistance\", api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.HighPrices.Last(10), Color.Red)\ntrendLine.ExtendToInfinity = True\nresistanceValue = trendLine.CalculateY(api.Server.Time)\napi.Print(f\"Resistance trend line value now: {resistanceValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/CalculateY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/CalculateY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartTrendLine.Color: Color","summary":"Gets or sets the color of the Trend Line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Color = Color.LimeGreen;\nPrint(\"Trend line color: {0}\", trendLine.Color);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Color = Color.LimeGreen\napi.Print(f\"Trend line color: {trendLine.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.ExtendToInfinity","kind":"property","name":"ExtendToInfinity","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ExtendToInfinity {get; set;}","python":"chartTrendLine.ExtendToInfinity: bool","summary":"Defines if the Trend Line extends to infinity.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Red);\ntrendLine.ExtendToInfinity = true;\nPrint(\"Trend line extends to infinity: {0}\", trendLine.ExtendToInfinity);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Red)\ntrendLine.ExtendToInfinity = True\napi.Print(f\"Trend line extends to infinity: {trendLine.ExtendToInfinity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/ExtendToInfinity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/ExtendToInfinity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartTrendLine.LineStyle: LineStyle","summary":"Gets or sets the Trend Line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.LineStyle = LineStyle.Dots;\nPrint(\"Trend line style: {0}\", trendLine.LineStyle);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.LineStyle = LineStyle.Dots\napi.Print(f\"Trend line style: {trendLine.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.ShowAngle","kind":"property","name":"ShowAngle","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"bool ShowAngle {get; set;}","python":"chartTrendLine.ShowAngle: bool","summary":"Defines the trend line angle.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.ShowAngle = true;\nPrint(\"Trend line angle shown: {0}\", trendLine.ShowAngle);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.ShowAngle = True\napi.Print(f\"Trend line angle shown: {trendLine.ShowAngle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/ShowAngle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/ShowAngle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartTrendLine.Thickness: int","summary":"Gets or sets the thickness of the Trend Line.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Thickness = 2;\nPrint(\"Trend line thickness: {0}\", trendLine.Thickness);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Thickness = 2\napi.Print(f\"Trend line thickness: {trendLine.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time1 {get; set;}","python":"chartTrendLine.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Time1 = Bars.OpenTimes.Last(30);\nPrint(\"Trend line start time: {0}\", trendLine.Time1);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Time1 = api.Bars.OpenTimes.Last(30)\napi.Print(f\"Trend line start time: {trendLine.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time2 {get; set;}","python":"chartTrendLine.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Time2 = Bars.OpenTimes.Last(5);\nPrint(\"Trend line end time: {0}\", trendLine.Time2);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Time2 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Trend line end time: {trendLine.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y1 {get; set;}","python":"chartTrendLine.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Y1 = Bars.LowPrices.Last(20) - 2 * Symbol.PipSize;\nPrint(\"Trend line start price: {0}\", trendLine.Y1);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Y1 = api.Bars.LowPrices.Last(20) - 2 * api.Symbol.PipSize\napi.Print(f\"Trend line start price: {trendLine.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTrendLine.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartTrendLine","namespace":"cAlgo.API","group":"Drawings","csharp":"double Y2 {get; set;}","python":"chartTrendLine.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trendLine = Chart.DrawTrendLine(\"trend\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\ntrendLine.Y2 = Bars.LowPrices.LastValue - 2 * Symbol.PipSize;\nPrint(\"Trend line end price: {0}\", trendLine.Y2);","python":"trendLine = api.Chart.DrawTrendLine(\"trend\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\ntrendLine.Y2 = api.Bars.LowPrices.LastValue - 2 * api.Symbol.PipSize\napi.Print(f\"Trend line end price: {trendLine.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartTrendLine/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartTriangle","kind":"interface","name":"ChartTriangle","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public interface ChartTriangle","python":"ChartTriangle","summary":"Represents the Triangle chart object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to draw a triangle on chart with Chart.DrawTriangle method\n    public partial class ChartTriangleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var x1 = Chart.FirstVisibleBarIndex;\n            var x2 = Chart.FirstVisibleBarIndex + ((Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex) / 2);\n            var x3 = Chart.LastVisibleBarIndex;\n\n            var y1 = Bars.LowPrices[x1];\n            var y2 = Bars.LowPrices.Minimum(Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex);\n            var y3 = Bars.HighPrices[x3];\n\n            var triangle = Chart.DrawTriangle(\"triangle_sample\", x1, y1, x2, y2, x3, y3, Color.FromArgb(100, Color.Red), 2, LineStyle.Dots);\n\n            triangle.IsInteractive = true;\n            triangle.IsFilled = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        x1 = api.Chart.FirstVisibleBarIndex\n        x2 = api.Chart.FirstVisibleBarIndex + ((api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex) // 2)\n        x3 = api.Chart.LastVisibleBarIndex\n\n        y1 = api.Bars.LowPrices[x1]\n        y2 = Functions.Minimum(api.Bars.LowPrices, api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex)\n        y3 = api.Bars.HighPrices[x3]\n\n        triangle = api.Chart.DrawTriangle(\"triangle_sample\", x1, y1, x2, y2, x3, y3, Color.FromArgb(100, Color.Red), 2, LineStyle.Dots)\n        triangle.IsInteractive = True\n        triangle.IsFilled = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Time1","kind":"property","name":"Time1","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time1 {get; set;}","python":"chartTriangle.Time1: DateTime","summary":"Gets or sets the value 1 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Time1 = Bars.OpenTimes.Last(35);\nPrint(\"Triangle time 1: {0}\", triangle.Time1);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Time1 = api.Bars.OpenTimes.Last(35)\napi.Print(f\"Triangle time 1: {triangle.Time1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Time2","kind":"property","name":"Time2","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time2 {get; set;}","python":"chartTriangle.Time2: DateTime","summary":"Gets or sets the value 2 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Time2 = Bars.OpenTimes.Last(22);\nPrint(\"Triangle time 2: {0}\", triangle.Time2);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Time2 = api.Bars.OpenTimes.Last(22)\napi.Print(f\"Triangle time 2: {triangle.Time2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Time3","kind":"property","name":"Time3","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"DateTime Time3 {get; set;}","python":"chartTriangle.Time3: DateTime","summary":"Gets or sets the value 3 on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Time3 = Bars.OpenTimes.Last(5);\nPrint(\"Triangle time 3: {0}\", triangle.Time3);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Time3 = api.Bars.OpenTimes.Last(5)\napi.Print(f\"Triangle time 3: {triangle.Time3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Time3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y1 {get; set;}","python":"chartTriangle.Y1: float","summary":"Gets or sets the value 1 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Y1 = Bars.LowPrices.Last(30) - 5 * Symbol.PipSize;\nPrint(\"Triangle Y1: {0}\", triangle.Y1);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Y1 = api.Bars.LowPrices.Last(30) - 5 * api.Symbol.PipSize\napi.Print(f\"Triangle Y1: {triangle.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y2 {get; set;}","python":"chartTriangle.Y2: float","summary":"Gets or sets the value 2 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Y2 = Bars.HighPrices.Last(20) + 5 * Symbol.PipSize;\nPrint(\"Triangle Y2: {0}\", triangle.Y2);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Y2 = api.Bars.HighPrices.Last(20) + 5 * api.Symbol.PipSize\napi.Print(f\"Triangle Y2: {triangle.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartTriangle.Y3","kind":"property","name":"Y3","type":"T:cAlgo.API.ChartTriangle","namespace":"cAlgo.API","group":"Shapes","csharp":"double Y3 {get; set;}","python":"chartTriangle.Y3: float","summary":"Gets or sets the value 3 on the Y-axis.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = Chart.DrawTriangle(\"triangle\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20), Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10), Color.Orange);\ntriangle.Y3 = Bars.LowPrices.Last(10) - 5 * Symbol.PipSize;\nPrint(\"Triangle Y3: {0}\", triangle.Y3);","python":"triangle = api.Chart.DrawTriangle(\"triangle\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20), api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10), Color.Orange)\ntriangle.Y3 = api.Bars.LowPrices.Last(10) - 5 * api.Symbol.PipSize\napi.Print(f\"Triangle Y3: {triangle.Y3}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartTriangle/Y3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartType","kind":"enum","name":"ChartType","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum ChartType","python":"ChartType","summary":"Represents the predefined chart types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartIconType\n    public partial class ChartTypeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            ShowChartType();\n\n            Chart.ChartTypeChanged += Chart_ChartTypeChanged;\n        }\n\n        private void Chart_ChartTypeChanged(ChartTypeEventArgs obj)\n        {\n            ShowChartType();\n        }\n\n        private void ShowChartType()\n        {\n            Chart.DrawStaticText(\"type\", string.Format(\"Type: {0}\", Chart.ChartType), VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def show_chart_type(self):\n        api.Chart.DrawStaticText(\"type\", f\"Type: {api.Chart.ChartType}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)\n\n    def initialize(self):\n        self.show_chart_type()\n\n        api.Chart.ChartTypeChanged += lambda _: self.show_chart_type()","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Bars","kind":"enum value","name":"Bars","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Bars;","python":"ChartType.Bars","summary":"The Bar chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Candlesticks","kind":"enum value","name":"Candlesticks","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Candlesticks;","python":"ChartType.Candlesticks","summary":"The Candlestick chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Line","kind":"enum value","name":"Line","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Line;","python":"ChartType.Line","summary":"The Line chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Dots","kind":"enum value","name":"Dots","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Dots;","python":"ChartType.Dots","summary":"The Dots chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Area","kind":"enum value","name":"Area","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Area;","python":"ChartType.Area","summary":"The Area chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ChartType.Hlc","kind":"enum value","name":"Hlc","type":"T:cAlgo.API.ChartType","namespace":"cAlgo.API","group":"Chart","csharp":"ChartType.Hlc;","python":"ChartType.Hlc","summary":"The HLC chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ChartTypeEventArgs","kind":"class","name":"ChartTypeEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartTypeEventArgs","python":"ChartTypeEventArgs","summary":"Provides data for the chart type change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartTypeEventArgs\n    public partial class ChartTypeEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ChartTypeChanged += Chart_ChartTypeChanged;\n        }\n\n        private void Chart_ChartTypeChanged(ChartTypeEventArgs obj)\n        {\n            var text = string.Format(\"Chart Type Changed To: {0}\", obj.Chart.ChartType);\n\n            Chart.DrawStaticText(\"type\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ChartTypeChanged += self.on_chart_type_changed\n\n    def on_chart_type_changed(self, args):\n        api.Chart.DrawStaticText(\"type\", f\"Chart Type Changed To: {args.Chart.ChartType}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTypeEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTypeEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ChartTypeChanged)."}]}
{"id":"P:cAlgo.API.ChartTypeEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartTypeEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartTypeEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ChartTypeChanged += OnChartTypeChanged;\n}\n\nprivate void OnChartTypeChanged(ChartTypeEventArgs args)\n{\n    if (args.Chart.ChartType != ChartType.Candlesticks)\n        Print(\"Chart {0} switched to {1}\", args.Chart.SymbolName, args.Chart.ChartType);\n}","python":"def on_start(self):\n    api.Chart.ChartTypeChanged += self.on_chart_type_changed\n\ndef on_chart_type_changed(self, args):\n    if args.Chart.ChartType != ChartType.Candlesticks:\n        api.Print(f\"Chart {args.Chart.SymbolName} switched to {args.Chart.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTypeEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTypeEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ChartTypeChanged)."}]}
{"id":"T:cAlgo.API.ChartVerticalLine","kind":"interface","name":"ChartVerticalLine","type":null,"namespace":"cAlgo.API","group":"Drawings","csharp":"public interface ChartVerticalLine","python":"ChartVerticalLine","summary":"Represents the Vertical Line chart object. The line parallel to the Y-axis that can be set on a certain time value on the X-axis.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to draw a vertical line on chart by using Chart.DrawVertical line method\n    public partial class ChartVerticalLineSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var verticalLine = Chart.DrawVerticalLine(\"vertical_line\", Chart.LastVisibleBarIndex, Color.Red, 2, LineStyle.DotsRare);\n\n            verticalLine.IsInteractive = true;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        verticalLine = api.Chart.DrawVerticalLine(\"vertical_line\", api.Chart.LastVisibleBarIndex, Color.Red, 2, LineStyle.DotsRare)\n        verticalLine.IsInteractive = True","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartVerticalLine.Color","kind":"property","name":"Color","type":"T:cAlgo.API.ChartVerticalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"Color Color {get; set;}","python":"chartVerticalLine.Color: Color","summary":"Gets or sets the line color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"sessionStart\", Bars.OpenTimes.LastValue, Color.Gray);\nline.Color = Color.Yellow;\nPrint(\"Vertical line color: {0}\", line.Color);","python":"line = api.Chart.DrawVerticalLine(\"sessionStart\", api.Bars.OpenTimes.LastValue, Color.Gray)\nline.Color = Color.Yellow\napi.Print(f\"Vertical line color: {line.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartVerticalLine.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.ChartVerticalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"LineStyle LineStyle {get; set;}","python":"chartVerticalLine.LineStyle: LineStyle","summary":"Gets or sets the line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"sessionStart\", Bars.OpenTimes.LastValue, Color.Gray);\nline.LineStyle = LineStyle.DotsVeryRare;\nPrint(\"Vertical line style: {0}\", line.LineStyle);","python":"line = api.Chart.DrawVerticalLine(\"sessionStart\", api.Bars.OpenTimes.LastValue, Color.Gray)\nline.LineStyle = LineStyle.DotsVeryRare\napi.Print(f\"Vertical line style: {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartVerticalLine.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.ChartVerticalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"int Thickness {get; set;}","python":"chartVerticalLine.Thickness: int","summary":"Gets or sets the line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"sessionStart\", Bars.OpenTimes.LastValue, Color.Gray);\nline.Thickness = 2;\nPrint(\"Vertical line thickness: {0}\", line.Thickness);","python":"line = api.Chart.DrawVerticalLine(\"sessionStart\", api.Bars.OpenTimes.LastValue, Color.Gray)\nline.Thickness = 2\napi.Print(f\"Vertical line thickness: {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"P:cAlgo.API.ChartVerticalLine.Time","kind":"property","name":"Time","type":"T:cAlgo.API.ChartVerticalLine","namespace":"cAlgo.API","group":"Drawings","csharp":"DateTime Time {get; set;}","python":"chartVerticalLine.Time: DateTime","summary":"Gets or sets the value on the Time line.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawVerticalLine(\"sessionStart\", Bars.OpenTimes.LastValue, Color.Gray);\nline.Time = Server.Time.Date;\nPrint(\"Vertical line time: {0}\", line.Time);","python":"line = api.Chart.DrawVerticalLine(\"sessionStart\", api.Bars.OpenTimes.LastValue, Color.Gray)\nline.Time = api.Server.Time.Date\napi.Print(f\"Vertical line time: {line.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the CLI displays no chart."},{"name":"Cloud","support":"Partial","behaviour":"Created and kept with all its properties, but never drawn: the cloud displays no chart."}]}
{"id":"T:cAlgo.API.ChartVisibilityChangedEventArgs","kind":"class","name":"ChartVisibilityChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartVisibilityChangedEventArgs","python":"ChartVisibilityChangedEventArgs","summary":"Provides data for chart visibility changed event","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.VisibilityChanged += OnChartVisibilityChanged;\n}\n\nprivate void OnChartVisibilityChanged(ChartVisibilityChangedEventArgs args)\n{\n    Print(\"Chart {0} {1} is visible: {2}\", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.IsVisible);\n}","python":"def on_start(self):\n    api.Chart.VisibilityChanged += self.on_chart_visibility_changed\n\ndef on_chart_visibility_changed(self, args):\n    api.Print(f\"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} is visible: {args.Chart.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartVisibilityChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartVisibilityChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.VisibilityChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.VisibilityChanged)."}]}
{"id":"P:cAlgo.API.ChartVisibilityChangedEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartVisibilityChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartVisibilityChangedEventArgs.Chart: Chart","summary":"The chart that event belonges to.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.VisibilityChanged += OnChartVisibilityChanged;\n}\n\nprivate void OnChartVisibilityChanged(ChartVisibilityChangedEventArgs args)\n{\n    if (!args.Chart.IsVisible)\n        Print(\"Chart {0} is hidden, skipping chart drawing\", args.Chart.SymbolName);\n}","python":"def on_start(self):\n    api.Chart.VisibilityChanged += self.on_chart_visibility_changed\n\ndef on_chart_visibility_changed(self, args):\n    if not args.Chart.IsVisible:\n        api.Print(f\"Chart {args.Chart.SymbolName} is hidden, skipping chart drawing\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartVisibilityChangedEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartVisibilityChangedEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Chart.VisibilityChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.VisibilityChanged)."}]}
{"id":"T:cAlgo.API.ChartZoomEventArgs","kind":"class","name":"ChartZoomEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ChartZoomEventArgs","python":"ChartZoomEventArgs","summary":"Provides data for the chart type change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ChartZoomEventArgs\n    public partial class ChartZoomEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.ZoomChanged += Chart_ZoomChanged;\n        }\n\n        private void Chart_ZoomChanged(ChartZoomEventArgs obj)\n        {\n            var text = string.Format(\"Chart Zoom Level Changed To: {0}\", obj.Chart.ZoomLevel);\n\n            Chart.DrawStaticText(\"zoom\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ZoomChanged += self.on_zoom_changed\n\n    def on_zoom_changed(self, args):\n        api.Chart.DrawStaticText(\"zoom\", f\"Chart Zoom Level Changed To: {args.Chart.ZoomLevel}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartZoomEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartZoomEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ZoomChanged)."}]}
{"id":"P:cAlgo.API.ChartZoomEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.ChartZoomEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"chartZoomEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.ZoomChanged += OnChartZoomChanged;\n}\n\nprivate void OnChartZoomChanged(ChartZoomEventArgs args)\n{\n    Print(\"Chart {0} zoom level: {1}%\", args.Chart.SymbolName, args.Chart.ZoomLevel);\n}","python":"def on_start(self):\n    api.Chart.ZoomChanged += self.on_chart_zoom_changed\n\ndef on_chart_zoom_changed(self, args):\n    api.Print(f\"Chart {args.Chart.SymbolName} zoom level: {args.Chart.ZoomLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartZoomEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartZoomEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Chart.ZoomChanged)."}]}
{"id":"T:cAlgo.API.CheckBox","kind":"class","name":"CheckBox","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class CheckBox : Control","python":"CheckBox","summary":"Represents the Checkbox.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use checkbox control and handle its checked/unchecked events\n    public partial class CheckBoxControlSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold\n            };\n\n            var checkBox = new CheckBox\n            {\n                Text = \"Unchecked\",\n                Margin = 10,\n                FontWeight = FontWeight.ExtraBold\n            };\n\n            checkBox.Checked += CheckBox_Checked;\n            checkBox.Unchecked += CheckBox_Unchecked;\n\n            stackPanel.AddChild(checkBox);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void CheckBox_Unchecked(CheckBoxEventArgs obj)\n        {\n            obj.CheckBox.Text = \"Unchecked\";\n        }\n\n        private void CheckBox_Checked(CheckBoxEventArgs obj)\n        {\n            obj.CheckBox.Text = \"Checked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n\n        checkBox = CheckBox()\n        checkBox.Text = \"Unchecked\"\n        checkBox.Margin = Thickness(10)\n        checkBox.FontWeight = FontWeight.ExtraBold\n\n        checkBox.Checked += self.on_checkBox_checked\n        checkBox.Unchecked += self.on_checkBox_unchecked\n\n        stackPanel.AddChild(checkBox)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_checkBox_checked(self, args):\n        args.CheckBox.Text = \"Checked\"\n\n    def on_checkBox_unchecked(self, args):\n        args.CheckBox.Text = \"Unchecked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.CheckBox.#ctor","kind":"constructor","name":"CheckBox","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public CheckBox()","python":"CheckBox()","summary":"Initializes a new instance of the checkbox class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Use trailing stop\", IsChecked = true, Margin = 5 };\nChart.AddControl(checkBox);","python":"checkBox = CheckBox()\ncheckBox.Text = \"Use trailing stop\"\ncheckBox.IsChecked = True\ncheckBox.Margin = Thickness(5)\napi.Chart.AddControl(checkBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.CheckBox.Content","kind":"property","name":"Content","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Content {get; set;}","python":"checkBox.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Risk 1%\", ForegroundColor = Color.Orange, FontWeight = FontWeight.Bold };\nvar checkBox = new CheckBox { Content = label };\nChart.AddControl(checkBox);","python":"label = TextBlock()\nlabel.Text = \"Risk 1%\"\nlabel.ForegroundColor = Color.Orange\nlabel.FontWeight = FontWeight.Bold\ncheckBox = CheckBox()\ncheckBox.Content = label\napi.Chart.AddControl(checkBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.CheckBox.IsChecked","kind":"property","name":"IsChecked","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool? IsChecked {get; set;}","python":"checkBox.IsChecked: bool | None","summary":"Gets or sets a value indicating whether the checkbox is checked.","remarks":null,"parameters":[],"returns":{"csharpType":"bool?","pythonType":"bool | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Close positions on stop\" };\ncheckBox.Click += args => Print(\"Checked: {0}\", args.CheckBox.IsChecked == true);\nChart.AddControl(checkBox);","python":"checkBox = CheckBox()\ncheckBox.Text = \"Close positions on stop\"\ncheckBox.Click += lambda args: api.Print(f\"Checked: {args.CheckBox.IsChecked == True}\")\napi.Chart.AddControl(checkBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/IsChecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/IsChecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.CheckBox.IsThreeState","kind":"property","name":"IsThreeState","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsThreeState {get; set;}","python":"checkBox.IsThreeState: bool","summary":"Checks if the checkbox may be of three states - checked, unchecked and indeterminate.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Hedge mode\", IsThreeState = true, IsChecked = null };\ncheckBox.Indeterminate += args => Print(\"Hedge mode is undecided\");\nChart.AddControl(checkBox);","python":"checkBox = CheckBox()\ncheckBox.Text = \"Hedge mode\"\ncheckBox.IsThreeState = True\ncheckBox.IsChecked = None\ncheckBox.Indeterminate += lambda args: api.Print(\"Hedge mode is undecided\")\napi.Chart.AddControl(checkBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/IsThreeState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/IsThreeState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.CheckBox.Text","kind":"property","name":"Text","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"checkBox.Text: str","summary":"Gets or sets the checkbox text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Show spread\" };\nChart.AddControl(checkBox);\nPrint(\"Check box text: {0}\", checkBox.Text);","python":"checkBox = CheckBox()\ncheckBox.Text = \"Show spread\"\napi.Chart.AddControl(checkBox)\napi.Print(f\"Check box text: {checkBox.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.CheckBox.Checked","kind":"event","name":"Checked","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<CheckBoxEventArgs> Checked;","python":"checkBox.Checked += handler  # handler(obj: CheckBoxEventArgs)","summary":"Occurs when checked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CheckBoxEventArgs>","pythonType":"Callable[[CheckBoxEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Trailing stop\" };\ncheckBox.Checked += args => Print(\"Trailing stop enabled\");\nChart.AddControl(checkBox);","python":"def on_start(self):\n    checkBox = CheckBox()\n    checkBox.Text = \"Trailing stop\"\n    checkBox.Checked += self.on_check_box_checked\n    api.Chart.AddControl(checkBox)\n\ndef on_check_box_checked(self, args):\n    api.Print(\"Trailing stop enabled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Checked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Checked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.CheckBox.Click","kind":"event","name":"Click","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<CheckBoxEventArgs> Click;","python":"checkBox.Click += handler  # handler(obj: CheckBoxEventArgs)","summary":"Occurs when clicked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CheckBoxEventArgs>","pythonType":"Callable[[CheckBoxEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Pause trading\" };\ncheckBox.Click += args => Print(\"Pause trading clicked, checked: {0}\", args.CheckBox.IsChecked);\nChart.AddControl(checkBox);","python":"def on_start(self):\n    checkBox = CheckBox()\n    checkBox.Text = \"Pause trading\"\n    checkBox.Click += self.on_check_box_click\n    api.Chart.AddControl(checkBox)\n\ndef on_check_box_click(self, args):\n    api.Print(f\"Pause trading clicked, checked: {args.CheckBox.IsChecked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Click/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Click/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.CheckBox.Indeterminate","kind":"event","name":"Indeterminate","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<CheckBoxEventArgs> Indeterminate;","python":"checkBox.Indeterminate += handler  # handler(obj: CheckBoxEventArgs)","summary":"Occurs when indeterminate.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CheckBoxEventArgs>","pythonType":"Callable[[CheckBoxEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Direction filter\", IsThreeState = true };\ncheckBox.Indeterminate += args => Print(\"Direction filter is off, trading both sides\");\nChart.AddControl(checkBox);","python":"def on_start(self):\n    checkBox = CheckBox()\n    checkBox.Text = \"Direction filter\"\n    checkBox.IsThreeState = True\n    checkBox.Indeterminate += self.on_check_box_indeterminate\n    api.Chart.AddControl(checkBox)\n\ndef on_check_box_indeterminate(self, args):\n    api.Print(\"Direction filter is off, trading both sides\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Indeterminate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Indeterminate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.CheckBox.Unchecked","kind":"event","name":"Unchecked","type":"T:cAlgo.API.CheckBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<CheckBoxEventArgs> Unchecked;","python":"checkBox.Unchecked += handler  # handler(obj: CheckBoxEventArgs)","summary":"Occurs when unchecked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CheckBoxEventArgs>","pythonType":"Callable[[CheckBoxEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var checkBox = new CheckBox { Text = \"Trailing stop\", IsChecked = true };\ncheckBox.Unchecked += args => Print(\"Trailing stop disabled\");\nChart.AddControl(checkBox);","python":"def on_start(self):\n    checkBox = CheckBox()\n    checkBox.Text = \"Trailing stop\"\n    checkBox.IsChecked = True\n    checkBox.Unchecked += self.on_check_box_unchecked\n    api.Chart.AddControl(checkBox)\n\ndef on_check_box_unchecked(self, args):\n    api.Print(\"Trailing stop disabled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Unchecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Unchecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.CheckBoxEventArgs","kind":"class","name":"CheckBoxEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CheckBoxEventArgs","python":"CheckBoxEventArgs","summary":"Provides data for the checkbox event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the CheckBoxEventArgs\n    public partial class CheckBoxEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var checkBox = new CheckBox\n            {\n                Text = \"Check Box\",\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            checkBox.Click += CheckBox_Click;\n\n            Chart.AddControl(checkBox);\n        }\n\n        private void CheckBox_Click(CheckBoxEventArgs obj)\n        {\n            var state = obj.CheckBox.IsChecked.Value ? \"Checked\" : \"Unchecked\";\n\n            obj.CheckBox.Text = state;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        checkBox = CheckBox()\n        checkBox.Text = \"Check Box\"\n        checkBox.HorizontalAlignment = HorizontalAlignment.Center\n        checkBox.VerticalAlignment = VerticalAlignment.Center\n\n        checkBox.Click += self.on_check_box_click\n\n        api.Chart.AddControl(checkBox)\n\n    def on_check_box_click(self, args):\n        state = \"Checked\" if args.CheckBox.IsChecked else \"Unchecked\"\n        args.CheckBox.Text = state","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CheckBoxEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CheckBoxEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more)."}]}
{"id":"P:cAlgo.API.CheckBoxEventArgs.CheckBox","kind":"property","name":"CheckBox","type":"T:cAlgo.API.CheckBoxEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CheckBox CheckBox {get;}","python":"checkBoxEventArgs.CheckBox: CheckBox","summary":"Gets the checkbox data.","remarks":null,"parameters":[],"returns":{"csharpType":"CheckBox","pythonType":"CheckBox","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var checkBox = new CheckBox { Text = \"Show levels\" };\n    checkBox.Click += OnCheckBoxClick;\n    Chart.AddControl(checkBox);\n}\n\nprivate void OnCheckBoxClick(CheckBoxEventArgs args)\n{\n    if (args.CheckBox.IsChecked == true)\n        Chart.DrawHorizontalLine(\"level\", Symbol.Bid, Color.Orange);\n    else\n        Chart.RemoveObject(\"level\");\n}","python":"def on_start(self):\n    checkBox = CheckBox()\n    checkBox.Text = \"Show levels\"\n    checkBox.Click += self.on_check_box_click\n    api.Chart.AddControl(checkBox)\n\ndef on_check_box_click(self, args):\n    if args.CheckBox.IsChecked:\n        api.Chart.DrawHorizontalLine(\"level\", api.Symbol.Bid, Color.Orange)\n    else:\n        api.Chart.RemoveObject(\"level\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CheckBoxEventArgs/CheckBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CheckBoxEventArgs/CheckBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more)."}]}
{"id":"T:cAlgo.API.Clipboard","kind":"interface","name":"Clipboard","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public interface Clipboard","python":"Clipboard","summary":"Provides access to system Clipboard.","remarks":"Accessing Clipboard requires user permission.","parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"Clipboard.SetText(SymbolName + \" \" + Symbol.Bid);\nPrint(\"Clipboard now contains: {0}\", Clipboard.GetText());","python":"api.Clipboard.SetText(f\"{api.SymbolName} {api.Symbol.Bid}\")\napi.Print(f\"Clipboard now contains: {api.Clipboard.GetText()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."},{"name":"Cloud","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."}]}
{"id":"M:cAlgo.API.Clipboard.GetText","kind":"method","name":"GetText","type":"T:cAlgo.API.Clipboard","namespace":"cAlgo.API","group":"General","csharp":"string GetText()","python":"api.Clipboard.GetText() -> str","summary":"Returns a string containing text data on the Clipboard.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"A string containing text data, or an empty string if no corresponding text data is available.","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var symbolName = Clipboard.GetText().Trim();\nif (Symbols.Exists(symbolName))\n    Print(\"Clipboard holds a symbol name: {0}\", symbolName);","python":"symbolName = api.Clipboard.GetText().strip()\nif api.Symbols.Exists(symbolName):\n    api.Print(f\"Clipboard holds a symbol name: {symbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/GetText/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/GetText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."},{"name":"Cloud","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."}]}
{"id":"M:cAlgo.API.Clipboard.SetText(System.String)","kind":"method","name":"SetText","type":"T:cAlgo.API.Clipboard","namespace":"cAlgo.API","group":"General","csharp":"void SetText(string text)","python":"api.Clipboard.SetText(text: str) -> None","summary":"Stores text data on the Clipboard.","remarks":null,"parameters":[{"name":"text","csharpType":"string","pythonType":"str","summary":"A string that contains the text data to store on the Clipboard."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.FirstOrDefault();\nif (position != null)\n    Clipboard.SetText(position.Id.ToString());","python":"if api.Positions.Count > 0:\n    api.Clipboard.SetText(str(api.Positions[0].Id))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/SetText/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Clipboard/SetText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."},{"name":"Cloud","support":"None","behaviour":"SetText does nothing; GetText returns an empty string. No exception is thrown."}]}
{"id":"T:cAlgo.API.ClipboardPermission","kind":"interface","name":"ClipboardPermission","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface ClipboardPermission","python":"ClipboardPermission","summary":"System Clipboard Permission","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"if (Permissions.ClipboardPermission.Request())\n    Clipboard.SetText(SymbolName);","python":"if api.Permissions.ClipboardPermission.Request():\n    api.Clipboard.SetText(api.SymbolName)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/ClipboardPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/ClipboardPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CloudAttribute","kind":"class","name":"CloudAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public class CloudAttribute : Attribute","python":"CloudAttribute","summary":"Represents the cloud between the indicator lines.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    // This indicator fills the area between two outputs with the Clouds entry of config.json\n    public partial class BollingerBandsCloudSample : Indicator\n    {\n        private BollingerBands _bollingerBands;\n\n        protected override void Initialize()\n        {\n            _bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, Periods, 2, MovingAverageType.Simple);\n        }\n\n        public override void Calculate(int index)\n        {\n            Top[index] = _bollingerBands.Top[index];\n            Bottom[index] = _bollingerBands.Bottom[index];\n        }\n    }\n}","python":"class BollingerBandsCloudSample():\n    def initialize(self):\n        self.bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, api.Periods, 2, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        api.Top[index] = self.bollingerBands.Top[index]\n        api.Bottom[index] = self.bollingerBands.Bottom[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"MinValue\": 2\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Top\",\n      \"Color\": \"Red\"\n    },\n    {\n      \"Name\": \"Bottom\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"Top\",\n      \"SecondLineName\": \"Bottom\",\n      \"Opacity\": 0.2\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.CloudAttribute.#ctor(System.String,System.String)","kind":"constructor","name":"CloudAttribute","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public CloudAttribute(string firstLineName, string secondLineName)","python":"CloudAttribute(firstLineName: str, secondLineName: str)","summary":"The cloud between the indicator lines.","remarks":null,"parameters":[{"name":"firstLineName","csharpType":"string","pythonType":"str","summary":""},{"name":"secondLineName","csharpType":"string","pythonType":"str","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        High[index] = Bars.HighPrices[index];\n        Low[index] = Bars.LowPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.High[index] = api.Bars.HighPrices[index]\n    api.Low[index] = api.Bars.LowPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"High\",\n      \"Color\": \"Green\"\n    },\n    {\n      \"Name\": \"Low\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"High\",\n      \"SecondLineName\": \"Low\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CloudAttribute.FirstColor","kind":"property","name":"FirstColor","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string FirstColor {get; set;}","python":"cloudAttribute.FirstColor: str","summary":"Cloud color when the first line is above the second one. If not specified, the color of the first line is used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    private SimpleMovingAverage _fastMa;\n    private SimpleMovingAverage _slowMa;\n\n    protected override void Initialize()\n    {\n        _fastMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, 10);\n        _slowMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, 30);\n    }\n\n    public override void Calculate(int index)\n    {\n        Fast[index] = _fastMa.Result[index];\n        Slow[index] = _slowMa.Result[index];\n    }\n}","python":"class CloudSample():\n    def initialize(self):\n        self.fastMa = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 10)\n        self.slowMa = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 30)\n\n    def calculate(self, index):\n        api.Fast[index] = self.fastMa.Result[index]\n        api.Slow[index] = self.slowMa.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Fast\",\n      \"Color\": \"Gray\"\n    },\n    {\n      \"Name\": \"Slow\",\n      \"Color\": \"Gray\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"Fast\",\n      \"SecondLineName\": \"Slow\",\n      \"FirstColor\": \"Green\",\n      \"SecondColor\": \"Red\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CloudAttribute.FirstLineName","kind":"property","name":"FirstLineName","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string FirstLineName {get;}","python":"cloudAttribute.FirstLineName: str","summary":"The name of the first indicator line.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Fast[index] = Bars.ClosePrices[index];\n        Slow[index] = Bars.OpenPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Fast[index] = api.Bars.ClosePrices[index]\n    api.Slow[index] = api.Bars.OpenPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Fast\",\n      \"Color\": \"Green\"\n    },\n    {\n      \"Name\": \"Slow\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"Fast\",\n      \"SecondLineName\": \"Slow\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstLineName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/FirstLineName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CloudAttribute.Opacity","kind":"property","name":"Opacity","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public double Opacity {get; set;}","python":"cloudAttribute.Opacity: float","summary":"The cloud opacity. Value can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0. Opacity is multiplied by the alpha channel of the active color (first or second color). Default opacity value is 0.2.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        High[index] = Bars.HighPrices[index];\n        Low[index] = Bars.LowPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.High[index] = api.Bars.HighPrices[index]\n    api.Low[index] = api.Bars.LowPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"High\",\n      \"Color\": \"Green\"\n    },\n    {\n      \"Name\": \"Low\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"High\",\n      \"SecondLineName\": \"Low\",\n      \"Opacity\": 0.5\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Opacity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/Opacity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CloudAttribute.SecondColor","kind":"property","name":"SecondColor","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string SecondColor {get; set;}","python":"cloudAttribute.SecondColor: str","summary":"Cloud color when the second line is above the first one. If not specified, color of the second line is used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    private ExponentialMovingAverage _fastMa;\n    private ExponentialMovingAverage _slowMa;\n\n    protected override void Initialize()\n    {\n        _fastMa = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 12);\n        _slowMa = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 26);\n    }\n\n    public override void Calculate(int index)\n    {\n        Fast[index] = _fastMa.Result[index];\n        Slow[index] = _slowMa.Result[index];\n    }\n}","python":"class CloudSample():\n    def initialize(self):\n        self.fastMa = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 12)\n        self.slowMa = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 26)\n\n    def calculate(self, index):\n        api.Fast[index] = self.fastMa.Result[index]\n        api.Slow[index] = self.slowMa.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Fast\",\n      \"Color\": \"Green\"\n    },\n    {\n      \"Name\": \"Slow\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"Fast\",\n      \"SecondLineName\": \"Slow\",\n      \"SecondColor\": \"#80FF0000\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CloudAttribute.SecondLineName","kind":"property","name":"SecondLineName","type":"T:cAlgo.API.CloudAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string SecondLineName {get;}","python":"cloudAttribute.SecondLineName: str","summary":"The name of the second indicator line.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class CloudSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Upper[index] = Bars.HighPrices[index];\n        Lower[index] = Bars.LowPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Upper[index] = api.Bars.HighPrices[index]\n    api.Lower[index] = api.Bars.LowPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Upper\",\n      \"Color\": \"Green\"\n    },\n    {\n      \"Name\": \"Lower\",\n      \"Color\": \"Red\"\n    }\n  ],\n  \"Clouds\": [\n    {\n      \"FirstLineName\": \"Upper\",\n      \"SecondLineName\": \"Lower\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondLineName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/CloudAttribute/SecondLineName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Color","kind":"class","name":"Color","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public sealed class Color","python":"Color","summary":"Represents an ARGB (alpha, red, green, blue) color.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        Chart.ColorSettings.BackgroundColor = BackgroundColor;\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.ColorSettings.BackgroundColor = api.BackgroundColor","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"BackgroundColor\",\n      \"DisplayName\": \"Background Color\",\n      \"Type\": \"Color\",\n      \"DefaultValue\": \"#168565\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromArgb(System.Int32,System.Int32,System.Int32,System.Int32)","kind":"method","name":"FromArgb","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromArgb(int alpha, int red, int green, int blue)","python":"Color.FromArgb(alpha: int, red: int, green: int, blue: int) -> Color","summary":"Creates a color from alpha, red, green and blue components.","remarks":null,"parameters":[{"name":"alpha","csharpType":"int","pythonType":"int","summary":"Alpha value from 0 to 255"},{"name":"red","csharpType":"int","pythonType":"int","summary":"Red value from 0 to 255"},{"name":"green","csharpType":"int","pythonType":"int","summary":"Green value from 0 to 255"},{"name":"blue","csharpType":"int","pythonType":"int","summary":"Blue value from 0 to 255"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"The Color for specified parameters.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var greenColor = Color.FromArgb(255, 0, 255, 0);\nChart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, greenColor);","python":"greenColor = Color.FromArgb(255, 0, 255, 0)\napi.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, greenColor)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromArgb(System.Int32,cAlgo.API.Color)","kind":"method","name":"FromArgb","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromArgb(int alpha, Color baseColor)","python":"Color.FromArgb(alpha: int, baseColor: Color) -> Color","summary":"Creates a color from existing color, but with new specified alpha value.","remarks":null,"parameters":[{"name":"alpha","csharpType":"int","pythonType":"int","summary":"New alpha value from 0 to 255"},{"name":"baseColor","csharpType":"Color","pythonType":"Color","summary":"Base color from which red, green and blue values will be copied to a new color"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"The Color for specified parameters.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var transparentBlue = Color.FromArgb(128, Color.Blue);\nvar zone = Chart.DrawRectangle(\"zone\", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, transparentBlue);\nzone.IsFilled = true;","python":"transparentBlue = Color.FromArgb(128, Color.Blue)\nzone = api.Chart.DrawRectangle(\"zone\", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, transparentBlue)\nzone.IsFilled = True"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromArgb(System.Int32)","kind":"method","name":"FromArgb","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromArgb(int argb)","python":"Color.FromArgb(argb: int) -> Color","summary":"Creates a color from a 32-bit ARGB value.","remarks":null,"parameters":[{"name":"argb","csharpType":"int","pythonType":"int","summary":"Color ARGB 32-bit integer value"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"The Color for specified parameter.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var semiTransparentOrange = Color.FromArgb(unchecked((int)0x80FFA500));\nPrint(\"Color: {0}\", semiTransparentOrange.ToHexString());","python":"semiTransparentOrange = Color.FromArgb(Color.Orange.ToArgb())\napi.Print(f\"Color: {semiTransparentOrange.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromArgb(System.Int32,System.Int32,System.Int32)","kind":"method","name":"FromArgb","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromArgb(int red, int green, int blue)","python":"Color.FromArgb(red: int, green: int, blue: int) -> Color","summary":"Creates a color from red, green and blue values. The alpha value is implicitly 255 (fully opaque).","remarks":null,"parameters":[{"name":"red","csharpType":"int","pythonType":"int","summary":"Red value from 0 to 255"},{"name":"green","csharpType":"int","pythonType":"int","summary":"Green value from 0 to 255"},{"name":"blue","csharpType":"int","pythonType":"int","summary":"Blue value from 0 to 255"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"The Color for specified parameters.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var greenColor = Color.FromArgb(0, 255, 0);\nChart.ColorSettings.BullFillColor = greenColor;","python":"greenColor = Color.FromArgb(0, 255, 0)\napi.Chart.ColorSettings.BullFillColor = greenColor"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromArgb/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromHex(System.String)","kind":"method","name":"FromHex","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromHex(string hex)","python":"Color.FromHex(hex: str) -> Color","summary":"Attempts to convert a hex string to a Color.","remarks":null,"parameters":[{"name":"hex","csharpType":"string","pythonType":"str","summary":"Hex string to convert to a Color"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"A Color that represents the converted hex string.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.FromHex(\"#808080\");\nPrint(\"R: {0} G: {1} B: {2}\", color.R, color.G, color.B);","python":"color = Color.FromHex(\"#808080\")\napi.Print(f\"R: {color.R} G: {color.G} B: {color.B}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromHex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromHex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.FromName(System.String)","kind":"method","name":"FromName","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FromName(string name)","python":"Color.FromName(name: str) -> Color","summary":"Creates a color from the specified name of a predefined color.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Name of predefined color"}],"returns":{"csharpType":"Color","pythonType":"Color","summary":"A Color for specified name or color with value #00000000 if the name was not found.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var greenColor = Color.FromName(\"Green\");\nif (greenColor != Color.Empty)\n    Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, greenColor);","python":"greenColor = Color.FromName(\"Green\")\nif greenColor != Color.Empty:\n    api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, greenColor)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FromName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.ToArgb","kind":"method","name":"ToArgb","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public int ToArgb()","python":"color.ToArgb() -> int","summary":"Get the 32-bit ARGB color value.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var argb = Color.Gold.ToArgb();\nvar sameColor = Color.FromArgb(argb);\nPrint(\"ARGB value: {0} | Same color: {1}\", argb, sameColor == Color.Gold);","python":"argb = Color.Gold.ToArgb()\nsameColor = Color.FromArgb(argb)\napi.Print(f\"ARGB value: {argb} | Same color: {sameColor == Color.Gold}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ToArgb/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ToArgb/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Color.ToHexString","kind":"method","name":"ToHexString","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public string ToHexString()","python":"color.ToHexString() -> str","summary":"Get the hex string representation of the color.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"The hex string representation of the color.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Background color: {0}\", Chart.ColorSettings.BackgroundColor.ToHexString());","python":"api.Print(f\"Background color: {api.Chart.ColorSettings.BackgroundColor.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ToHexString/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ToHexString/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.A","kind":"property","name":"A","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public byte A {get;}","python":"color.A: int","summary":"Gets the alpha component value of the color.","remarks":null,"parameters":[],"returns":{"csharpType":"byte","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.FromArgb(128, Color.Red);\nPrint(\"Alpha: {0}\", color.A);","python":"color = Color.FromArgb(128, Color.Red)\napi.Print(f\"Alpha: {color.A}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/A/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/A/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.AliceBlue","kind":"property","name":"AliceBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color AliceBlue {get;}","python":"Color.AliceBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF0F8FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.AliceBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.AliceBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/AliceBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/AliceBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.AntiqueWhite","kind":"property","name":"AntiqueWhite","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color AntiqueWhite {get;}","python":"Color.AntiqueWhite: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFAEBD7.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.AntiqueWhite);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.AntiqueWhite)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/AntiqueWhite/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/AntiqueWhite/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Aqua","kind":"property","name":"Aqua","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Aqua {get;}","python":"Color.Aqua: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00FFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Aqua);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Aqua)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Aqua/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Aqua/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Aquamarine","kind":"property","name":"Aquamarine","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Aquamarine {get;}","python":"Color.Aquamarine: Color","summary":"Gets a system-defined color that has an ARGB value of #FF7FFFD4.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Aquamarine);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Aquamarine)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Aquamarine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Aquamarine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Azure","kind":"property","name":"Azure","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Azure {get;}","python":"Color.Azure: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF0FFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Azure);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Azure)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Azure/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Azure/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.B","kind":"property","name":"B","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public byte B {get;}","python":"color.B: int","summary":"Gets the blue component value of the color.","remarks":null,"parameters":[],"returns":{"csharpType":"byte","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.SteelBlue;\nPrint(\"Blue: {0}\", color.B);","python":"color = Color.SteelBlue\napi.Print(f\"Blue: {color.B}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/B/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/B/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Beige","kind":"property","name":"Beige","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Beige {get;}","python":"Color.Beige: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF5F5DC.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Beige);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Beige)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Beige/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Beige/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Bisque","kind":"property","name":"Bisque","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Bisque {get;}","python":"Color.Bisque: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFE4C4.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Bisque);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Bisque)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Bisque/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Bisque/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Black","kind":"property","name":"Black","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Black {get;}","python":"Color.Black: Color","summary":"Gets a system-defined color that has an ARGB value of #FF000000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Black);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Black)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Black/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Black/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.BlanchedAlmond","kind":"property","name":"BlanchedAlmond","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color BlanchedAlmond {get;}","python":"Color.BlanchedAlmond: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFEBCD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.BlanchedAlmond);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.BlanchedAlmond)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BlanchedAlmond/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BlanchedAlmond/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Blue","kind":"property","name":"Blue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Blue {get;}","python":"Color.Blue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF0000FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Blue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Blue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Blue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Blue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.BlueViolet","kind":"property","name":"BlueViolet","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color BlueViolet {get;}","python":"Color.BlueViolet: Color","summary":"Gets a system-defined color that has an ARGB value of #FF8A2BE2.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.BlueViolet);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.BlueViolet)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BlueViolet/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BlueViolet/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Brown","kind":"property","name":"Brown","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Brown {get;}","python":"Color.Brown: Color","summary":"Gets a system-defined color that has an ARGB value of #FFA52A2A.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Brown);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Brown)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Brown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Brown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.BurlyWood","kind":"property","name":"BurlyWood","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color BurlyWood {get;}","python":"Color.BurlyWood: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDEB887.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.BurlyWood);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.BurlyWood)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BurlyWood/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/BurlyWood/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.CadetBlue","kind":"property","name":"CadetBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color CadetBlue {get;}","python":"Color.CadetBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF5F9EA0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.CadetBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.CadetBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/CadetBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/CadetBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Chartreuse","kind":"property","name":"Chartreuse","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Chartreuse {get;}","python":"Color.Chartreuse: Color","summary":"Gets a system-defined color that has an ARGB value of #FF7FFF00.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Chartreuse);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Chartreuse)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Chartreuse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Chartreuse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Chocolate","kind":"property","name":"Chocolate","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Chocolate {get;}","python":"Color.Chocolate: Color","summary":"Gets a system-defined color that has an ARGB value of #FFD2691E.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Chocolate);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Chocolate)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Chocolate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Chocolate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Coral","kind":"property","name":"Coral","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Coral {get;}","python":"Color.Coral: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF7F50.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Coral);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Coral)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Coral/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Coral/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.CornflowerBlue","kind":"property","name":"CornflowerBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color CornflowerBlue {get;}","python":"Color.CornflowerBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF6495ED.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.CornflowerBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.CornflowerBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/CornflowerBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/CornflowerBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Cornsilk","kind":"property","name":"Cornsilk","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Cornsilk {get;}","python":"Color.Cornsilk: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFF8DC.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Cornsilk);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Cornsilk)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Cornsilk/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Cornsilk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Crimson","kind":"property","name":"Crimson","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Crimson {get;}","python":"Color.Crimson: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDC143C.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Crimson);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Crimson)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Crimson/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Crimson/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Cyan","kind":"property","name":"Cyan","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Cyan {get;}","python":"Color.Cyan: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00FFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Cyan);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Cyan)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Cyan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Cyan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkBlue","kind":"property","name":"DarkBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkBlue {get;}","python":"Color.DarkBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00008B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkCyan","kind":"property","name":"DarkCyan","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkCyan {get;}","python":"Color.DarkCyan: Color","summary":"Gets a system-defined color that has an ARGB value of #FF008B8B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkCyan);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkCyan)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkCyan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkCyan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkGoldenrod","kind":"property","name":"DarkGoldenrod","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkGoldenrod {get;}","python":"Color.DarkGoldenrod: Color","summary":"Gets a system-defined color that has an ARGB value of #FFB8860B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkGoldenrod);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkGoldenrod)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGoldenrod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGoldenrod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkGray","kind":"property","name":"DarkGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkGray {get;}","python":"Color.DarkGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FFA9A9A9.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkGreen","kind":"property","name":"DarkGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkGreen {get;}","python":"Color.DarkGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF006400.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkKhaki","kind":"property","name":"DarkKhaki","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkKhaki {get;}","python":"Color.DarkKhaki: Color","summary":"Gets a system-defined color that has an ARGB value of #FFBDB76B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkKhaki);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkKhaki)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkKhaki/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkKhaki/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkMagenta","kind":"property","name":"DarkMagenta","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkMagenta {get;}","python":"Color.DarkMagenta: Color","summary":"Gets a system-defined color that has an ARGB value of #FF8B008B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkMagenta);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkMagenta)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkMagenta/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkMagenta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkOliveGreen","kind":"property","name":"DarkOliveGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkOliveGreen {get;}","python":"Color.DarkOliveGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF556B2F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkOliveGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkOliveGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOliveGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOliveGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkOrange","kind":"property","name":"DarkOrange","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkOrange {get;}","python":"Color.DarkOrange: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF8C00.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkOrange);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkOrange)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOrange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOrange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkOrchid","kind":"property","name":"DarkOrchid","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkOrchid {get;}","python":"Color.DarkOrchid: Color","summary":"Gets a system-defined color that has an ARGB value of #FF9932CC.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkOrchid);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkOrchid)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOrchid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkOrchid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkRed","kind":"property","name":"DarkRed","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkRed {get;}","python":"Color.DarkRed: Color","summary":"Gets a system-defined color that has an ARGB value of #FF8B0000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkRed);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkRed)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkRed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkRed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkSalmon","kind":"property","name":"DarkSalmon","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkSalmon {get;}","python":"Color.DarkSalmon: Color","summary":"Gets a system-defined color that has an ARGB value of #FFE9967A.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkSalmon);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkSalmon)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSalmon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSalmon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkSeaGreen","kind":"property","name":"DarkSeaGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkSeaGreen {get;}","python":"Color.DarkSeaGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF8FBC8F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkSeaGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkSeaGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSeaGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSeaGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkSlateBlue","kind":"property","name":"DarkSlateBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkSlateBlue {get;}","python":"Color.DarkSlateBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF483D8B.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkSlateBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkSlateBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSlateBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSlateBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkSlateGray","kind":"property","name":"DarkSlateGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkSlateGray {get;}","python":"Color.DarkSlateGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FF2F4F4F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkSlateGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkSlateGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSlateGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkSlateGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkTurquoise","kind":"property","name":"DarkTurquoise","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkTurquoise {get;}","python":"Color.DarkTurquoise: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00CED1.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkTurquoise);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkTurquoise)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkTurquoise/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkTurquoise/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DarkViolet","kind":"property","name":"DarkViolet","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DarkViolet {get;}","python":"Color.DarkViolet: Color","summary":"Gets a system-defined color that has an ARGB value of #FF9400D3.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DarkViolet);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DarkViolet)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkViolet/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DarkViolet/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DeepPink","kind":"property","name":"DeepPink","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DeepPink {get;}","python":"Color.DeepPink: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF1493.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DeepPink);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DeepPink)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DeepPink/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DeepPink/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DeepSkyBlue","kind":"property","name":"DeepSkyBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DeepSkyBlue {get;}","python":"Color.DeepSkyBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00BFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DeepSkyBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DeepSkyBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DeepSkyBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DeepSkyBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DimGray","kind":"property","name":"DimGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DimGray {get;}","python":"Color.DimGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FF696969.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DimGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DimGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DimGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DimGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.DodgerBlue","kind":"property","name":"DodgerBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color DodgerBlue {get;}","python":"Color.DodgerBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF1E90FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.DodgerBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.DodgerBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DodgerBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/DodgerBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Firebrick","kind":"property","name":"Firebrick","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Firebrick {get;}","python":"Color.Firebrick: Color","summary":"Gets a system-defined color that has an ARGB value of #FFB22222.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Firebrick);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Firebrick)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Firebrick/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Firebrick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.FloralWhite","kind":"property","name":"FloralWhite","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color FloralWhite {get;}","python":"Color.FloralWhite: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFAF0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.FloralWhite);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.FloralWhite)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FloralWhite/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/FloralWhite/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.ForestGreen","kind":"property","name":"ForestGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color ForestGreen {get;}","python":"Color.ForestGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF228B22.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.ForestGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.ForestGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ForestGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/ForestGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Fuchsia","kind":"property","name":"Fuchsia","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Fuchsia {get;}","python":"Color.Fuchsia: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF00FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Fuchsia);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Fuchsia)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Fuchsia/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Fuchsia/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.G","kind":"property","name":"G","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public byte G {get;}","python":"color.G: int","summary":"Gets the green component value of the color.","remarks":null,"parameters":[],"returns":{"csharpType":"byte","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.FromHex(\"#FF8000\");\nPrint(\"Green: {0}\", color.G);","python":"color = Color.FromHex(\"#FF8000\")\napi.Print(f\"Green: {color.G}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/G/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/G/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Gainsboro","kind":"property","name":"Gainsboro","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Gainsboro {get;}","python":"Color.Gainsboro: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDCDCDC.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Gainsboro);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Gainsboro)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gainsboro/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gainsboro/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.GhostWhite","kind":"property","name":"GhostWhite","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color GhostWhite {get;}","python":"Color.GhostWhite: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF8F8FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.GhostWhite);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.GhostWhite)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/GhostWhite/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/GhostWhite/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Gold","kind":"property","name":"Gold","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Gold {get;}","python":"Color.Gold: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFD700.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Gold);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Gold)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gold/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gold/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Goldenrod","kind":"property","name":"Goldenrod","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Goldenrod {get;}","python":"Color.Goldenrod: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDAA520.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Goldenrod);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Goldenrod)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Goldenrod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Goldenrod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Gray","kind":"property","name":"Gray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Gray {get;}","python":"Color.Gray: Color","summary":"Gets a system-defined color that has an ARGB value of #FF808080.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Gray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Gray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Gray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Green","kind":"property","name":"Green","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Green {get;}","python":"Color.Green: Color","summary":"Gets a system-defined color that has an ARGB value of #FF008000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Green);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Green)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Green/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Green/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.GreenYellow","kind":"property","name":"GreenYellow","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color GreenYellow {get;}","python":"Color.GreenYellow: Color","summary":"Gets a system-defined color that has an ARGB value of #FFADFF2F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.GreenYellow);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.GreenYellow)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/GreenYellow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/GreenYellow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Honeydew","kind":"property","name":"Honeydew","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Honeydew {get;}","python":"Color.Honeydew: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF0FFF0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Honeydew);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Honeydew)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Honeydew/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Honeydew/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.HotPink","kind":"property","name":"HotPink","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color HotPink {get;}","python":"Color.HotPink: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF69B4.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.HotPink);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.HotPink)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/HotPink/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/HotPink/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.IndianRed","kind":"property","name":"IndianRed","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color IndianRed {get;}","python":"Color.IndianRed: Color","summary":"Gets a system-defined color that has an ARGB value of #FFCD5C5C.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.IndianRed);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.IndianRed)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/IndianRed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/IndianRed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Indigo","kind":"property","name":"Indigo","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Indigo {get;}","python":"Color.Indigo: Color","summary":"Gets a system-defined color that has an ARGB value of #FF4B0082.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Indigo);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Indigo)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Indigo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Indigo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Ivory","kind":"property","name":"Ivory","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Ivory {get;}","python":"Color.Ivory: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFFF0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Ivory);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Ivory)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Ivory/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Ivory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Khaki","kind":"property","name":"Khaki","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Khaki {get;}","python":"Color.Khaki: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF0E68C.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Khaki);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Khaki)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Khaki/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Khaki/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Lavender","kind":"property","name":"Lavender","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Lavender {get;}","python":"Color.Lavender: Color","summary":"Gets a system-defined color that has an ARGB value of #FFE6E6FA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Lavender);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Lavender)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Lavender/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Lavender/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LavenderBlush","kind":"property","name":"LavenderBlush","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LavenderBlush {get;}","python":"Color.LavenderBlush: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFF0F5.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LavenderBlush);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LavenderBlush)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LavenderBlush/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LavenderBlush/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LawnGreen","kind":"property","name":"LawnGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LawnGreen {get;}","python":"Color.LawnGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF7CFC00.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LawnGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LawnGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LawnGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LawnGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LemonChiffon","kind":"property","name":"LemonChiffon","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LemonChiffon {get;}","python":"Color.LemonChiffon: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFACD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LemonChiffon);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LemonChiffon)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LemonChiffon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LemonChiffon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightBlue","kind":"property","name":"LightBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightBlue {get;}","python":"Color.LightBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FFADD8E6.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightCoral","kind":"property","name":"LightCoral","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightCoral {get;}","python":"Color.LightCoral: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF08080.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightCoral);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightCoral)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightCoral/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightCoral/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightCyan","kind":"property","name":"LightCyan","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightCyan {get;}","python":"Color.LightCyan: Color","summary":"Gets a system-defined color that has an ARGB value of #FFE0FFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightCyan);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightCyan)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightCyan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightCyan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightGoldenrodYellow","kind":"property","name":"LightGoldenrodYellow","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightGoldenrodYellow {get;}","python":"Color.LightGoldenrodYellow: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFAFAD2.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightGoldenrodYellow);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightGoldenrodYellow)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGoldenrodYellow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGoldenrodYellow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightGray","kind":"property","name":"LightGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightGray {get;}","python":"Color.LightGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FFD3D3D3.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightGreen","kind":"property","name":"LightGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightGreen {get;}","python":"Color.LightGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF90EE90.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightPink","kind":"property","name":"LightPink","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightPink {get;}","python":"Color.LightPink: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFB6C1.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightPink);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightPink)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightPink/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightPink/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightSalmon","kind":"property","name":"LightSalmon","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightSalmon {get;}","python":"Color.LightSalmon: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFA07A.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightSalmon);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightSalmon)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSalmon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSalmon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightSeaGreen","kind":"property","name":"LightSeaGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightSeaGreen {get;}","python":"Color.LightSeaGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF20B2AA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightSeaGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightSeaGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSeaGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSeaGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightSkyBlue","kind":"property","name":"LightSkyBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightSkyBlue {get;}","python":"Color.LightSkyBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF87CEFA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightSkyBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightSkyBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSkyBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSkyBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightSlateGray","kind":"property","name":"LightSlateGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightSlateGray {get;}","python":"Color.LightSlateGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FF778899.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightSlateGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightSlateGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSlateGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSlateGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightSteelBlue","kind":"property","name":"LightSteelBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightSteelBlue {get;}","python":"Color.LightSteelBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FFB0C4DE.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightSteelBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightSteelBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSteelBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightSteelBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LightYellow","kind":"property","name":"LightYellow","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LightYellow {get;}","python":"Color.LightYellow: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFFE0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LightYellow);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LightYellow)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightYellow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LightYellow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Lime","kind":"property","name":"Lime","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Lime {get;}","python":"Color.Lime: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00FF00.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Lime);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Lime)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Lime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Lime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.LimeGreen","kind":"property","name":"LimeGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color LimeGreen {get;}","python":"Color.LimeGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF32CD32.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.LimeGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.LimeGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LimeGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/LimeGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Linen","kind":"property","name":"Linen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Linen {get;}","python":"Color.Linen: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFAF0E6.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Linen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Linen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Linen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Linen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Magenta","kind":"property","name":"Magenta","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Magenta {get;}","python":"Color.Magenta: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF00FF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Magenta);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Magenta)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Magenta/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Magenta/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Maroon","kind":"property","name":"Maroon","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Maroon {get;}","python":"Color.Maroon: Color","summary":"Gets a system-defined color that has an ARGB value of #FF800000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Maroon);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Maroon)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Maroon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Maroon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumAquamarine","kind":"property","name":"MediumAquamarine","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumAquamarine {get;}","python":"Color.MediumAquamarine: Color","summary":"Gets a system-defined color that has an ARGB value of #FF66CDAA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumAquamarine);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumAquamarine)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumAquamarine/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumAquamarine/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumBlue","kind":"property","name":"MediumBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumBlue {get;}","python":"Color.MediumBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF0000CD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumOrchid","kind":"property","name":"MediumOrchid","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumOrchid {get;}","python":"Color.MediumOrchid: Color","summary":"Gets a system-defined color that has an ARGB value of #FFBA55D3.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumOrchid);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumOrchid)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumOrchid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumOrchid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumPurple","kind":"property","name":"MediumPurple","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumPurple {get;}","python":"Color.MediumPurple: Color","summary":"Gets a system-defined color that has an ARGB value of #FF9370DB.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumPurple);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumPurple)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumPurple/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumPurple/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumSeaGreen","kind":"property","name":"MediumSeaGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumSeaGreen {get;}","python":"Color.MediumSeaGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF3CB371.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumSeaGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumSeaGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSeaGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSeaGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumSlateBlue","kind":"property","name":"MediumSlateBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumSlateBlue {get;}","python":"Color.MediumSlateBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF7B68EE.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumSlateBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumSlateBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSlateBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSlateBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumSpringGreen","kind":"property","name":"MediumSpringGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumSpringGreen {get;}","python":"Color.MediumSpringGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00FA9A.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumSpringGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumSpringGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSpringGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumSpringGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumTurquoise","kind":"property","name":"MediumTurquoise","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumTurquoise {get;}","python":"Color.MediumTurquoise: Color","summary":"Gets a system-defined color that has an ARGB value of #FF48D1CC.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumTurquoise);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumTurquoise)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumTurquoise/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumTurquoise/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MediumVioletRed","kind":"property","name":"MediumVioletRed","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MediumVioletRed {get;}","python":"Color.MediumVioletRed: Color","summary":"Gets a system-defined color that has an ARGB value of #FFC71585","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MediumVioletRed);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MediumVioletRed)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumVioletRed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MediumVioletRed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MidnightBlue","kind":"property","name":"MidnightBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MidnightBlue {get;}","python":"Color.MidnightBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF191970.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MidnightBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MidnightBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MidnightBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MidnightBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MintCream","kind":"property","name":"MintCream","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MintCream {get;}","python":"Color.MintCream: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF5FFFA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MintCream);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MintCream)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MintCream/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MintCream/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.MistyRose","kind":"property","name":"MistyRose","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color MistyRose {get;}","python":"Color.MistyRose: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFE4E1.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.MistyRose);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.MistyRose)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MistyRose/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/MistyRose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Moccasin","kind":"property","name":"Moccasin","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Moccasin {get;}","python":"Color.Moccasin: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFE4B5.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Moccasin);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Moccasin)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Moccasin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Moccasin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.NavajoWhite","kind":"property","name":"NavajoWhite","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color NavajoWhite {get;}","python":"Color.NavajoWhite: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFDEAD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.NavajoWhite);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.NavajoWhite)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/NavajoWhite/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/NavajoWhite/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Navy","kind":"property","name":"Navy","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Navy {get;}","python":"Color.Navy: Color","summary":"Gets a system-defined color that has an ARGB value of #FF000080.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Navy);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Navy)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Navy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Navy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.OldLace","kind":"property","name":"OldLace","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color OldLace {get;}","python":"Color.OldLace: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFDF5E6.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.OldLace);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.OldLace)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OldLace/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OldLace/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Olive","kind":"property","name":"Olive","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Olive {get;}","python":"Color.Olive: Color","summary":"Gets a system-defined color that has an ARGB value of #FF808000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Olive);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Olive)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Olive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Olive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.OliveDrab","kind":"property","name":"OliveDrab","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color OliveDrab {get;}","python":"Color.OliveDrab: Color","summary":"Gets a system-defined color that has an ARGB value of #FF6B8E23.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.OliveDrab);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.OliveDrab)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OliveDrab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OliveDrab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Orange","kind":"property","name":"Orange","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Orange {get;}","python":"Color.Orange: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFA500.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Orange);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Orange)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Orange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Orange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.OrangeRed","kind":"property","name":"OrangeRed","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color OrangeRed {get;}","python":"Color.OrangeRed: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF4500.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.OrangeRed);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.OrangeRed)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OrangeRed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/OrangeRed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Orchid","kind":"property","name":"Orchid","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Orchid {get;}","python":"Color.Orchid: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDA70D6.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Orchid);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Orchid)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Orchid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Orchid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PaleGoldenrod","kind":"property","name":"PaleGoldenrod","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PaleGoldenrod {get;}","python":"Color.PaleGoldenrod: Color","summary":"Gets a system-defined color that has an ARGB value of #FFEEE8AA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PaleGoldenrod);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PaleGoldenrod)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleGoldenrod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleGoldenrod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PaleGreen","kind":"property","name":"PaleGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PaleGreen {get;}","python":"Color.PaleGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF98FB98.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PaleGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PaleGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PaleTurquoise","kind":"property","name":"PaleTurquoise","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PaleTurquoise {get;}","python":"Color.PaleTurquoise: Color","summary":"Gets a system-defined color that has an ARGB value of #FFAFEEEE.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PaleTurquoise);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PaleTurquoise)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleTurquoise/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleTurquoise/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PaleVioletRed","kind":"property","name":"PaleVioletRed","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PaleVioletRed {get;}","python":"Color.PaleVioletRed: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDB7093.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PaleVioletRed);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PaleVioletRed)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleVioletRed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PaleVioletRed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PapayaWhip","kind":"property","name":"PapayaWhip","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PapayaWhip {get;}","python":"Color.PapayaWhip: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFEFD5.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PapayaWhip);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PapayaWhip)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PapayaWhip/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PapayaWhip/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PeachPuff","kind":"property","name":"PeachPuff","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PeachPuff {get;}","python":"Color.PeachPuff: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFDAB9.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PeachPuff);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PeachPuff)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PeachPuff/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PeachPuff/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Peru","kind":"property","name":"Peru","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Peru {get;}","python":"Color.Peru: Color","summary":"Gets a system-defined color that has an ARGB value of #FFCD853F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Peru);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Peru)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Peru/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Peru/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Pink","kind":"property","name":"Pink","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Pink {get;}","python":"Color.Pink: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFC0CB.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Pink);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Pink)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Pink/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Pink/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Plum","kind":"property","name":"Plum","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Plum {get;}","python":"Color.Plum: Color","summary":"Gets a system-defined color that has an ARGB value of #FFDDA0DD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Plum);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Plum)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Plum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Plum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.PowderBlue","kind":"property","name":"PowderBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color PowderBlue {get;}","python":"Color.PowderBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FFB0E0E6.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.PowderBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.PowderBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PowderBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/PowderBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Purple","kind":"property","name":"Purple","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Purple {get;}","python":"Color.Purple: Color","summary":"Gets a system-defined color that has an ARGB value of #FF800080.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Purple);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Purple)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Purple/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Purple/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.R","kind":"property","name":"R","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public byte R {get;}","python":"color.R: int","summary":"Gets the red component value of the color.","remarks":null,"parameters":[],"returns":{"csharpType":"byte","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.FromHex(\"#FF8000\");\nPrint(\"Red: {0}\", color.R);","python":"color = Color.FromHex(\"#FF8000\")\napi.Print(f\"Red: {color.R}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/R/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/R/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Red","kind":"property","name":"Red","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Red {get;}","python":"Color.Red: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF0000.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Red);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Red)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Red/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Red/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.RosyBrown","kind":"property","name":"RosyBrown","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color RosyBrown {get;}","python":"Color.RosyBrown: Color","summary":"Gets a system-defined color that has an ARGB value of #FFBC8F8F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.RosyBrown);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.RosyBrown)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/RosyBrown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/RosyBrown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.RoyalBlue","kind":"property","name":"RoyalBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color RoyalBlue {get;}","python":"Color.RoyalBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF4169E1.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.RoyalBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.RoyalBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/RoyalBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/RoyalBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SaddleBrown","kind":"property","name":"SaddleBrown","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SaddleBrown {get;}","python":"Color.SaddleBrown: Color","summary":"Gets a system-defined color that has an ARGB value of #FF8B4513.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SaddleBrown);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SaddleBrown)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SaddleBrown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SaddleBrown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Salmon","kind":"property","name":"Salmon","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Salmon {get;}","python":"Color.Salmon: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFA8072.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Salmon);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Salmon)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Salmon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Salmon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SandyBrown","kind":"property","name":"SandyBrown","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SandyBrown {get;}","python":"Color.SandyBrown: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF4A460.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SandyBrown);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SandyBrown)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SandyBrown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SandyBrown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SeaGreen","kind":"property","name":"SeaGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SeaGreen {get;}","python":"Color.SeaGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF2E8B57.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SeaGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SeaGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SeaGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SeaGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SeaShell","kind":"property","name":"SeaShell","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SeaShell {get;}","python":"Color.SeaShell: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFF5EE.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SeaShell);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SeaShell)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SeaShell/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SeaShell/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Sienna","kind":"property","name":"Sienna","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Sienna {get;}","python":"Color.Sienna: Color","summary":"Gets a system-defined color that has an ARGB value of #FFA0522D.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Sienna);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Sienna)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Sienna/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Sienna/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Silver","kind":"property","name":"Silver","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Silver {get;}","python":"Color.Silver: Color","summary":"Gets a system-defined color that has an ARGB value of #FFC0C0C0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Silver);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Silver)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Silver/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Silver/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SkyBlue","kind":"property","name":"SkyBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SkyBlue {get;}","python":"Color.SkyBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF87CEEB.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SkyBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SkyBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SkyBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SkyBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SlateBlue","kind":"property","name":"SlateBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SlateBlue {get;}","python":"Color.SlateBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF6A5ACD.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SlateBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SlateBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SlateBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SlateBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SlateGray","kind":"property","name":"SlateGray","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SlateGray {get;}","python":"Color.SlateGray: Color","summary":"Gets a system-defined color that has an ARGB value of #FF708090.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SlateGray);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SlateGray)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SlateGray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SlateGray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Snow","kind":"property","name":"Snow","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Snow {get;}","python":"Color.Snow: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFAFA.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Snow);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Snow)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Snow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Snow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SpringGreen","kind":"property","name":"SpringGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SpringGreen {get;}","python":"Color.SpringGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF00FF7F.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SpringGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SpringGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SpringGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SpringGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.SteelBlue","kind":"property","name":"SteelBlue","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color SteelBlue {get;}","python":"Color.SteelBlue: Color","summary":"Gets a system-defined color that has an ARGB value of #FF4682B4.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.SteelBlue);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.SteelBlue)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SteelBlue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/SteelBlue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Tan","kind":"property","name":"Tan","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Tan {get;}","python":"Color.Tan: Color","summary":"Gets a system-defined color that has an ARGB value of #FFD2B48C.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Tan);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Tan)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Tan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Tan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Teal","kind":"property","name":"Teal","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Teal {get;}","python":"Color.Teal: Color","summary":"Gets a system-defined color that has an ARGB value of #FF008080.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Teal);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Teal)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Teal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Teal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Thistle","kind":"property","name":"Thistle","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Thistle {get;}","python":"Color.Thistle: Color","summary":"Gets a system-defined color that has an ARGB value of #FFD8BFD8.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Thistle);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Thistle)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Thistle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Thistle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Tomato","kind":"property","name":"Tomato","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Tomato {get;}","python":"Color.Tomato: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFF6347.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Tomato);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Tomato)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Tomato/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Tomato/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Transparent","kind":"property","name":"Transparent","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Transparent {get;}","python":"Color.Transparent: Color","summary":"Gets a system-defined color that has an ARGB value of #00FFFFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", BackgroundColor = Color.Transparent };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.BackgroundColor = Color.Transparent\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Transparent/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Transparent/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Turquoise","kind":"property","name":"Turquoise","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Turquoise {get;}","python":"Color.Turquoise: Color","summary":"Gets a system-defined color that has an ARGB value of #FF40E0D0.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Turquoise);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Turquoise)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Turquoise/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Turquoise/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Violet","kind":"property","name":"Violet","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Violet {get;}","python":"Color.Violet: Color","summary":"Gets a system-defined color that has an ARGB value of #FFEE82EE.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Violet);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Violet)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Violet/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Violet/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Wheat","kind":"property","name":"Wheat","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Wheat {get;}","python":"Color.Wheat: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF5DEB3.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Wheat);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Wheat)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Wheat/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Wheat/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.White","kind":"property","name":"White","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color White {get;}","python":"Color.White: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFFFF.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.White);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.White)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/White/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/White/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.WhiteSmoke","kind":"property","name":"WhiteSmoke","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color WhiteSmoke {get;}","python":"Color.WhiteSmoke: Color","summary":"Gets a system-defined color that has an ARGB value of #FFF5F5F5.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.WhiteSmoke);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.WhiteSmoke)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/WhiteSmoke/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/WhiteSmoke/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.Yellow","kind":"property","name":"Yellow","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Yellow {get;}","python":"Color.Yellow: Color","summary":"Gets a system-defined color that has an ARGB value of #FFFFFF00.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.Yellow);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.Yellow)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Yellow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Yellow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Color.YellowGreen","kind":"property","name":"YellowGreen","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color YellowGreen {get;}","python":"Color.YellowGreen: Color","summary":"Gets a system-defined color that has an ARGB value of #FF9ACD32.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Bars.ClosePrices.LastValue, Color.YellowGreen);\nPrint(\"Line color: {0}\", line.Color.ToHexString());","python":"line = api.Chart.DrawHorizontalLine(\"level\", api.Bars.ClosePrices.LastValue, Color.YellowGreen)\napi.Print(f\"Line color: {line.Color.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/YellowGreen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/YellowGreen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Color.Empty","kind":"field","name":"Empty","type":"T:cAlgo.API.Color","namespace":"cAlgo.API","group":"Utility","csharp":"public static Color Empty;","python":"Color.Empty: Color","summary":"Represents empty color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var color = Color.FromName(\"NotAColor\");\nPrint(\"Unknown color name returns Empty: {0}\", color == Color.Empty);","python":"color = Color.FromName(\"NotAColor\")\napi.Print(f\"Unknown color name returns Empty: {color == Color.Empty}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Empty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Color/Empty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ColorPicker","kind":"class","name":"ColorPicker","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class ColorPicker : ControlBase","python":"ColorPicker","summary":"Represents the ColorPicker control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       var colorPicker = new ColorPicker {SelectedColor = Color.FromHex(\"#eb4034\"), IsStretched = true};\n\n       var hexColorTextBox = new TextBox {Text = \"#eb4034\"};\n\n       colorPicker.SelectedColorChanged += args => hexColorTextBox.Text = colorPicker.SelectedColor.ToHexString();\n\n       var changeColorButton = new Button {Text = \"Change Color\"};\n\n       changeColorButton.Click += args => colorPicker.SelectedColor = Color.FromHex(hexColorTextBox.Text);\n\n       var panel = new StackPanel\n       {\n            Orientation = Orientation.Vertical,\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center\n       };\n\n       panel.AddChild(colorPicker);\n       panel.AddChild(hexColorTextBox);\n       panel.AddChild(changeColorButton);\n\n       Chart.AddControl(panel);\n   }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.colorPicker = ColorPicker()\n        self.colorPicker.SelectedColor = Color.FromHex(\"#eb4034\")\n        self.colorPicker.IsStretched = True\n\n        self.hexColorTextBox = TextBox()\n        self.hexColorTextBox.Text = \"#eb4034\"\n\n        self.colorPicker.SelectedColorChanged += self.on_selected_color_changed\n\n        changeColorButton = Button()\n        changeColorButton.Text = \"Change Color\"\n        changeColorButton.Click += self.on_change_color_button_clicked\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        panel.AddChild(self.colorPicker)\n        panel.AddChild(self.hexColorTextBox)\n        panel.AddChild(changeColorButton)\n\n        api.Chart.AddControl(panel)\n\n    def on_selected_color_changed(self, args):\n        self.hexColorTextBox.Text = args.ColorPicker.SelectedColor.ToHexString()\n\n    def on_change_color_button_clicked(self, args):\n        self.colorPicker.SelectedColor = Color.FromHex(self.hexColorTextBox.Text)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ColorPicker.#ctor","kind":"constructor","name":"ColorPicker","type":"T:cAlgo.API.ColorPicker","namespace":"cAlgo.API","group":"Controls","csharp":"public ColorPicker()","python":"ColorPicker()","summary":"Initializes a new instance of the ColorPicker class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var colorPicker = new ColorPicker { SelectedColor = Color.Red };\nChart.AddControl(colorPicker);","python":"colorPicker = ColorPicker()\ncolorPicker.SelectedColor = Color.Red\napi.Chart.AddControl(colorPicker)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ColorPicker.IsStretched","kind":"property","name":"IsStretched","type":"T:cAlgo.API.ColorPicker","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsStretched {get; set;}","python":"colorPicker.IsStretched: bool","summary":"Gets or sets if color picker is stretched or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var colorPicker = new ColorPicker { SelectedColor = Color.Blue, IsStretched = true, Width = 120 };\nChart.AddControl(colorPicker);","python":"colorPicker = ColorPicker()\ncolorPicker.SelectedColor = Color.Blue\ncolorPicker.IsStretched = True\ncolorPicker.Width = 120\napi.Chart.AddControl(colorPicker)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/IsStretched/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/IsStretched/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ColorPicker.SelectedColor","kind":"property","name":"SelectedColor","type":"T:cAlgo.API.ColorPicker","namespace":"cAlgo.API","group":"Controls","csharp":"public Color SelectedColor {get; set;}","python":"colorPicker.SelectedColor: Color","summary":"Gets or sets selected color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var colorPicker = new ColorPicker { SelectedColor = Color.FromHex(\"#2ECC71\") };\nChart.AddControl(colorPicker);\nPrint(\"Selected color: {0}\", colorPicker.SelectedColor.ToHexString());","python":"colorPicker = ColorPicker()\ncolorPicker.SelectedColor = Color.FromHex(\"#2ECC71\")\napi.Chart.AddControl(colorPicker)\napi.Print(f\"Selected color: {colorPicker.SelectedColor.ToHexString()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/SelectedColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/SelectedColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.ColorPicker.SelectedColorChanged","kind":"event","name":"SelectedColorChanged","type":"T:cAlgo.API.ColorPicker","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ColorPickerSelectedColorChangedEventArgs> SelectedColorChanged;","python":"colorPicker.SelectedColorChanged += handler  # handler(obj: ColorPickerSelectedColorChangedEventArgs)","summary":"Occurs when selected color is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ColorPickerSelectedColorChangedEventArgs>","pythonType":"Callable[[ColorPickerSelectedColorChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var line = Chart.DrawHorizontalLine(\"level\", Symbol.Bid, Color.Red);\nvar colorPicker = new ColorPicker { SelectedColor = Color.Red };\ncolorPicker.SelectedColorChanged += args =>\n{\n    line.Color = args.NewSelectedColor;\n    Print(\"Color changed from {0} to {1}\", args.PreviousSelectedColor, args.NewSelectedColor);\n};\nChart.AddControl(colorPicker);","python":"def on_start(self):\n    self.line = api.Chart.DrawHorizontalLine(\"level\", api.Symbol.Bid, Color.Red)\n    colorPicker = ColorPicker()\n    colorPicker.SelectedColor = Color.Red\n    colorPicker.SelectedColorChanged += self.on_selected_color_changed\n    api.Chart.AddControl(colorPicker)\n\ndef on_selected_color_changed(self, args):\n    self.line.Color = args.NewSelectedColor\n    api.Print(f\"Color changed from {args.PreviousSelectedColor} to {args.NewSelectedColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/SelectedColorChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ColorPicker/SelectedColorChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ColorPickerSelectedColorChangedEventArgs","kind":"class","name":"ColorPickerSelectedColorChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ColorPickerSelectedColorChangedEventArgs","python":"ColorPickerSelectedColorChangedEventArgs","summary":"Provides data for the ColorPicker SelectedColorChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var colorPicker = new ColorPicker { SelectedColor = Color.Red };\n    colorPicker.SelectedColorChanged += OnSelectedColorChanged;\n    Chart.AddControl(colorPicker);\n}\n\nprivate void OnSelectedColorChanged(ColorPickerSelectedColorChangedEventArgs args)\n{\n    Print(\"Color changed from {0} to {1}\", args.PreviousSelectedColor, args.NewSelectedColor);\n}","python":"def on_start(self):\n    colorPicker = ColorPicker()\n    colorPicker.SelectedColor = Color.Red\n    colorPicker.SelectedColorChanged += self.on_selected_color_changed\n    api.Chart.AddControl(colorPicker)\n\ndef on_selected_color_changed(self, args):\n    api.Print(f\"Color changed from {args.PreviousSelectedColor} to {args.NewSelectedColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."}]}
{"id":"P:cAlgo.API.ColorPickerSelectedColorChangedEventArgs.ColorPicker","kind":"property","name":"ColorPicker","type":"T:cAlgo.API.ColorPickerSelectedColorChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ColorPicker ColorPicker {get;}","python":"colorPickerSelectedColorChangedEventArgs.ColorPicker: ColorPicker","summary":"Gets the color picker control.","remarks":null,"parameters":[],"returns":{"csharpType":"ColorPicker","pythonType":"ColorPicker","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var colorPicker = new ColorPicker { SelectedColor = Color.Red };\n    colorPicker.SelectedColorChanged += OnSelectedColorChanged;\n    Chart.AddControl(colorPicker);\n}\n\nprivate void OnSelectedColorChanged(ColorPickerSelectedColorChangedEventArgs args)\n{\n    Print(\"Color picker now shows {0}\", args.ColorPicker.SelectedColor);\n}","python":"def on_start(self):\n    colorPicker = ColorPicker()\n    colorPicker.SelectedColor = Color.Red\n    colorPicker.SelectedColorChanged += self.on_selected_color_changed\n    api.Chart.AddControl(colorPicker)\n\ndef on_selected_color_changed(self, args):\n    api.Print(f\"Color picker now shows {args.ColorPicker.SelectedColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/ColorPicker/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/ColorPicker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."}]}
{"id":"P:cAlgo.API.ColorPickerSelectedColorChangedEventArgs.NewSelectedColor","kind":"property","name":"NewSelectedColor","type":"T:cAlgo.API.ColorPickerSelectedColorChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Color NewSelectedColor {get;}","python":"colorPickerSelectedColorChangedEventArgs.NewSelectedColor: Color","summary":"Gets the new selected color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var colorPicker = new ColorPicker { SelectedColor = Color.Red };\n    colorPicker.SelectedColorChanged += OnSelectedColorChanged;\n    Chart.AddControl(colorPicker);\n}\n\nprivate void OnSelectedColorChanged(ColorPickerSelectedColorChangedEventArgs args)\n{\n    Chart.DrawHorizontalLine(\"level\", Symbol.Bid, args.NewSelectedColor);\n}","python":"def on_start(self):\n    colorPicker = ColorPicker()\n    colorPicker.SelectedColor = Color.Red\n    colorPicker.SelectedColorChanged += self.on_selected_color_changed\n    api.Chart.AddControl(colorPicker)\n\ndef on_selected_color_changed(self, args):\n    api.Chart.DrawHorizontalLine(\"level\", api.Symbol.Bid, args.NewSelectedColor)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/NewSelectedColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/NewSelectedColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."}]}
{"id":"P:cAlgo.API.ColorPickerSelectedColorChangedEventArgs.PreviousSelectedColor","kind":"property","name":"PreviousSelectedColor","type":"T:cAlgo.API.ColorPickerSelectedColorChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Color PreviousSelectedColor {get;}","python":"colorPickerSelectedColorChangedEventArgs.PreviousSelectedColor: Color","summary":"Gets the previous selected color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var colorPicker = new ColorPicker { SelectedColor = Color.Red };\n    colorPicker.SelectedColorChanged += OnSelectedColorChanged;\n    Chart.AddControl(colorPicker);\n}\n\nprivate void OnSelectedColorChanged(ColorPickerSelectedColorChangedEventArgs args)\n{\n    Print(\"Previous color was {0}\", args.PreviousSelectedColor);\n}","python":"def on_start(self):\n    colorPicker = ColorPicker()\n    colorPicker.SelectedColor = Color.Red\n    colorPicker.SelectedColorChanged += self.on_selected_color_changed\n    api.Chart.AddControl(colorPicker)\n\ndef on_selected_color_changed(self, args):\n    api.Print(f\"Previous color was {args.PreviousSelectedColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/PreviousSelectedColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorPickerSelectedColorChangedEventArgs/PreviousSelectedColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ColorPicker.SelectedColorChanged)."}]}
{"id":"T:cAlgo.API.ColorTheme","kind":"enum","name":"ColorTheme","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public enum ColorTheme","python":"ColorTheme","summary":"Represents the color theme.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use ColorTheme Enum which is the color of platform theme on your indicators/cBots\n    public partial class ColorThemeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            ChangeChartBackgroundColorBasedOnTheme(Application.ColorTheme);\n\n            Application.ColorThemeChanged += Application_ColorThemeChanged;\n        }\n\n        private void Application_ColorThemeChanged(ColorThemeChangeEventArgs obj)\n        {\n            ChangeChartBackgroundColorBasedOnTheme(obj.ColorTheme);\n        }\n\n        private void ChangeChartBackgroundColorBasedOnTheme(ColorTheme colorTheme)\n        {\n            if (colorTheme == ColorTheme.Dark)\n            {\n                Chart.ColorSettings.BackgroundColor = Color.White;\n            }\n            else if (colorTheme == ColorTheme.Light)\n            {\n                Chart.ColorSettings.BackgroundColor = Color.Black;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.change_chart_background_color_based_on_theme(api.Application.ColorTheme)\n        api.Application.ColorThemeChanged += self.on_color_theme_changed\n\n    def change_chart_background_color_based_on_theme(self, colorTheme):\n        if colorTheme == ColorTheme.Dark:\n            api.Chart.ColorSettings.BackgroundColor = Color.White\n        elif colorTheme == ColorTheme.Light:\n            api.Chart.ColorSettings.BackgroundColor = Color.Black\n\n    def on_color_theme_changed(self, args):\n        self.change_chart_background_color_based_on_theme(args.ColorTheme)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ColorTheme.Dark","kind":"enum value","name":"Dark","type":"T:cAlgo.API.ColorTheme","namespace":"cAlgo.API","group":"Application","csharp":"ColorTheme.Dark;","python":"ColorTheme.Dark","summary":"The dark color theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ColorTheme","pythonType":"ColorTheme","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ColorTheme.Light","kind":"enum value","name":"Light","type":"T:cAlgo.API.ColorTheme","namespace":"cAlgo.API","group":"Application","csharp":"ColorTheme.Light;","python":"ColorTheme.Light","summary":"The light color theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ColorTheme","pythonType":"ColorTheme","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/ColorTheme/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ColorThemeChangeEventArgs","kind":"class","name":"ColorThemeChangeEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ColorThemeChangeEventArgs","python":"ColorThemeChangeEventArgs","summary":"Provides data for the color theme change event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the Chart ColorThemeChangeEventArgs\n    public partial class ColorThemeChangeEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Application.ColorThemeChanged += Application_ColorThemeChanged;\n        }\n\n        private void Application_ColorThemeChanged(ColorThemeChangeEventArgs obj)\n        {\n            var text = string.Format(\"Theme Changed To: {0}\", obj.ColorTheme);\n\n            Chart.DrawStaticText(\"text\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Application.ColorThemeChanged += self.on_application_color_theme_changed\n\n    def on_application_color_theme_changed(self, args):\n        api.Chart.DrawStaticText(\"text\", f\"Theme Changed To: {args.ColorTheme}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ColorThemeChangeEventArgs.ColorTheme","kind":"property","name":"ColorTheme","type":"T:cAlgo.API.ColorThemeChangeEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ColorTheme ColorTheme {get;}","python":"colorThemeChangeEventArgs.ColorTheme: ColorTheme","summary":"Gets the color theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ColorTheme","pythonType":"ColorTheme","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.ColorThemeChanged += OnColorThemeChanged;\n}\n\nprivate void OnColorThemeChanged(ColorThemeChangeEventArgs args)\n{\n    var textColor = args.ColorTheme == ColorTheme.Dark ? Color.White : Color.Black;\n    Chart.DrawStaticText(\"theme\", \"Theme: \" + args.ColorTheme, VerticalAlignment.Top, HorizontalAlignment.Right, textColor);\n}","python":"def on_start(self):\n    api.Application.ColorThemeChanged += self.on_color_theme_changed\n\ndef on_color_theme_changed(self, args):\n    text_color = Color.White if args.ColorTheme == ColorTheme.Dark else Color.Black\n    api.Chart.DrawStaticText(\"theme\", f\"Theme: {args.ColorTheme}\", VerticalAlignment.Top, HorizontalAlignment.Right, text_color)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/ColorTheme/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/ColorTheme/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ComboBox","kind":"class","name":"ComboBox","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class ComboBox : Control","python":"ComboBox","summary":"A control that shows drop down list of items and allows user to select a single item from the list","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        var comboBox = new ComboBox\n        {\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n            Width = 100\n        };\n\n        for (var i = 0; i < 10; i++)\n            comboBox.AddItem($\"Item {i}\");\n\n        comboBox.SelectedIndex = 0;\n        comboBox.SelectedItemChanged += args => Print($\"ComboBox selected item changed to: {args.SelectedItem}\");\n\n        Chart.AddControl(comboBox);\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        comboBox = ComboBox()\n        comboBox.HorizontalAlignment = HorizontalAlignment.Center\n        comboBox.VerticalAlignment = VerticalAlignment.Center\n        comboBox.Width = 100\n\n        for i in range(10):\n            comboBox.AddItem(f\"Item {i}\")\n\n        comboBox.SelectedIndex = 0\n        comboBox.SelectedItemChanged += lambda args: api.Print(f\"ComboBox selected item changed to: {args.SelectedItem}\")\n\n        api.Chart.AddControl(comboBox)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ComboBox.#ctor","kind":"constructor","name":"ComboBox","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public ComboBox()","python":"ComboBox()","summary":"Creates a new empty ComboBox with default ComboBox Style","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox { Width = 120 };\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n    comboBox.AddItem(symbolName);\ncomboBox.SelectedIndex = 0;\nChart.AddControl(comboBox);","python":"comboBox = ComboBox()\ncomboBox.Width = 120\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n    comboBox.AddItem(symbolName)\ncomboBox.SelectedIndex = 0\napi.Chart.AddControl(comboBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ComboBox.AddItem(System.String)","kind":"method","name":"AddItem","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public void AddItem(string item)","python":"comboBox.AddItem(item: str) -> None","summary":"Adds a new item to the ComboBox","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The string value that will be added on ComboBox"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox();\nforeach (var position in Positions)\n    comboBox.AddItem(position.Id.ToString());\nChart.AddControl(comboBox);","python":"comboBox = ComboBox()\nfor position in api.Positions:\n    comboBox.AddItem(str(position.Id))\napi.Chart.AddControl(comboBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/AddItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/AddItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ComboBox.RemoveItem(System.String)","kind":"method","name":"RemoveItem","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public void RemoveItem(string item)","python":"comboBox.RemoveItem(item: str) -> None","summary":"Removes an existing item from the ComboBox","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The string value that will be removed from ComboBox"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox();\ncomboBox.AddItem(\"EURUSD\");\ncomboBox.AddItem(\"XAUUSD\");\ncomboBox.RemoveItem(\"XAUUSD\");\nChart.AddControl(comboBox);","python":"comboBox = ComboBox()\ncomboBox.AddItem(\"EURUSD\")\ncomboBox.AddItem(\"XAUUSD\")\ncomboBox.RemoveItem(\"XAUUSD\")\napi.Chart.AddControl(comboBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/RemoveItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/RemoveItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ComboBox.SelectedIndex","kind":"property","name":"SelectedIndex","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public int SelectedIndex {get; set;}","python":"comboBox.SelectedIndex: int","summary":"Set / Get the ComboBox selected item index","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox();\ncomboBox.AddItem(\"Hour\");\ncomboBox.AddItem(\"Daily\");\ncomboBox.SelectedIndex = 1;\nChart.AddControl(comboBox);\nPrint(\"Selected index: {0}, item: {1}\", comboBox.SelectedIndex, comboBox.SelectedItem);","python":"comboBox = ComboBox()\ncomboBox.AddItem(\"Hour\")\ncomboBox.AddItem(\"Daily\")\ncomboBox.SelectedIndex = 1\napi.Chart.AddControl(comboBox)\napi.Print(f\"Selected index: {comboBox.SelectedIndex}, item: {comboBox.SelectedItem}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ComboBox.SelectedItem","kind":"property","name":"SelectedItem","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public string SelectedItem {get; set;}","python":"comboBox.SelectedItem: str","summary":"Set / Get the ComboBox selected item","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox();\ncomboBox.AddItem(\"Buy\");\ncomboBox.AddItem(\"Sell\");\ncomboBox.SelectedItem = \"Sell\";\nChart.AddControl(comboBox);\nvar tradeType = comboBox.SelectedItem == \"Buy\" ? TradeType.Buy : TradeType.Sell;\nPrint(\"Selected trade type: {0}\", tradeType);","python":"comboBox = ComboBox()\ncomboBox.AddItem(\"Buy\")\ncomboBox.AddItem(\"Sell\")\ncomboBox.SelectedItem = \"Sell\"\napi.Chart.AddControl(comboBox)\ntradeType = TradeType.Buy if comboBox.SelectedItem == \"Buy\" else TradeType.Sell\napi.Print(f\"Selected trade type: {tradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.ComboBox.SelectedItemChanged","kind":"event","name":"SelectedItemChanged","type":"T:cAlgo.API.ComboBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ComboBoxSelectedItemChangedEventArgs> SelectedItemChanged;","python":"comboBox.SelectedItemChanged += handler  # handler(obj: ComboBoxSelectedItemChangedEventArgs)","summary":"This event will trigger if the ComboBox selected item changed","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ComboBoxSelectedItemChangedEventArgs>","pythonType":"Callable[[ComboBoxSelectedItemChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var comboBox = new ComboBox();\ncomboBox.AddItem(\"EURUSD\");\ncomboBox.AddItem(\"GBPUSD\");\ncomboBox.SelectedItemChanged += args => Print(\"Selected symbol: {0}\", args.SelectedItem);\nChart.AddControl(comboBox);","python":"def on_start(self):\n    comboBox = ComboBox()\n    comboBox.AddItem(\"EURUSD\")\n    comboBox.AddItem(\"GBPUSD\")\n    comboBox.SelectedItemChanged += self.on_selected_item_changed\n    api.Chart.AddControl(comboBox)\n\ndef on_selected_item_changed(self, args):\n    api.Print(f\"Selected symbol: {args.SelectedItem}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedItemChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ComboBox/SelectedItemChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ComboBoxSelectedItemChangedEventArgs","kind":"class","name":"ComboBoxSelectedItemChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ComboBoxSelectedItemChangedEventArgs","python":"ComboBoxSelectedItemChangedEventArgs","summary":"Provides data for ComboBox SelectedItemChanged event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var comboBox = new ComboBox();\n    comboBox.AddItem(\"EURUSD\");\n    comboBox.AddItem(\"GBPUSD\");\n    comboBox.SelectedItemChanged += OnComboBoxSelectedItemChanged;\n    Chart.AddControl(comboBox);\n}\n\nprivate void OnComboBoxSelectedItemChanged(ComboBoxSelectedItemChangedEventArgs args)\n{\n    Print(\"Selected item: {0}, index: {1}\", args.SelectedItem, args.ComboBox.SelectedIndex);\n}","python":"def on_start(self):\n    comboBox = ComboBox()\n    comboBox.AddItem(\"EURUSD\")\n    comboBox.AddItem(\"GBPUSD\")\n    comboBox.SelectedItemChanged += self.on_combo_box_selected_item_changed\n    api.Chart.AddControl(comboBox)\n\ndef on_combo_box_selected_item_changed(self, args):\n    api.Print(f\"Selected item: {args.SelectedItem}, index: {args.ComboBox.SelectedIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ComboBox.SelectedItemChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ComboBox.SelectedItemChanged)."}]}
{"id":"P:cAlgo.API.ComboBoxSelectedItemChangedEventArgs.ComboBox","kind":"property","name":"ComboBox","type":"T:cAlgo.API.ComboBoxSelectedItemChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ComboBox ComboBox {get;}","python":"comboBoxSelectedItemChangedEventArgs.ComboBox: ComboBox","summary":"The ComboBox that it is selected item changed","remarks":null,"parameters":[],"returns":{"csharpType":"ComboBox","pythonType":"ComboBox","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var comboBox = new ComboBox();\n    comboBox.AddItem(\"Hour\");\n    comboBox.AddItem(\"Daily\");\n    comboBox.SelectedItemChanged += OnComboBoxSelectedItemChanged;\n    Chart.AddControl(comboBox);\n}\n\nprivate void OnComboBoxSelectedItemChanged(ComboBoxSelectedItemChangedEventArgs args)\n{\n    Print(\"Combo box selected index: {0}\", args.ComboBox.SelectedIndex);\n}","python":"def on_start(self):\n    comboBox = ComboBox()\n    comboBox.AddItem(\"Hour\")\n    comboBox.AddItem(\"Daily\")\n    comboBox.SelectedItemChanged += self.on_combo_box_selected_item_changed\n    api.Chart.AddControl(comboBox)\n\ndef on_combo_box_selected_item_changed(self, args):\n    api.Print(f\"Combo box selected index: {args.ComboBox.SelectedIndex}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/ComboBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/ComboBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ComboBox.SelectedItemChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ComboBox.SelectedItemChanged)."}]}
{"id":"P:cAlgo.API.ComboBoxSelectedItemChangedEventArgs.SelectedItem","kind":"property","name":"SelectedItem","type":"T:cAlgo.API.ComboBoxSelectedItemChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SelectedItem {get;}","python":"comboBoxSelectedItemChangedEventArgs.SelectedItem: str","summary":"The new selected item of ComboBox","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var comboBox = new ComboBox();\n    comboBox.AddItem(\"EURUSD\");\n    comboBox.AddItem(\"GBPUSD\");\n    comboBox.SelectedItemChanged += OnComboBoxSelectedItemChanged;\n    Chart.AddControl(comboBox);\n}\n\nprivate void OnComboBoxSelectedItemChanged(ComboBoxSelectedItemChangedEventArgs args)\n{\n    var symbol = Symbols.GetSymbol(args.SelectedItem);\n    Print(\"{0} bid: {1}\", args.SelectedItem, symbol.Bid);\n}","python":"def on_start(self):\n    comboBox = ComboBox()\n    comboBox.AddItem(\"EURUSD\")\n    comboBox.AddItem(\"GBPUSD\")\n    comboBox.SelectedItemChanged += self.on_combo_box_selected_item_changed\n    api.Chart.AddControl(comboBox)\n\ndef on_combo_box_selected_item_changed(self, args):\n    symbol = api.Symbols.GetSymbol(args.SelectedItem)\n    api.Print(f\"{args.SelectedItem} bid: {symbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/SelectedItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ComboBoxSelectedItemChangedEventArgs/SelectedItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ComboBox.SelectedItemChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ComboBox.SelectedItemChanged)."}]}
{"id":"T:cAlgo.API.Command","kind":"interface","name":"Command","type":null,"namespace":"cAlgo.API","group":"Commands","csharp":"public interface Command","python":"Command","summary":"Represents a plugin command.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command executed\"));\ncommand.ToolTip = \"My plugin command\";\ncommand.IsEnabled = Account.Balance > 0;\nPrint(\"Command {0} of type {1} added\", command.Id, command.Type);","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(\"Command executed\")))\ncommand.ToolTip = \"My plugin command\"\ncommand.IsEnabled = api.Account.Balance > 0\napi.Print(f\"Command {command.Id} of type {command.Type} added\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Command.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Command","namespace":"cAlgo.API","group":"Commands","csharp":"Guid Id {get;}","python":"command.Id: Guid","summary":"Gets command unique Id.","remarks":null,"parameters":[],"returns":{"csharpType":"Guid","pythonType":"Guid","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var command in Commands)\n    Print(\"Command ID: {0}\", command.Id);","python":"for command in api.Commands:\n    api.Print(f\"Command ID: {command.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Command.IsEnabled","kind":"property","name":"IsEnabled","type":"T:cAlgo.API.Command","namespace":"cAlgo.API","group":"Commands","csharp":"bool IsEnabled {get; set;}","python":"command.IsEnabled: bool","summary":"Gets / sets if command is enabled or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var command in Commands)\n    command.IsEnabled = false;","python":"for command in api.Commands:\n    command.IsEnabled = False"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/IsEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/IsEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Command.ToolTip","kind":"property","name":"ToolTip","type":"T:cAlgo.API.Command","namespace":"cAlgo.API","group":"Commands","csharp":"string ToolTip {get; set;}","python":"command.ToolTip: str","summary":"Gets / sets command tooltips.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command executed\"));\ncommand.ToolTip = \"Show account summary\";\nPrint(\"Command tooltip: {0}\", command.ToolTip);","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(\"Command executed\")))\ncommand.ToolTip = \"Show account summary\"\napi.Print(f\"Command tooltip: {command.ToolTip}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/ToolTip/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/ToolTip/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Command.Type","kind":"property","name":"Type","type":"T:cAlgo.API.Command","namespace":"cAlgo.API","group":"Commands","csharp":"CommandType Type {get;}","python":"command.Type: CommandType","summary":"Gets command type.","remarks":null,"parameters":[],"returns":{"csharpType":"CommandType","pythonType":"CommandType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var command in Commands)\n    Print(\"Command {0} type: {1}\", command.Id, command.Type);","python":"for command in api.Commands:\n    api.Print(f\"Command {command.Id} type: {command.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Command/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CommandArgs","kind":"class","name":"CommandArgs","type":null,"namespace":"cAlgo.API","group":"Commands","csharp":"public class CommandArgs","python":"CommandArgs","summary":"Represents a plugin command callback arguments.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted);\n}\n\nprivate void OnCommandExecuted(CommandArgs args)\n{\n    Print(\"Command {0} executed, context: {1}\", args.Command.Id, args.Context);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](self.on_command_executed))\n\ndef on_command_executed(self, args):\n    api.Print(f\"Command {args.Command.Id} executed, context: {args.Context}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CommandArgs.Command","kind":"property","name":"Command","type":"T:cAlgo.API.CommandArgs","namespace":"cAlgo.API","group":"Commands","csharp":"public Command Command {get;}","python":"commandArgs.Command: Command","summary":"Gets the command associated with these arguments.","remarks":null,"parameters":[],"returns":{"csharpType":"Command","pythonType":"Command","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted);\n}\n\nprivate void OnCommandExecuted(CommandArgs args)\n{\n    args.Command.IsEnabled = false;\n    Print(\"Command {0} disabled after first use\", args.Command.Id);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](self.on_command_executed))\n\ndef on_command_executed(self, args):\n    args.Command.IsEnabled = False\n    api.Print(f\"Command {args.Command.Id} disabled after first use\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/Command/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/Command/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CommandArgs.Context","kind":"property","name":"Context","type":"T:cAlgo.API.CommandArgs","namespace":"cAlgo.API","group":"Commands","csharp":"public object Context {get;}","python":"commandArgs.Context: object","summary":"Gets the context in which the command is executed.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted);\n}\n\nprivate void OnCommandExecuted(CommandArgs args)\n{\n    if (args.Context is ChartContainer chartContainer)\n        Print(\"Executed from chart container {0}\", chartContainer.Id);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](self.on_command_executed))\n\ndef on_command_executed(self, args):\n    api.Print(f\"Command context: {args.Context}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/Context/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandArgs/Context/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CommandResult","kind":"class","name":"CommandResult","type":null,"namespace":"cAlgo.API","group":"Commands","csharp":"public class CommandResult","python":"CommandResult","summary":"Represents the result of a command execution.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted);\n}\n\nprivate CommandResult OnCommandExecuted(CommandArgs args)\n{\n    var panel = new StackPanel();\n    panel.AddChild(new TextBlock { Text = $\"Open positions: {Positions.Count}\" });\n    return new CommandResult(panel);\n}","python":"from System import Func\n\ndef on_start(self):\n    api.Commands.Add(CommandType.ChartContainerToolbar, Func[CommandArgs, CommandResult](self.on_command_executed))\n\ndef on_command_executed(self, args):\n    textBlock = TextBlock()\n    textBlock.Text = f\"Open positions: {api.Positions.Count}\"\n    panel = StackPanel()\n    panel.AddChild(textBlock)\n    return CommandResult(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CommandResult.#ctor(cAlgo.API.ControlBase)","kind":"constructor","name":"CommandResult","type":"T:cAlgo.API.CommandResult","namespace":"cAlgo.API","group":"Commands","csharp":"public CommandResult(ControlBase child)","python":"CommandResult(child: ControlBase)","summary":"Initialises a new instance of the CommandResult class.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The child control associated with the command result."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Command completed\" };\nvar commandResult = new CommandResult(textBlock);\nPrint(\"Result has content: {0}\", commandResult.Child != null);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Command completed\"\ncommandResult = CommandResult(textBlock)\napi.Print(f\"Result has content: {commandResult.Child is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CommandResult.Child","kind":"property","name":"Child","type":"T:cAlgo.API.CommandResult","namespace":"cAlgo.API","group":"Commands","csharp":"public ControlBase Child {get;}","python":"commandResult.Child: ControlBase","summary":"Gets the child control associated with the command result.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var commandResult = new CommandResult(new TextBlock { Text = \"Done\" });\nif (commandResult.Child is TextBlock textBlock)\n    Print(\"Result text: {0}\", textBlock.Text);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Done\"\ncommandResult = CommandResult(textBlock)\napi.Print(f\"Result content: {commandResult.Child}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandResult/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CommandType","kind":"enum","name":"CommandType","type":null,"namespace":"cAlgo.API","group":"Commands","csharp":"public enum CommandType","python":"CommandType","summary":"Represents the predefined types of plugin commands.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Toolbar command executed\"));\nPrint(\"Command type: {0}\", command.Type);","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(\"Toolbar command executed\")))\napi.Print(f\"Command type: {command.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.CommandType.ChartContainerToolbar","kind":"enum value","name":"ChartContainerToolbar","type":"T:cAlgo.API.CommandType","namespace":"cAlgo.API","group":"Commands","csharp":"CommandType.ChartContainerToolbar;","python":"CommandType.ChartContainerToolbar","summary":"A command for chart group container toolbar.","remarks":null,"parameters":[],"returns":{"csharpType":"CommandType","pythonType":"CommandType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/CommandType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Commands","kind":"interface","name":"Commands","type":null,"namespace":"cAlgo.API","group":"Commands","csharp":"public interface Commands","python":"Commands","summary":"Represents the collection of plugin commands.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    private const string CommandSvgIcon = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\";\n\n    protected override void OnStart()\n    {\n        var addCommandWithResultButton = new Button {Text = \"Add Command with Result\"};\n\n        addCommandWithResultButton.Click += args =>\n        {\n            Commands.Add(CommandType.ChartContainerToolbar, OnCommandWithResultExecuted, new SvgIcon(CommandSvgIcon));\n        };\n\n        var addCommandThatShowWindowButton = new Button {Text = \"Add Command That Show Window\"};\n\n        addCommandThatShowWindowButton.Click += args =>\n        {\n            Commands.Add(CommandType.ChartContainerToolbar, OnShowWindowCommandExecuted);\n        };\n\n        var disableAllCommandsButton = new Button {Text = \"Disable All Commands\"};\n\n        disableAllCommandsButton.Click += args =>\n        {\n            foreach (var command in Commands)\n            {\n                command.IsEnabled = false;\n            }\n        };\n\n        var enableAllCommandsButton = new Button {Text = \"Enable All Commands\"};\n\n        enableAllCommandsButton.Click += args =>\n        {\n            foreach (var command in Commands)\n            {\n                command.IsEnabled = true;\n            }\n        };\n\n        var removeAllCommandsButton = new Button {Text = \"Remove All Commands\"};\n\n        removeAllCommandsButton.Click += args =>\n        {\n            foreach (var command in Commands)\n            {\n                Commands.Remove(command.Id);\n            }\n        };\n\n        var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n        panel.AddChild(addCommandWithResultButton);\n        panel.AddChild(addCommandThatShowWindowButton);\n        panel.AddChild(disableAllCommandsButton);\n        panel.AddChild(enableAllCommandsButton);\n        panel.AddChild(removeAllCommandsButton);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"Commands Manager\");\n\n        aspBlock.Child = panel;\n    }\n\n    private CommandResult OnCommandWithResultExecuted(CommandArgs commandArgs)\n    {\n        Print($\"Command {commandArgs.Command.Id} Executed\");\n\n        var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n        var firstNameTextBox = new TextBox {Text = \"First Name\"};\n        var lastNameTextBox = new TextBox {Text = \"Last Name\"};\n\n        var submitButton = new Button {Text = \"Submit\"};\n\n        submitButton.Click += args => Print(\"Form submitted\");\n\n        panel.AddChild(firstNameTextBox);\n        panel.AddChild(lastNameTextBox);\n        panel.AddChild(submitButton);\n\n        return new CommandResult(panel);\n    }\n\n    private void OnShowWindowCommandExecuted(CommandArgs commandArgs)\n    {\n        Print($\"Command {commandArgs.Command.Id} Executed\");\n\n        var webView = new WebView();\n\n        webView.NavigateAsync(\"https://ctrader.com/\");\n\n        var window = new Window();\n\n        window.Child = webView;\n\n        window.Show();\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, Func\n\nclass Test():\n    CommandSvgIcon = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" shape-rendering=\\\"geometricPrecision\\\" text-rendering=\\\"geometricPrecision\\\" image-rendering=\\\"optimizeQuality\\\" fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" viewBox=\\\"0 0 512 475.957\\\"><path fill-rule=\\\"nonzero\\\" d=\\\"M57.705 238.569V281H21.216C9.5 281 0 271.5 0 259.786c0-11.717 9.5-21.217 21.216-21.217h36.489zM244.873 0h103.279c12.371 0 23.607 5.058 31.744 13.195 8.143 8.143 13.198 19.388 13.198 31.748s-5.062 23.602-13.203 31.743c-8.14 8.14-19.383 13.203-31.739 13.203H244.873c-12.359 0-23.605-5.056-31.747-13.199-8.137-8.137-13.195-19.373-13.195-31.744 0-12.315 5.051-23.538 13.192-31.703l.081-.08C221.366 5.038 232.578 0 244.873 0zM390.17 418.092l16.693 38.83a13.188 13.188 0 011.322 5.776c0 7.321-5.937 13.259-13.259 13.259H198.667v-.053c-1.479 0-2.982-.249-4.454-.776-6.864-2.459-10.436-10.021-7.977-16.884l14.386-40.152H163.42c-12.047 0-23.006-4.936-30.956-12.882l-.051-.051c-7.946-7.949-12.882-18.909-12.882-30.956v-13.741H79.938c-6.111 0-11.679-2.5-15.703-6.525-4.017-4.016-6.522-9.573-6.522-15.7V181.332c0-6.123 2.496-11.684 6.518-15.706 4.023-4.023 9.583-6.519 15.707-6.519h39.593v-13.741c0-12.047 4.936-23.006 12.882-30.956l.051-.051c7.95-7.946 18.909-12.882 30.956-12.882h240.492c29.737 0 56.762 12.156 76.346 31.741C499.843 152.802 512 179.828 512 209.565v107.642c0 27.758-11.346 52.982-29.625 71.26-18.279 18.279-43.504 29.625-71.26 29.625H390.17z\\\"/><path fill=\\\"#2A6F80\\\" d=\\\"M375.75 418.093l-161.334.652-15.75 43.952h196.261z\\\"/><path fill=\\\"#6BAEC0\\\" d=\\\"M79.938 172.366h39.592v174.838H79.938c-4.908 0-8.967-4.034-8.967-8.966V181.332c0-4.933 4.034-8.966 8.967-8.966z\\\"/><path fill=\\\"#B2EEFD\\\" d=\\\"M163.42 114.736h233.097v290.041l.001.056H163.42c-16.846 0-30.63-13.782-30.63-30.63V145.366c0-16.847 13.784-30.63 30.63-30.63zm35.713 228.48a9.508 9.508 0 010-19.016h143.743c5.25 0 9.508 4.258 9.508 9.508 0 5.251-4.258 9.508-9.508 9.508H199.133zm0-144.96a9.508 9.508 0 010-19.015h143.743c5.25 0 9.508 4.257 9.508 9.507 0 5.251-4.258 9.508-9.508 9.508H199.133zm0 72.481a9.508 9.508 0 010-19.016h143.743c5.25 0 9.508 4.257 9.508 9.508 0 5.25-4.258 9.508-9.508 9.508H199.133zm212.174-155.712c48.735 3.805 87.434 44.871 87.434 94.54v107.642c0 48.132-39.328 87.519-87.436 87.623l.002-.053V115.025z\\\"/><path fill=\\\"#F5DAA8\\\" d=\\\"M244.873 13.267h103.279c17.423 0 31.676 14.285 31.676 31.676v.003c0 17.391-14.284 31.675-31.676 31.675H244.873c-17.391 0-31.675-14.253-31.675-31.675v-.003c0-17.423 14.253-31.676 31.675-31.676z\\\"/></svg>\"\n\n    def on_start(self):\n        addCommandWithResultButton = Button()\n        addCommandWithResultButton.Text = \"Add Command with Result\"\n        addCommandWithResultButton.Click += lambda _: api.Commands.Add(CommandType.ChartContainerToolbar, Func[CommandArgs, CommandResult](self.on_command_with_result_executed), SvgIcon(self.CommandSvgIcon))\n\n        addCommandThatShowWindowButton = Button()\n        addCommandThatShowWindowButton.Text = \"Add Command That Show Window\"\n        addCommandThatShowWindowButton.Click += lambda _: api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](self.on_show_window_command_executed))\n\n        disableAllCommandsButton = Button()\n        disableAllCommandsButton.Text = \"Disable All Commands\"\n        disableAllCommandsButton.Click += self.on_disable_all_commands_button_click\n\n        enableAllCommandsButton = Button()\n        enableAllCommandsButton.Text = \"Enable All Commands\"\n        enableAllCommandsButton.Click += self.on_enable_all_commands_button_click\n\n        removeAllCommandsButton = Button()\n        removeAllCommandsButton.Text = \"Remove All Commands\"\n        removeAllCommandsButton.Click += self.on_remove_all_commands_button_click\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        panel.AddChild(addCommandWithResultButton)\n        panel.AddChild(addCommandThatShowWindowButton)\n        panel.AddChild(disableAllCommandsButton)\n        panel.AddChild(enableAllCommandsButton)\n        panel.AddChild(removeAllCommandsButton)\n\n        aspBlock = api.Asp.SymbolTab.AddBlock(\"Commands Manager\")\n        aspBlock.Child = panel\n\n    def on_command_with_result_executed(self, args):\n        print(f\"Command {args.Command.Id} Executed\")\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        firstNameTextBox = TextBox()\n        firstNameTextBox.Text = \"First Name\"\n\n        lastNameTextBox = TextBox()\n        lastNameTextBox.Text = \"Last Name\"\n\n        submitButton = Button()\n        submitButton.Text = \"Submit\"\n        submitButton.Click += lambda _: print(\"Form submitted\")\n\n        panel.AddChild(firstNameTextBox)\n        panel.AddChild(lastNameTextBox)\n        panel.AddChild(submitButton)\n\n        return CommandResult(panel)\n\n    def on_show_window_command_executed(self, args):\n        print(f\"Command {args.Command.Id} Executed\")\n        webView = WebView()\n        webView.NavigateAsync(\"https://ctrader.com/\")\n        window = Window()\n        window.Child = webView\n        window.Show()\n\n    def on_disable_all_commands_button_click(self, args):\n        for command in api.Commands:\n            command.IsEnabled = False\n\n    def on_enable_all_commands_button_click(self, args):\n        for command in api.Commands:\n            command.IsEnabled = True\n\n    def on_remove_all_commands_button_click(self, args):\n        for command in api.Commands:\n            api.Commands.Remove(command.Id)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.Add(cAlgo.API.CommandType,System.Action{cAlgo.API.CommandArgs})","kind":"method","name":"Add","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command Add(CommandType type, Action<CommandArgs> callback)","python":"api.Commands.Add(type: CommandType, callback: Callable[[CommandArgs], None]) -> Command","summary":"Adds a new command with a callback.","remarks":null,"parameters":[{"name":"type","csharpType":"CommandType","pythonType":"CommandType","summary":"Command Type"},{"name":"callback","csharpType":"Action<CommandArgs>","pythonType":"Callable[[CommandArgs], None]","summary":"Command callback action without result."}],"returns":{"csharpType":"Command","pythonType":"Command","summary":"Command","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command {0} executed\", args.Command.Id));\ncommand.ToolTip = \"Print a message\";","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(f\"Command {args.Command.Id} executed\")))\ncommand.ToolTip = \"Print a message\""}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.Add(cAlgo.API.CommandType,System.Action{cAlgo.API.CommandArgs},cAlgo.API.SvgIcon)","kind":"method","name":"Add","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command Add(CommandType type, Action<CommandArgs> callback, SvgIcon icon)","python":"api.Commands.Add(type: CommandType, callback: Callable[[CommandArgs], None], icon: SvgIcon) -> Command","summary":"Adds a new command with a callback.","remarks":null,"parameters":[{"name":"type","csharpType":"CommandType","pythonType":"CommandType","summary":"Command Type"},{"name":"callback","csharpType":"Action<CommandArgs>","pythonType":"Callable[[CommandArgs], None]","summary":"Command callback action without result."},{"name":"icon","csharpType":"SvgIcon","pythonType":"SvgIcon","summary":"Command Icon"}],"returns":{"csharpType":"Command","pythonType":"Command","summary":"Command","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command {0} executed\", args.Command.Id), icon);\ncommand.ToolTip = \"Print a message\";","python":"from System import Action\nicon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(f\"Command {args.Command.Id} executed\")), icon)\ncommand.ToolTip = \"Print a message\""}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.Add(cAlgo.API.CommandType,System.Func{cAlgo.API.CommandArgs,cAlgo.API.CommandResult})","kind":"method","name":"Add","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command Add(CommandType type, Func<CommandArgs, CommandResult> callback)","python":"api.Commands.Add(type: CommandType, callback: Callable[[CommandArgs], CommandResult]) -> Command","summary":"Adds a new command with a callback.","remarks":null,"parameters":[{"name":"type","csharpType":"CommandType","pythonType":"CommandType","summary":"Command Type"},{"name":"callback","csharpType":"Func<CommandArgs, CommandResult>","pythonType":"Callable[[CommandArgs], CommandResult]","summary":"Command callback that returns command result."}],"returns":{"csharpType":"Command","pythonType":"Command","summary":"Command","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted);\n}\n\nprivate CommandResult OnCommandExecuted(CommandArgs args)\n{\n    var panel = new StackPanel();\n    panel.AddChild(new TextBlock { Text = $\"Balance: {Account.Balance}\" });\n    return new CommandResult(panel);\n}","python":"from System import Func\n\ndef on_start(self):\n    api.Commands.Add(CommandType.ChartContainerToolbar, Func[CommandArgs, CommandResult](self.on_command_executed))\n\ndef on_command_executed(self, args):\n    textBlock = TextBlock()\n    textBlock.Text = f\"Balance: {api.Account.Balance}\"\n    panel = StackPanel()\n    panel.AddChild(textBlock)\n    return CommandResult(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.Add(cAlgo.API.CommandType,System.Func{cAlgo.API.CommandArgs,cAlgo.API.CommandResult},cAlgo.API.SvgIcon)","kind":"method","name":"Add","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command Add(CommandType type, Func<CommandArgs, CommandResult> callback, SvgIcon icon)","python":"api.Commands.Add(type: CommandType, callback: Callable[[CommandArgs], CommandResult], icon: SvgIcon) -> Command","summary":"Adds a new command with a callback and icon.","remarks":null,"parameters":[{"name":"type","csharpType":"CommandType","pythonType":"CommandType","summary":"Command Type"},{"name":"callback","csharpType":"Func<CommandArgs, CommandResult>","pythonType":"Callable[[CommandArgs], CommandResult]","summary":"Command callback that returns command result."},{"name":"icon","csharpType":"SvgIcon","pythonType":"SvgIcon","summary":"Command Icon"}],"returns":{"csharpType":"Command","pythonType":"Command","summary":"Command","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\n    Commands.Add(CommandType.ChartContainerToolbar, OnCommandExecuted, icon);\n}\n\nprivate CommandResult OnCommandExecuted(CommandArgs args)\n{\n    return new CommandResult(new TextBlock { Text = $\"Equity: {Account.Equity}\" });\n}","python":"from System import Func\n\ndef on_start(self):\n    icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\n    api.Commands.Add(CommandType.ChartContainerToolbar, Func[CommandArgs, CommandResult](self.on_command_executed), icon)\n\ndef on_command_executed(self, args):\n    textBlock = TextBlock()\n    textBlock.Text = f\"Equity: {api.Account.Equity}\"\n    return CommandResult(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.GetById(System.Guid)","kind":"method","name":"GetById","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command GetById(Guid id)","python":"api.Commands.GetById(id: Guid) -> Command | None","summary":"Returns a command by Id.","remarks":null,"parameters":[{"name":"id","csharpType":"Guid","pythonType":"Guid","summary":"Command Id"}],"returns":{"csharpType":"Command","pythonType":"Command","summary":"Matching command or null","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command executed\"));\nvar foundCommand = Commands.GetById(command.Id);\nif (foundCommand != null)\n    Print(\"Found command {0}\", foundCommand.Id);","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(\"Command executed\")))\nfoundCommand = api.Commands.GetById(command.Id)\nif foundCommand is not None:\n    api.Print(f\"Found command {foundCommand.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/GetById/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/GetById/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.GetByType(cAlgo.API.CommandType)","kind":"method","name":"GetByType","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"Command[] GetByType(CommandType type)","python":"api.Commands.GetByType(type: CommandType) -> list[Command]","summary":"Returns all commands based on type.","remarks":null,"parameters":[{"name":"type","csharpType":"CommandType","pythonType":"CommandType","summary":"Command Type"}],"returns":{"csharpType":"Command[]","pythonType":"list[Command]","summary":"An array of matching commands","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toolbarCommands = Commands.GetByType(CommandType.ChartContainerToolbar);\nforeach (var command in toolbarCommands)\n    Print(\"Toolbar command {0}, enabled: {1}\", command.Id, command.IsEnabled);","python":"toolbarCommands = api.Commands.GetByType(CommandType.ChartContainerToolbar)\nfor command in toolbarCommands:\n    api.Print(f\"Toolbar command {command.Id}, enabled: {command.IsEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/GetByType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/GetByType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Commands.Remove(System.Guid)","kind":"method","name":"Remove","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"bool Remove(Guid id)","python":"api.Commands.Remove(id: Guid) -> bool","summary":"Removes a command by Id.","remarks":null,"parameters":[{"name":"id","csharpType":"Guid","pythonType":"Guid","summary":"Command Id"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if command removed otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command executed\"));\nPrint(\"Command removed: {0}\", Commands.Remove(command.Id));","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(\"Command executed\")))\napi.Print(f\"Command removed: {api.Commands.Remove(command.Id)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Commands.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Commands","namespace":"cAlgo.API","group":"Commands","csharp":"int Count {get;}","python":"api.Commands.Count: int","summary":"Returns number of all commands.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Plugin commands: {0}\", Commands.Count);","python":"api.Print(f\"Plugin commands: {api.Commands.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Commands/Commands/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Indicators.CommodityChannelIndex","kind":"interface","name":"CommodityChannelIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface CommodityChannelIndex","python":"CommodityChannelIndex","summary":"The Commodity Channel Index interface.","remarks":"The Commodity Channel Index is used to determine overbought and oversold conditions relating to a symbol. The Commodity Channel Index can be used to forecast changes in price direction.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    public partial class CommodityChannelIndexReferenceExample:Indicator\n    {\n        private CommodityChannelIndex _commodityChannelIndex;\n\n        protected override void Initialize()\n        {\n            _commodityChannelIndex = Indicators.CommodityChannelIndex(Periods);\n        }\n        public override void Calculate(int index)\n        {\n            // Display Result of Indicator\n            Result[index] = _commodityChannelIndex.Result[index];\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.commodityChannelIndex = api.Indicators.CommodityChannelIndex(api.Periods)\n\n    def calculate(self, index):\n        api.Result[index] = self.commodityChannelIndex.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Commodity Channel Index indicator\n    public partial class CommodityChannelIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private CommodityChannelIndex _commodityChannelIndex;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _commodityChannelIndex = Indicators.CommodityChannelIndex(14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_commodityChannelIndex.Result.Last(1) > 100 && _commodityChannelIndex.Result.Last(2) <= 100)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_commodityChannelIndex.Result.Last(1) < -100 && _commodityChannelIndex.Result.Last(2) >= -100)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass CommodityChannelIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.commodityChannelIndex = api.Indicators.CommodityChannelIndex(14)\n\n    def on_bar_closed(self):\n        if self.commodityChannelIndex.Result.Last(0) > 100 and self.commodityChannelIndex.Result.Last(1) <= 100:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif self.commodityChannelIndex.Result.Last(0) < -100 and self.commodityChannelIndex.Result.Last(1) >= -100:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CommodityChannelIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CommodityChannelIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.CommodityChannelIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.CommodityChannelIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"commodityChannelIndex.Result: IndicatorDataSeries","summary":"Commodity Channel Index Result Series.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"The Output Series of CommodityChannelIndex.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private CommodityChannelIndex _commodityChannelIndex;\n\nprotected override void OnStart()\n{\n    _commodityChannelIndex = Indicators.CommodityChannelIndex(14);\n}\n\nprotected override void OnBar()\n{\n    Print(\"The Current Commodity Channel Index is: {0}\", _commodityChannelIndex.Result.Last(1));\n}","python":"def on_start(self):\n    self.commodityChannelIndex = api.Indicators.CommodityChannelIndex(14)\n\ndef on_bar(self):\n    api.Print(f\"The Current Commodity Channel Index is: {self.commodityChannelIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CommodityChannelIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CommodityChannelIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CompilationOperation","kind":"class","name":"CompilationOperation","type":null,"namespace":"cAlgo.API","group":"Compilation","csharp":"public class CompilationOperation","python":"CompilationOperation","summary":"Provides access to the properties describing an asynchronous algo compilation operation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = Compiler.CompileAsync(@\"Sample cBot\\Sample cBot.csproj\", result => Print(\"Compilation succeeded: {0}\", result.Succeeded));\nif (operation.IsExecuting)\n    Print(\"Compilation is running\");","python":"operation = api.Compiler.CompileAsync(r\"Sample cBot\\Sample cBot.csproj\", lambda result: api.Print(f\"Compilation succeeded: {result.Succeeded}\"))\nif operation.IsExecuting:\n    api.Print(\"Compilation is running\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationOperation.IsExecuting","kind":"property","name":"IsExecuting","type":"T:cAlgo.API.CompilationOperation","namespace":"cAlgo.API","group":"Compilation","csharp":"public bool IsExecuting {get;}","python":"compilationOperation.IsExecuting: bool","summary":"True if compilation operation is being executed, false if it completed.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = Compiler.CompileAsync(@\"Sample cBot\\Sample cBot.csproj\", result => Print(\"Compilation finished\"));\nPrint(\"Compilation is running: {0}\", operation.IsExecuting);","python":"operation = api.Compiler.CompileAsync(r\"Sample cBot\\Sample cBot.csproj\", lambda result: api.Print(\"Compilation finished\"))\napi.Print(f\"Compilation is running: {operation.IsExecuting}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/IsExecuting/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/IsExecuting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationOperation.Result","kind":"property","name":"Result","type":"T:cAlgo.API.CompilationOperation","namespace":"cAlgo.API","group":"Compilation","csharp":"public CompilationResult Result {get;}","python":"compilationOperation.Result: CompilationResult","summary":"The result of compilation operation.","remarks":null,"parameters":[],"returns":{"csharpType":"CompilationResult","pythonType":"CompilationResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = Compiler.CompileAsync(@\"Sample cBot\\Sample cBot.csproj\", result => Print(\"Compilation finished\"));\nif (!operation.IsExecuting && operation.Result != null)\n    Print(\"Compilation succeeded: {0}\", operation.Result.Succeeded);","python":"operation = api.Compiler.CompileAsync(r\"Sample cBot\\Sample cBot.csproj\", lambda result: api.Print(\"Compilation finished\"))\nif not operation.IsExecuting and operation.Result is not None:\n    api.Print(f\"Compilation succeeded: {operation.Result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOperation/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CompilationOptions","kind":"class","name":"CompilationOptions","type":null,"namespace":"cAlgo.API","group":"Compilation","csharp":"public class CompilationOptions","python":"CompilationOptions","summary":"Compilation options container.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions { IncludeSourceCode = true, OutputAlgoFilePath = @\"C:\\Algos\\Sample cBot.algo\" };\nvar result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\", options);\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);","python":"options = CompilationOptions()\noptions.IncludeSourceCode = True\noptions.OutputAlgoFilePath = r\"C:\\Algos\\Sample cBot.algo\"\nresult = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\", options)\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.CompilationOptions.#ctor","kind":"constructor","name":"CompilationOptions","type":"T:cAlgo.API.CompilationOptions","namespace":"cAlgo.API","group":"Compilation","csharp":"public CompilationOptions()","python":"CompilationOptions()","summary":"Creates compilation options.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions();\nvar result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\", options);\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);","python":"options = CompilationOptions()\nresult = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\", options)\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationOptions.IncludeSourceCode","kind":"property","name":"IncludeSourceCode","type":"T:cAlgo.API.CompilationOptions","namespace":"cAlgo.API","group":"Compilation","csharp":"public bool IncludeSourceCode {get; set;}","python":"compilationOptions.IncludeSourceCode: bool","summary":"Gets / Inits inclusion of source code in output algo file (Default is False).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions { IncludeSourceCode = true };\nvar result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\", options);\nPrint(\"Compiled with source code: {0}\", result.Succeeded);","python":"options = CompilationOptions()\noptions.IncludeSourceCode = True\nresult = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\", options)\napi.Print(f\"Compiled with source code: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/IncludeSourceCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/IncludeSourceCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationOptions.OutputAlgoFilePath","kind":"property","name":"OutputAlgoFilePath","type":"T:cAlgo.API.CompilationOptions","namespace":"cAlgo.API","group":"Compilation","csharp":"public string OutputAlgoFilePath {get; set;}","python":"compilationOptions.OutputAlgoFilePath: str","summary":"Gets / Inits output algo file path, if not provided default platform algo path will be used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions { OutputAlgoFilePath = @\"C:\\Algos\\Sample cBot.algo\" };\nvar result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\", options);\nif (result.Succeeded)\n    Print(\"Algo file saved to {0}\", options.OutputAlgoFilePath);","python":"options = CompilationOptions()\noptions.OutputAlgoFilePath = r\"C:\\Algos\\Sample cBot.algo\"\nresult = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\", options)\nif result.Succeeded:\n    api.Print(f\"Algo file saved to {options.OutputAlgoFilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/OutputAlgoFilePath/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/OutputAlgoFilePath/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CompilationResult","kind":"class","name":"CompilationResult","type":null,"namespace":"cAlgo.API","group":"Compilation","csharp":"public class CompilationResult","python":"CompilationResult","summary":"The result of an algo compilation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\");\nif (!result.Succeeded)\n{\n    foreach (var error in result.Errors)\n        Print(\"Compilation error: {0}\", error);\n}","python":"result = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\")\nif not result.Succeeded:\n    for error in result.Errors:\n        api.Print(f\"Compilation error: {error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationResult.Errors","kind":"property","name":"Errors","type":"T:cAlgo.API.CompilationResult","namespace":"cAlgo.API","group":"Compilation","csharp":"public IReadonlyList<string> Errors {get;}","python":"compilationResult.Errors: IReadonlyList[str]","summary":"Gets compilation errors if Succeeded was False, otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<string>","pythonType":"IReadonlyList[str]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\");\nif (!result.Succeeded)\n    Print(\"{0} compilation errors, first: {1}\", result.Errors.Count, result.Errors[0]);","python":"result = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\")\nif not result.Succeeded:\n    api.Print(f\"{result.Errors.Count} compilation errors, first: {result.Errors[0]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/Errors/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/Errors/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CompilationResult.Succeeded","kind":"property","name":"Succeeded","type":"T:cAlgo.API.CompilationResult","namespace":"cAlgo.API","group":"Compilation","csharp":"public bool Succeeded {get;}","python":"compilationResult.Succeeded: bool","summary":"Gets the result of compilation, True if succeeded otherwise False.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\");\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);","python":"result = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\")\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/Succeeded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationResult/Succeeded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Compiler","kind":"interface","name":"Compiler","type":null,"namespace":"cAlgo.API","group":"Compilation","csharp":"public interface Compiler","python":"Compiler","summary":"Provides access to compiler for algos.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       // Path is relative to Algo type data directory\n       var result = Compiler.Compile(@\"Test\\Test\\Test.csproj\");\n\n       if (result.Succeeded)\n            Print(\"Compilation finished successfully\");\n       else\n            Print($\"Compilation failed with errors: {string.Join(\", \", result.Errors)}\");\n   }\n}","python":"# Path is relative to Algo type data directory\nresult = api.Compiler.Compile(r\"Test\\Test\\Test.csproj\")\nif result.Succeeded:\n    api.Print(\"Compilation finished successfully\")\nelse:\n    errors = \", \".join(result.Errors)\n    api.Print(f\"Compilation failed with errors: {errors}\")","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       // Path is relative to Algo type data directory\n       var operation = Compiler.CompileAsync(@\"Test\\Test\\Test.csproj\", result =>\n       {\n            if (result.Succeeded)\n                Print(\"Compilation finished successfully\");\n            else\n                Print($\"Compilation failed with errors: {string.Join(\", \", result.Errors)}\");\n       });\n\n       if (operation.IsExecuting)\n            Print(\"Compilation is running\");\n   }\n}","python":"def on_start(self):\n    # Path is relative to Algo type data directory\n    operation = api.Compiler.CompileAsync(r\"Test\\Test\\Test.csproj\", self.on_compilation_finished)\n    if operation.IsExecuting:\n        api.Print(\"Compilation is running\")\n\ndef on_compilation_finished(self, result):\n    if result.Succeeded:\n        api.Print(\"Compilation finished successfully\")\n    else:\n        errors = \", \".join(result.Errors)\n        api.Print(f\"Compilation failed with errors: {errors}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is compiled. Compile returns a failed result with no errors; CompileAsync calls back asynchronously with that failed result."}]}
{"id":"M:cAlgo.API.Compiler.Compile(System.String)","kind":"method","name":"Compile","type":"T:cAlgo.API.Compiler","namespace":"cAlgo.API","group":"Compilation","csharp":"CompilationResult Compile(string csprojFilePath)","python":"api.Compiler.Compile(csprojFilePath: str) -> CompilationResult","summary":"Compiles an algo.","remarks":null,"parameters":[{"name":"csprojFilePath","csharpType":"string","pythonType":"str","summary":"Algo project file path."}],"returns":{"csharpType":"CompilationResult","pythonType":"CompilationResult","summary":"CompilationResult","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\");\nif (result.Succeeded)\n    Print(\"Compilation succeeded\");\nelse\n    Print(\"Compilation failed: {0}\", string.Join(\", \", result.Errors));","python":"result = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\")\nif result.Succeeded:\n    api.Print(\"Compilation succeeded\")\nelse:\n    errors = \", \".join(result.Errors)\n    api.Print(f\"Compilation failed: {errors}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/Compile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/Compile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is compiled. Compile returns a failed result with no errors; CompileAsync calls back asynchronously with that failed result."}]}
{"id":"M:cAlgo.API.Compiler.Compile(System.String,cAlgo.API.CompilationOptions)","kind":"method","name":"Compile","type":"T:cAlgo.API.Compiler","namespace":"cAlgo.API","group":"Compilation","csharp":"CompilationResult Compile(string csprojFilePath, CompilationOptions options)","python":"api.Compiler.Compile(csprojFilePath: str, options: CompilationOptions) -> CompilationResult","summary":"Compiles an algo.","remarks":null,"parameters":[{"name":"csprojFilePath","csharpType":"string","pythonType":"str","summary":"Algo project file path."},{"name":"options","csharpType":"CompilationOptions","pythonType":"CompilationOptions","summary":"Compilation options."}],"returns":{"csharpType":"CompilationResult","pythonType":"CompilationResult","summary":"CompilationResult","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions { IncludeSourceCode = true, OutputAlgoFilePath = @\"C:\\Algos\\Sample cBot.algo\" };\nvar result = Compiler.Compile(@\"Sample cBot\\Sample cBot.csproj\", options);\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);","python":"options = CompilationOptions()\noptions.IncludeSourceCode = True\noptions.OutputAlgoFilePath = r\"C:\\Algos\\Sample cBot.algo\"\nresult = api.Compiler.Compile(r\"Sample cBot\\Sample cBot.csproj\", options)\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/Compile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/Compile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is compiled. Compile returns a failed result with no errors; CompileAsync calls back asynchronously with that failed result."}]}
{"id":"M:cAlgo.API.Compiler.CompileAsync(System.String,System.Action{cAlgo.API.CompilationResult})","kind":"method","name":"CompileAsync","type":"T:cAlgo.API.Compiler","namespace":"cAlgo.API","group":"Compilation","csharp":"CompilationOperation CompileAsync(string csprojFilePath, Action<CompilationResult> callback)","python":"api.Compiler.CompileAsync(csprojFilePath: str, callback: Callable[[CompilationResult], None]) -> CompilationOperation","summary":"Compiles an algo asynchronously and calls the passed callback when compilation finishes.","remarks":null,"parameters":[{"name":"csprojFilePath","csharpType":"string","pythonType":"str","summary":"Algo project file path."},{"name":"callback","csharpType":"Action<CompilationResult>","pythonType":"Callable[[CompilationResult], None]","summary":"Callback that will be called after compilation finished."}],"returns":{"csharpType":"CompilationOperation","pythonType":"CompilationOperation","summary":"CompilationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = Compiler.CompileAsync(@\"Sample cBot\\Sample cBot.csproj\", result => Print(\"Compilation succeeded: {0}\", result.Succeeded));\nPrint(\"Compilation is running: {0}\", operation.IsExecuting);","python":"operation = api.Compiler.CompileAsync(r\"Sample cBot\\Sample cBot.csproj\", lambda result: api.Print(f\"Compilation succeeded: {result.Succeeded}\"))\napi.Print(f\"Compilation is running: {operation.IsExecuting}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/CompileAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/CompileAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is compiled. Compile returns a failed result with no errors; CompileAsync calls back asynchronously with that failed result."}]}
{"id":"M:cAlgo.API.Compiler.CompileAsync(System.String,System.Action{cAlgo.API.CompilationResult},cAlgo.API.CompilationOptions)","kind":"method","name":"CompileAsync","type":"T:cAlgo.API.Compiler","namespace":"cAlgo.API","group":"Compilation","csharp":"CompilationOperation CompileAsync(string csprojFilePath, Action<CompilationResult> callback, CompilationOptions options)","python":"api.Compiler.CompileAsync(csprojFilePath: str, callback: Callable[[CompilationResult], None], options: CompilationOptions) -> CompilationOperation","summary":"Compiles an algo asynchronously and calls the passed callback when compilation finishes.","remarks":null,"parameters":[{"name":"csprojFilePath","csharpType":"string","pythonType":"str","summary":"Algo project file path."},{"name":"callback","csharpType":"Action<CompilationResult>","pythonType":"Callable[[CompilationResult], None]","summary":"Callback that will be called after compilation finished."},{"name":"options","csharpType":"CompilationOptions","pythonType":"CompilationOptions","summary":"Compilation options."}],"returns":{"csharpType":"CompilationOperation","pythonType":"CompilationOperation","summary":"CompilationOperation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var options = new CompilationOptions { IncludeSourceCode = true };\nCompiler.CompileAsync(@\"Sample cBot\\Sample cBot.csproj\", result => Print(\"Compilation succeeded: {0}\", result.Succeeded), options);","python":"options = CompilationOptions()\noptions.IncludeSourceCode = True\napi.Compiler.CompileAsync(r\"Sample cBot\\Sample cBot.csproj\", lambda result: api.Print(f\"Compilation succeeded: {result.Succeeded}\"), options)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/CompileAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Compilation/Compiler/CompileAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Nothing is compiled. Compile returns a failed result with no errors; CompileAsync calls back asynchronously with that failed result."}]}
{"id":"T:cAlgo.API.Control","kind":"class","name":"Control","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public abstract class Control : ControlBase","python":"Control","summary":"Represents the Chart Control class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var controls = new Control[] { new TextBlock { Text = \"Volume\" }, new TextBox { Text = \"0.01\" }, new Button { Text = \"Buy\" } };\nvar panel = new StackPanel { Orientation = Orientation.Horizontal };\nforeach (var control in controls)\n{\n    control.FontSize = 13;\n    control.FontFamily = \"Segoe UI\";\n    control.Margin = 3;\n    panel.AddChild(control);\n}\nChart.AddControl(panel);","python":"label = TextBlock()\nlabel.Text = \"Volume\"\nbutton = Button()\nbutton.Text = \"Buy\"\npanel = StackPanel()\npanel.Orientation = Orientation.Horizontal\nfor control in [label, button]:\n    control.FontSize = 13\n    control.FontFamily = \"Segoe UI\"\n    panel.AddChild(control)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BackgroundColor {get; set;}","python":"control.BackgroundColor: Color","summary":"Gets or sets the color of the chart control background.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyButton = new Button { Text = \"Buy\", BackgroundColor = Color.DarkGreen, ForegroundColor = Color.White };\nChart.AddControl(buyButton);","python":"buyButton = Button()\nbuyButton.Text = \"Buy\"\nbuyButton.BackgroundColor = Color.DarkGreen\nbuyButton.ForegroundColor = Color.White\napi.Chart.AddControl(buyButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.FontFamily","kind":"property","name":"FontFamily","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public string FontFamily {get; set;}","python":"control.FontFamily: str","summary":"Gets or sets the font family.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = Symbol.Bid.ToString(), FontFamily = \"Consolas\", FontSize = 16 };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = str(api.Symbol.Bid)\ntextBlock.FontFamily = \"Consolas\"\ntextBlock.FontSize = 16\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontFamily/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontFamily/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.FontSize","kind":"property","name":"FontSize","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public double FontSize {get; set;}","python":"control.FontSize: float","summary":"Gets or sets the font size.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = SymbolName, FontSize = 24 };\nChart.AddControl(textBlock);\nPrint(\"Font size: {0}\", textBlock.FontSize);","python":"textBlock = TextBlock()\ntextBlock.Text = api.SymbolName\ntextBlock.FontSize = 24\napi.Chart.AddControl(textBlock)\napi.Print(f\"Font size: {textBlock.FontSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.FontStyle","kind":"property","name":"FontStyle","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public FontStyle FontStyle {get; set;}","python":"control.FontStyle: FontStyle","summary":"Gets or sets the font style.","remarks":null,"parameters":[],"returns":{"csharpType":"FontStyle","pythonType":"FontStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Backtesting mode\", FontStyle = FontStyle.Italic };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Backtesting mode\"\ntextBlock.FontStyle = FontStyle.Italic\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.FontWeight","kind":"property","name":"FontWeight","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public FontWeight FontWeight {get; set;}","python":"control.FontWeight: FontWeight","summary":"Gets or sets the font weight.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Stop loss hit\", FontWeight = FontWeight.Bold, ForegroundColor = Color.Red };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Stop loss hit\"\ntextBlock.FontWeight = FontWeight.Bold\ntextBlock.ForegroundColor = Color.Red\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.ForegroundColor","kind":"property","name":"ForegroundColor","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public Color ForegroundColor {get; set;}","python":"control.ForegroundColor: Color","summary":"Gets or sets the color of the chart control foreground. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var profit = Positions.Sum(position => position.NetProfit);\nvar textBlock = new TextBlock { Text = \"Net profit: \" + profit.ToString(\"F2\") };\ntextBlock.ForegroundColor = profit >= 0 ? Color.LimeGreen : Color.Red;\nChart.AddControl(textBlock);","python":"profit = sum(position.NetProfit for position in api.Positions)\ntextBlock = TextBlock()\ntextBlock.Text = f\"Net profit: {profit:.2f}\"\ntextBlock.ForegroundColor = Color.LimeGreen if profit >= 0 else Color.Red\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/ForegroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/ForegroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.HorizontalContentAlignment","kind":"property","name":"HorizontalContentAlignment","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public HorizontalAlignment HorizontalContentAlignment {get; set;}","python":"control.HorizontalContentAlignment: HorizontalAlignment","summary":"Gets or sets the horizontal content alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Sell\", Width = 150, HorizontalContentAlignment = HorizontalAlignment.Left };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Sell\"\nbutton.Width = 150\nbutton.HorizontalContentAlignment = HorizontalAlignment.Left\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/HorizontalContentAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/HorizontalContentAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.Padding","kind":"property","name":"Padding","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness Padding {get; set;}","python":"control.Padding: Thickness","summary":"Gets or sets the chart control padding. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Close all positions\", Padding = new Thickness(20, 8, 20, 8) };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Close all positions\"\nbutton.Padding = Thickness(20, 8, 20, 8)\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/Padding/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/Padding/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Control.VerticalContentAlignment","kind":"property","name":"VerticalContentAlignment","type":"T:cAlgo.API.Control","namespace":"cAlgo.API","group":"Controls","csharp":"public VerticalAlignment VerticalContentAlignment {get; set;}","python":"control.VerticalContentAlignment: VerticalAlignment","summary":"Gets or sets the vertical content alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", Height = 60, VerticalContentAlignment = VerticalAlignment.Bottom };\nChart.AddControl(button);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.Height = 60\nbutton.VerticalContentAlignment = VerticalAlignment.Bottom\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/VerticalContentAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Control/VerticalContentAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ControlBase","kind":"class","name":"ControlBase","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public abstract class ControlBase","python":"ControlBase","summary":"Represents the base of chart controls.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Spread monitor\", Margin = 10, Opacity = 0.8 };\ntextBlock.HorizontalAlignment = HorizontalAlignment.Right;\ntextBlock.VerticalAlignment = VerticalAlignment.Top;\nChart.AddControl(textBlock);\nPrint(\"Control {0} added\", textBlock.UniqueId);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Spread monitor\"\ntextBlock.Margin = Thickness(10)\ntextBlock.Opacity = 0.8\ntextBlock.HorizontalAlignment = HorizontalAlignment.Right\ntextBlock.VerticalAlignment = VerticalAlignment.Top\napi.Chart.AddControl(textBlock)\napi.Print(f\"Control {textBlock.UniqueId} added\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ControlBase.ResetProperty(cAlgo.API.ControlProperty)","kind":"method","name":"ResetProperty","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public void ResetProperty(ControlProperty property)","python":"controlBase.ResetProperty(property: ControlProperty) -> None","summary":"Sets the property to the default value and removes its privelege over the style.","remarks":null,"parameters":[{"name":"property","csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"Control Property"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.ForegroundColor, Color.Gray);\nvar textBlock = new TextBlock { Text = \"Spread\", Style = style, ForegroundColor = Color.Red };\ntextBlock.ResetProperty(ControlProperty.ForegroundColor);\nChart.AddControl(textBlock);","python":"style = Style()\nstyle.Set(ControlProperty.ForegroundColor, Color.Gray)\ntextBlock = TextBlock()\ntextBlock.Text = \"Spread\"\ntextBlock.Style = style\ntextBlock.ForegroundColor = Color.Red\ntextBlock.ResetProperty(ControlProperty.ForegroundColor)\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/ResetProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/ResetProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Bottom","kind":"property","name":"Bottom","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Bottom {get; set;}","python":"controlBase.Bottom: float","summary":"Gets or sets the position of the chart control to the bottom of the chart area. Works only when the control is inside the Canvas panel.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The bottom.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas();\nvar textBlock = new TextBlock { Text = \"Equity\", Left = 20, Bottom = 40 };\ncanvas.AddChild(textBlock);\nChart.AddControl(canvas);\nPrint(\"Bottom: {0}\", textBlock.Bottom);","python":"canvas = Canvas()\ntextBlock = TextBlock()\ntextBlock.Text = \"Equity\"\ntextBlock.Left = 20\ntextBlock.Bottom = 40\ncanvas.AddChild(textBlock)\napi.Chart.AddControl(canvas)\napi.Print(f\"Bottom: {textBlock.Bottom}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Bottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Bottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Dock","kind":"property","name":"Dock","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public Dock Dock {get; set;}","python":"controlBase.Dock: Dock","summary":"Specifies the dock position of the chart control instance. Works only inside the DockPanel.","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dockPanel = new DockPanel { Width = 250, Height = 120 };\ndockPanel.AddChild(new TextBlock { Text = \"Header\", Dock = Dock.Top });\ndockPanel.AddChild(new Button { Text = \"OK\", Dock = Dock.Bottom });\nChart.AddControl(dockPanel);","python":"dockPanel = DockPanel()\ndockPanel.Width = 250\ndockPanel.Height = 120\nheader = TextBlock()\nheader.Text = \"Header\"\nheader.Dock = Dock.Top\nbutton = Button()\nbutton.Text = \"OK\"\nbutton.Dock = Dock.Bottom\ndockPanel.AddChild(header)\ndockPanel.AddChild(button)\napi.Chart.AddControl(dockPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Height","kind":"property","name":"Height","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Height {get; set;}","python":"controlBase.Height: float","summary":"Gets or sets the hight of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The height.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BackgroundColor = Color.DarkSlateGray, Width = 200, Height = 80 };\nChart.AddControl(border);\nPrint(\"Height: {0}\", border.Height);","python":"border = Border()\nborder.BackgroundColor = Color.DarkSlateGray\nborder.Width = 200\nborder.Height = 80\napi.Chart.AddControl(border)\napi.Print(f\"Height: {border.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.HorizontalAlignment","kind":"property","name":"HorizontalAlignment","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public HorizontalAlignment HorizontalAlignment {get; set;}","python":"controlBase.HorizontalAlignment: HorizontalAlignment","summary":"Gets or sets the horizontal alignment of the chart control instance.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Top };\nChart.AddControl(button);\nPrint(\"Horizontal alignment: {0}\", button.HorizontalAlignment);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.HorizontalAlignment = HorizontalAlignment.Center\nbutton.VerticalAlignment = VerticalAlignment.Top\napi.Chart.AddControl(button)\napi.Print(f\"Horizontal alignment: {button.HorizontalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.IsEnabled","kind":"property","name":"IsEnabled","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsEnabled {get; set;}","python":"controlBase.IsEnabled: bool","summary":"Gets or sets the value indicating whether this instance of the chart control is enabled.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\" };\nbutton.IsEnabled = Positions.Count == 0;\nChart.AddControl(button);\nPrint(\"Buy button enabled: {0}\", button.IsEnabled);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.IsEnabled = api.Positions.Count == 0\napi.Chart.AddControl(button)\napi.Print(f\"Buy button enabled: {button.IsEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.IsHitTestVisible","kind":"property","name":"IsHitTestVisible","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsHitTestVisible {get; set;}","python":"controlBase.IsHitTestVisible: bool","summary":"Gets or sets a value that declares if the chart control instance is visible for the mouse hit testing. If set to false, then the control will not handle any mouse events.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var watermark = new TextBlock { Text = \"Demo account\", FontSize = 40, Opacity = 0.2, IsHitTestVisible = false };\nwatermark.HorizontalAlignment = HorizontalAlignment.Center;\nwatermark.VerticalAlignment = VerticalAlignment.Center;\nChart.AddControl(watermark);","python":"watermark = TextBlock()\nwatermark.Text = \"Demo account\"\nwatermark.FontSize = 40\nwatermark.Opacity = 0.2\nwatermark.IsHitTestVisible = False\nwatermark.HorizontalAlignment = HorizontalAlignment.Center\nwatermark.VerticalAlignment = VerticalAlignment.Center\napi.Chart.AddControl(watermark)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsHitTestVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsHitTestVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsVisible {get; set;}","python":"controlBase.IsVisible: bool","summary":"Gets or sets the value indicating whether this instance of the chart control instance is visible.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"No open positions\" };\ntextBlock.IsVisible = Positions.Count == 0;\nChart.AddControl(textBlock);\nPrint(\"Visible: {0}\", textBlock.IsVisible);","python":"textBlock = TextBlock()\ntextBlock.Text = \"No open positions\"\ntextBlock.IsVisible = api.Positions.Count == 0\napi.Chart.AddControl(textBlock)\napi.Print(f\"Visible: {textBlock.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Left","kind":"property","name":"Left","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Left {get; set;}","python":"controlBase.Left: float","summary":"Gets or sets the position of the chart control to the left side of the chart area. Works only when the control is inside the Canvas panel.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The left.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas();\nvar textBlock = new TextBlock { Text = \"EURUSD\", Left = 20, Top = 30 };\ncanvas.AddChild(textBlock);\nChart.AddControl(canvas);\nPrint(\"Left: {0}\", textBlock.Left);","python":"canvas = Canvas()\ntextBlock = TextBlock()\ntextBlock.Text = \"EURUSD\"\ntextBlock.Left = 20\ntextBlock.Top = 30\ncanvas.AddChild(textBlock)\napi.Chart.AddControl(canvas)\napi.Print(f\"Left: {textBlock.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Left/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Left/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Margin","kind":"property","name":"Margin","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness Margin {get; set;}","python":"controlBase.Margin: Thickness","summary":"Gets or sets the level of thickness of the margin of the chart control instance. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\npanel.AddChild(new Button { Text = \"Buy\", Margin = new Thickness(5, 5, 5, 0) });\npanel.AddChild(new Button { Text = \"Sell\", Margin = 5 });\nChart.AddControl(panel);","python":"panel = StackPanel()\nbuyButton = Button()\nbuyButton.Text = \"Buy\"\nbuyButton.Margin = Thickness(5, 5, 5, 0)\nsellButton = Button()\nsellButton.Text = \"Sell\"\nsellButton.Margin = Thickness(5)\npanel.AddChild(buyButton)\npanel.AddChild(sellButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Margin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Margin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.MaxHeight","kind":"property","name":"MaxHeight","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double MaxHeight {get; set;}","python":"controlBase.MaxHeight: float","summary":"Gets or sets the maximum height of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var scrollViewer = new ScrollViewer { MaxHeight = 150 };\nvar panel = new StackPanel();\nfor (var i = 1; i <= 20; i++)\n    panel.AddChild(new TextBlock { Text = \"Row \" + i });\nscrollViewer.Content = panel;\nChart.AddControl(scrollViewer);","python":"scrollViewer = ScrollViewer()\nscrollViewer.MaxHeight = 150\npanel = StackPanel()\nfor i in range(1, 21):\n    row = TextBlock()\n    row.Text = f\"Row {i}\"\n    panel.AddChild(row)\nscrollViewer.Content = panel\napi.Chart.AddControl(scrollViewer)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MaxHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MaxHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.MaxWidth","kind":"property","name":"MaxWidth","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double MaxWidth {get; set;}","python":"controlBase.MaxWidth: float","summary":"Gets or sets the maximum width of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"A long trading note that wraps when it reaches the maximum width\", MaxWidth = 200, TextWrapping = TextWrapping.Wrap };\nChart.AddControl(textBlock);\nPrint(\"Maximum width: {0}\", textBlock.MaxWidth);","python":"textBlock = TextBlock()\ntextBlock.Text = \"A long trading note that wraps when it reaches the maximum width\"\ntextBlock.MaxWidth = 200\ntextBlock.TextWrapping = TextWrapping.Wrap\napi.Chart.AddControl(textBlock)\napi.Print(f\"Maximum width: {textBlock.MaxWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MaxWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MaxWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.MinHeight","kind":"property","name":"MinHeight","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double MinHeight {get; set;}","python":"controlBase.MinHeight: float","summary":"Gets or sets the minimum height of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The minimum height.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Sell\", MinHeight = 30 };\nChart.AddControl(button);\nPrint(\"Minimum height: {0}\", button.MinHeight);","python":"button = Button()\nbutton.Text = \"Sell\"\nbutton.MinHeight = 30\napi.Chart.AddControl(button)\napi.Print(f\"Minimum height: {button.MinHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MinHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MinHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.MinWidth","kind":"property","name":"MinWidth","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double MinWidth {get; set;}","python":"controlBase.MinWidth: float","summary":"Gets or sets the minimum width of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The minimum width.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"EURUSD\", MinWidth = 100 };\nChart.AddControl(textBox);\nPrint(\"Minimum width: {0}\", textBox.MinWidth);","python":"textBox = TextBox()\ntextBox.Text = \"EURUSD\"\ntextBox.MinWidth = 100\napi.Chart.AddControl(textBox)\napi.Print(f\"Minimum width: {textBox.MinWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MinWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/MinWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Opacity","kind":"property","name":"Opacity","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Opacity {get; set;}","python":"controlBase.Opacity: float","summary":"Gets or sets the level of opacity of the chart control instance. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BackgroundColor = Color.Gold, Width = 150, Height = 60, Opacity = 0.5 };\nChart.AddControl(border);\nPrint(\"Opacity: {0}\", border.Opacity);","python":"border = Border()\nborder.BackgroundColor = Color.Gold\nborder.Width = 150\nborder.Height = 60\nborder.Opacity = 0.5\napi.Chart.AddControl(border)\napi.Print(f\"Opacity: {border.Opacity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Opacity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Opacity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Right","kind":"property","name":"Right","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Right {get; set;}","python":"controlBase.Right: float","summary":"Gets or sets the position of the chart control to the rignt side of the chart area. Works only when the control is inside the Canvas panel.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The right.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas();\nvar textBlock = new TextBlock { Text = \"Balance\", Right = 20, Top = 20 };\ncanvas.AddChild(textBlock);\nChart.AddControl(canvas);\nPrint(\"Right: {0}\", textBlock.Right);","python":"canvas = Canvas()\ntextBlock = TextBlock()\ntextBlock.Text = \"Balance\"\ntextBlock.Right = 20\ntextBlock.Top = 20\ncanvas.AddChild(textBlock)\napi.Chart.AddControl(canvas)\napi.Print(f\"Right: {textBlock.Right}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Right/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Right/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Style","kind":"property","name":"Style","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public Style Style {get; set;}","python":"controlBase.Style: Style","summary":"Gets or sets the style of a chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen);\nstyle.Set(ControlProperty.ForegroundColor, Color.White);\nvar button = new Button { Text = \"Buy\", Style = style };\nChart.AddControl(button);","python":"style = Style()\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen)\nstyle.Set(ControlProperty.ForegroundColor, Color.White)\nbutton = Button()\nbutton.Text = \"Buy\"\nbutton.Style = style\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Style/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Style/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Top","kind":"property","name":"Top","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Top {get; set;}","python":"controlBase.Top: float","summary":"Gets or sets the position of the chart control to the top of the chart area. Works only when the control is inside the Canvas panel.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The top.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas();\nvar button = new Button { Text = \"Buy\", Left = 10, Top = 50 };\ncanvas.AddChild(button);\nChart.AddControl(canvas);\nPrint(\"Top: {0}\", button.Top);","python":"canvas = Canvas()\nbutton = Button()\nbutton.Text = \"Buy\"\nbutton.Left = 10\nbutton.Top = 50\ncanvas.AddChild(button)\napi.Chart.AddControl(canvas)\napi.Print(f\"Top: {button.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.UniqueId","kind":"property","name":"UniqueId","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public Guid UniqueId {get;}","python":"controlBase.UniqueId: Guid","summary":"Gets the unique identifier of a chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"Guid","pythonType":"Guid","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\" };\nChart.AddControl(button);\nPrint(\"Button id: {0}\", button.UniqueId);","python":"button = Button()\nbutton.Text = \"Buy\"\napi.Chart.AddControl(button)\napi.Print(f\"Button id: {button.UniqueId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/UniqueId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/UniqueId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.VerticalAlignment","kind":"property","name":"VerticalAlignment","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public VerticalAlignment VerticalAlignment {get; set;}","python":"controlBase.VerticalAlignment: VerticalAlignment","summary":"Gets or sets the vertical alignment of the chart control instance.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Bottom right\", VerticalAlignment = VerticalAlignment.Bottom, HorizontalAlignment = HorizontalAlignment.Right };\nChart.AddControl(textBlock);\nPrint(\"Vertical alignment: {0}\", textBlock.VerticalAlignment);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Bottom right\"\ntextBlock.VerticalAlignment = VerticalAlignment.Bottom\ntextBlock.HorizontalAlignment = HorizontalAlignment.Right\napi.Chart.AddControl(textBlock)\napi.Print(f\"Vertical alignment: {textBlock.VerticalAlignment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ControlBase.Width","kind":"property","name":"Width","type":"T:cAlgo.API.ControlBase","namespace":"cAlgo.API","group":"Controls","csharp":"public double Width {get; set;}","python":"controlBase.Width: float","summary":"Gets or sets the width of the chart control.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"The width.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Close all positions\", Width = 160 };\nChart.AddControl(button);\nPrint(\"Width: {0}\", button.Width);","python":"button = Button()\nbutton.Text = \"Close all positions\"\nbutton.Width = 160\napi.Chart.AddControl(button)\napi.Print(f\"Width: {button.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ControlBase/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ControlProperty","kind":"enum","name":"ControlProperty","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public enum ControlProperty","python":"ControlProperty","summary":"Represents the Control property enumeration used in Style to get or set a style for a specific property.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use ControlProperty in control style\n    public partial class ControlPropertySample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var style = new Style();\n\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.ForegroundColor, Color.Blue);\n            style.Set(ControlProperty.FontSize, 14);\n            style.Set(ControlProperty.Width, 100);\n\n            var textBlock = new TextBlock\n            {\n                Text = \"Styled Text Block\",\n                Style = style,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            Chart.AddControl(textBlock);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        style = Style()\n        style.Set(ControlProperty.Margin, 5)\n        style.Set(ControlProperty.ForegroundColor, Color.Blue)\n        style.Set(ControlProperty.FontSize, 14)\n        style.Set(ControlProperty.Width, 100)\n\n        textBlock = TextBlock()\n        textBlock.Text = \"Styled Text Block\"\n        textBlock.Style = style\n        textBlock.HorizontalAlignment = HorizontalAlignment.Center\n        textBlock.VerticalAlignment = VerticalAlignment.Center\n\n        api.Chart.AddControl(textBlock)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.BackgroundColor","kind":"enum value","name":"BackgroundColor","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.BackgroundColor;","python":"ControlProperty.BackgroundColor","summary":"The background color. Property value can be set using color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.ForegroundColor","kind":"enum value","name":"ForegroundColor","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.ForegroundColor;","python":"ControlProperty.ForegroundColor","summary":"The foreground color. Property value can be set using color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.Opacity","kind":"enum value","name":"Opacity","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.Opacity;","python":"ControlProperty.Opacity","summary":"The opacity of the control. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.MinWidth","kind":"enum value","name":"MinWidth","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.MinWidth;","python":"ControlProperty.MinWidth","summary":"The minimum width of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.MaxWidth","kind":"enum value","name":"MaxWidth","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.MaxWidth;","python":"ControlProperty.MaxWidth","summary":"The maximum width of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.MinHeight","kind":"enum value","name":"MinHeight","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.MinHeight;","python":"ControlProperty.MinHeight","summary":"The minimum hight of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.MaxHeight","kind":"enum value","name":"MaxHeight","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.MaxHeight;","python":"ControlProperty.MaxHeight","summary":"The maximum hight of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.Width","kind":"enum value","name":"Width","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.Width;","python":"ControlProperty.Width","summary":"The width of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.Height","kind":"enum value","name":"Height","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.Height;","python":"ControlProperty.Height","summary":"The height of the control.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.Padding","kind":"enum value","name":"Padding","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.Padding;","python":"ControlProperty.Padding","summary":"The padding of the control. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.BorderThickness","kind":"enum value","name":"BorderThickness","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.BorderThickness;","python":"ControlProperty.BorderThickness","summary":"The thickness of the border of the control. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.CornerRadius","kind":"enum value","name":"CornerRadius","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.CornerRadius;","python":"ControlProperty.CornerRadius","summary":"The radius of the corner of the control. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.HorizontalContentAlignment","kind":"enum value","name":"HorizontalContentAlignment","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.HorizontalContentAlignment;","python":"ControlProperty.HorizontalContentAlignment","summary":"The horizontal content alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.VerticalContentAlignment","kind":"enum value","name":"VerticalContentAlignment","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.VerticalContentAlignment;","python":"ControlProperty.VerticalContentAlignment","summary":"The vertical content alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.TextAlignment","kind":"enum value","name":"TextAlignment","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.TextAlignment;","python":"ControlProperty.TextAlignment","summary":"The alignment of the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.Margin","kind":"enum value","name":"Margin","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.Margin;","python":"ControlProperty.Margin","summary":"The margin of the content. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.FontWeight","kind":"enum value","name":"FontWeight","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.FontWeight;","python":"ControlProperty.FontWeight","summary":"The content font weight. Property value can be set using the FontWeight enumerations: FontWeight.Bold, FontWeight.SemiBold, FontWeight.Light, FontWeight.Thin, etc.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.FontStyle","kind":"enum value","name":"FontStyle","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.FontStyle;","python":"ControlProperty.FontStyle","summary":"The content font style. Property value can be set using the FontStyle enumeration: FontWeight.Italic or FontWeight.Oblique.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.FontFamily","kind":"enum value","name":"FontFamily","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.FontFamily;","python":"ControlProperty.FontFamily","summary":"The font family.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.FontSize","kind":"enum value","name":"FontSize","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.FontSize;","python":"ControlProperty.FontSize","summary":"The font size.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.BorderColor","kind":"enum value","name":"BorderColor","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.BorderColor;","python":"ControlProperty.BorderColor","summary":"The border color. Property value can be set using color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlProperty.CaretColor","kind":"enum value","name":"CaretColor","type":"T:cAlgo.API.ControlProperty","namespace":"cAlgo.API","group":"Styles","csharp":"ControlProperty.CaretColor;","python":"ControlProperty.CaretColor","summary":"The caret color. Property value can be set using color values, or use the strings Color.Red, Color.FromName(\"Red\"), Color.FromArgb(255, 0, 0), Color.FromHex(\"#ff0000\"), \"Red\", \"#ff0000\".","remarks":null,"parameters":[],"returns":{"csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlProperty/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ControlState","kind":"enum","name":"ControlState","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public enum ControlState","python":"ControlState","summary":"Represents the chart control state.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme);\nstyle.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme);\nstyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.DarkTheme | ControlState.Hover);\nstyle.Set(ControlProperty.BackgroundColor, Color.LimeGreen, ControlState.LightTheme | ControlState.Hover);\nChart.AddControl(new Button { Text = \"Buy\", Style = style });","python":"style = Style()\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme)\nstyle.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme)\nstyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.DarkTheme | ControlState.Hover)\nstyle.Set(ControlProperty.BackgroundColor, Color.LimeGreen, ControlState.LightTheme | ControlState.Hover)\nbutton = Button()\nbutton.Text = \"Buy\"\nbutton.Style = style\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.Hover","kind":"enum value","name":"Hover","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.Hover;","python":"ControlState.Hover","summary":"The hover.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.Pressed","kind":"enum value","name":"Pressed","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.Pressed;","python":"ControlState.Pressed","summary":"The pressed.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.Disabled","kind":"enum value","name":"Disabled","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.Disabled;","python":"ControlState.Disabled","summary":"The disabled.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.Checked","kind":"enum value","name":"Checked","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.Checked;","python":"ControlState.Checked","summary":"The checked.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.DarkTheme","kind":"enum value","name":"DarkTheme","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.DarkTheme;","python":"ControlState.DarkTheme","summary":"The dark theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ControlState.LightTheme","kind":"enum value","name":"LightTheme","type":"T:cAlgo.API.ControlState","namespace":"cAlgo.API","group":"Styles","csharp":"ControlState.LightTheme;","python":"ControlState.LightTheme","summary":"The light theme.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlState","pythonType":"ControlState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/ControlState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CornerRadius","kind":"struct","name":"CornerRadius","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public sealed struct CornerRadius : ValueType","python":"CornerRadius","summary":"Represents the radii of a rectangle's corners.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use the rectangle corner radius to create a round corner rectangle\n    public partial class RectangleCornerRadiusSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var rectangle = new Rectangle\n            {\n                RadiusX = 20,\n                RadiusY = 20,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Width = 200,\n                Height = 150,\n                FillColor = Color.FromArgb(100, Color.Red),\n                StrokeColor = Color.Yellow\n            };\n\n            Chart.AddControl(rectangle);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        rectangle = Rectangle()\n        rectangle.RadiusX = 20\n        rectangle.RadiusY = 20\n        rectangle.HorizontalAlignment = HorizontalAlignment.Center\n        rectangle.VerticalAlignment = VerticalAlignment.Center\n        rectangle.Width = 200\n        rectangle.Height = 150\n        rectangle.FillColor = Color.FromArgb(100, Color.Red)\n        rectangle.StrokeColor = Color.Yellow\n\n        api.Chart.AddControl(rectangle)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.CornerRadius.#ctor(System.Double,System.Double,System.Double,System.Double)","kind":"constructor","name":"CornerRadius","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)","python":"CornerRadius(topLeft: float, topRight: float, bottomRight: float, bottomLeft: float)","summary":"Initializes a new instance of the CornerRadius structure.","remarks":null,"parameters":[{"name":"topLeft","csharpType":"double","pythonType":"float","summary":""},{"name":"topRight","csharpType":"double","pythonType":"float","summary":""},{"name":"bottomRight","csharpType":"double","pythonType":"float","summary":""},{"name":"bottomLeft","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", CornerRadius = new CornerRadius(10, 10, 0, 0) };\nChart.AddControl(button);\nPrint(\"Top left radius: {0}\", button.CornerRadius.TopLeft);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.CornerRadius = CornerRadius(10, 10, 0, 0)\napi.Chart.AddControl(button)\napi.Print(f\"Top left radius: {button.CornerRadius.TopLeft}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.CornerRadius.#ctor(System.Double)","kind":"constructor","name":"CornerRadius","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public CornerRadius(double uniformRadius)","python":"CornerRadius(uniformRadius: float)","summary":"Initializes a new instance of the CornerRadius structure.","remarks":null,"parameters":[{"name":"uniformRadius","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { CornerRadius = new CornerRadius(8), BorderThickness = 1, BorderColor = Color.Gray, Width = 200, Height = 80 };\nChart.AddControl(border);","python":"border = Border()\nborder.CornerRadius = CornerRadius(8)\nborder.BorderThickness = Thickness(1)\nborder.BorderColor = Color.Gray\nborder.Width = 200\nborder.Height = 80\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CornerRadius.BottomLeft","kind":"property","name":"BottomLeft","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public double BottomLeft {get; set;}","python":"cornerRadius.BottomLeft: float","summary":"Gets or sets the radius of the bottom-left corner.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radius = new CornerRadius(4, 8, 12, 16);\nradius.BottomLeft = 0;\nPrint(\"Bottom left radius: {0}\", radius.BottomLeft);","python":"radius = CornerRadius(4, 8, 12, 16)\nradius.BottomLeft = 0\napi.Print(f\"Bottom left radius: {radius.BottomLeft}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/BottomLeft/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/BottomLeft/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CornerRadius.BottomRight","kind":"property","name":"BottomRight","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public double BottomRight {get; set;}","python":"cornerRadius.BottomRight: float","summary":"Gets or sets the radius of the bottom-right corner.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radius = new CornerRadius(4, 8, 12, 16);\nradius.BottomRight = 0;\nPrint(\"Bottom right radius: {0}\", radius.BottomRight);","python":"radius = CornerRadius(4, 8, 12, 16)\nradius.BottomRight = 0\napi.Print(f\"Bottom right radius: {radius.BottomRight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/BottomRight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/BottomRight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CornerRadius.TopLeft","kind":"property","name":"TopLeft","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public double TopLeft {get; set;}","python":"cornerRadius.TopLeft: float","summary":"Gets or sets the radius of the top-left corner.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radius = new CornerRadius(4, 8, 12, 16);\nradius.TopLeft = 6;\nPrint(\"Top left radius: {0}\", radius.TopLeft);","python":"radius = CornerRadius(4, 8, 12, 16)\nradius.TopLeft = 6\napi.Print(f\"Top left radius: {radius.TopLeft}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/TopLeft/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/TopLeft/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.CornerRadius.TopRight","kind":"property","name":"TopRight","type":"T:cAlgo.API.CornerRadius","namespace":"cAlgo.API","group":"Styles","csharp":"public double TopRight {get; set;}","python":"cornerRadius.TopRight: float","summary":"Gets or sets the radius of the top-right corner.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radius = new CornerRadius(4, 8, 12, 16);\nradius.TopRight = 10;\nPrint(\"Top right radius: {0}\", radius.TopRight);","python":"radius = CornerRadius(4, 8, 12, 16)\nradius.TopRight = 10\napi.Print(f\"Top right radius: {radius.TopRight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/TopRight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/CornerRadius/TopRight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.CustomBar","kind":"struct","name":"CustomBar","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public sealed struct CustomBar : ValueType","python":"CustomBar","summary":"Represents a custom OHLC bar.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\ncustomBars.AppendBar(bar);\nPrint(\"Appended bar {0} O={1} H={2} L={3} C={4}\", bar.Time, bar.Open, bar.High, bar.Low, bar.Close);","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nbar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\ncustomBars.AppendBar(bar)\napi.Print(f\"Appended bar {bar.Time} O={bar.Open} H={bar.High} L={bar.Low} C={bar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBar.#ctor(System.DateTime,System.Double,System.Double,System.Double,System.Double,System.Int64)","kind":"constructor","name":"CustomBar","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomBar(DateTime time, double open, double high, double low, double close, long volume)","python":"CustomBar(time: DateTime, open: float, high: float, low: float, close: float, volume: int)","summary":"Creates a new custom bar.","remarks":null,"parameters":[{"name":"time","csharpType":"DateTime","pythonType":"DateTime","summary":"Open time"},{"name":"open","csharpType":"double","pythonType":"float","summary":"Open price"},{"name":"high","csharpType":"double","pythonType":"float","summary":"High price"},{"name":"low","csharpType":"double","pythonType":"float","summary":"Low price"},{"name":"close","csharpType":"double","pythonType":"float","summary":"Close price"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"Volume amount"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var lastBar = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\").LastBar;\nvar customBar = new CustomBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, (long)lastBar.TickVolume);\nPrint(\"Custom bar created at {0}\", customBar.Time);","python":"lastBar = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\").LastBar\ncustomBar = CustomBar(lastBar.OpenTime, lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, int(lastBar.TickVolume))\napi.Print(f\"Custom bar created at {customBar.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.Close","kind":"property","name":"Close","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public double Close {get;}","python":"customBar.Close: float","summary":"Gets close price of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar is bullish: {0}\", bar.Close > bar.Open);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar is bullish: {bar.Close > bar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.High","kind":"property","name":"High","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public double High {get;}","python":"customBar.High: float","summary":"Gets high price of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar range: {0}\", bar.High - bar.Low);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar range: {bar.High - bar.Low}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/High/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/High/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.Low","kind":"property","name":"Low","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public double Low {get;}","python":"customBar.Low: float","summary":"Gets low price of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar low price: {0}\", bar.Low);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar low price: {bar.Low}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Low/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Low/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.Open","kind":"property","name":"Open","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public double Open {get;}","python":"customBar.Open: float","summary":"Gets open price of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar open price: {0}\", bar.Open);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar open price: {bar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Open/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Open/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.Time","kind":"property","name":"Time","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public DateTime Time {get;}","python":"customBar.Time: DateTime","summary":"Gets open time of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar open time: {0}\", bar.Time);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar open time: {bar.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBar.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.CustomBar","namespace":"cAlgo.API","group":"Custom","csharp":"public long Volume {get;}","python":"customBar.Volume: int","summary":"Gets volume of bar.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var bar = new CustomBar(Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Bar volume: {0}\", bar.Volume);","python":"bar = CustomBar(api.Server.Time, 1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Bar volume: {bar.Volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBar/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomBars","kind":"interface","name":"CustomBars","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomBars","python":"CustomBars","summary":"Represents a mutable collection of OHLC bars that will be used for a custom time frame / symbol.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar sourceBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\ncustomBars.AppendBars(sourceBars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\nPrint(\"{0} custom bars for {1}, last close {2}\", customBars.Bars.Count, customBars.Symbol.Name, customBars.Bars.LastBar.Close);","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nsourceBars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\nfor bar in sourceBars:\n    customBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))\napi.Print(f\"{customBars.Bars.Count} custom bars for {customBars.Symbol.Name}, last close {customBars.Bars.LastBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBars.AppendBar(cAlgo.API.CustomBar)","kind":"method","name":"AppendBar","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"void AppendBar(CustomBar bar)","python":"customBars.AppendBar(bar: CustomBar) -> None","summary":"Appends a new bar to the end of bars collection.","remarks":"Append will fail with an exception if new bar time is not after last bar time.","parameters":[{"name":"bar","csharpType":"CustomBar","pythonType":"CustomBar","summary":"New bar"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar openTime = customBars.Bars.Count > 0 ? customBars.Bars.LastBar.OpenTime.AddHours(1) : Server.Time.Date;\ncustomBars.AppendBar(new CustomBar(openTime, 1.0850, 1.0870, 1.0840, 1.0865, 1200));","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nopenTime = customBars.Bars.LastBar.OpenTime.AddHours(1) if customBars.Bars.Count > 0 else api.Server.Time.Date\ncustomBars.AppendBar(CustomBar(openTime, 1.0850, 1.0870, 1.0840, 1.0865, 1200))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/AppendBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/AppendBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBars.AppendBars(System.Collections.Generic.IEnumerable{cAlgo.API.CustomBar})","kind":"method","name":"AppendBars","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"void AppendBars(IEnumerable<CustomBar> bars)","python":"customBars.AppendBars(bars: Iterable[CustomBar]) -> None","summary":"Appends a collection of bars to the end of bars collection.","remarks":"Append will fail with an exception if first new bar time is not after last bar time.","parameters":[{"name":"bars","csharpType":"IEnumerable<CustomBar>","pythonType":"Iterable[CustomBar]","summary":"New bars"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar sourceBars = MarketData.GetBars(TimeFrame.Hour4, \"EURUSD\");\ncustomBars.AppendBars(sourceBars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));","python":"from System import Array\ncustomBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nsourceBars = api.MarketData.GetBars(TimeFrame.Hour4, \"EURUSD\")\nnewBars = [CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in sourceBars]\ncustomBars.AppendBars(Array[CustomBar](newBars))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/AppendBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/AppendBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBars.PrependBar(cAlgo.API.CustomBar)","kind":"method","name":"PrependBar","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"void PrependBar(CustomBar bar)","python":"customBars.PrependBar(bar: CustomBar) -> None","summary":"Prepends a new bar to the start of bars collection.","remarks":"Prepend will fail with an exception if new bar time is not before first bar time.","parameters":[{"name":"bar","csharpType":"CustomBar","pythonType":"CustomBar","summary":"New bar"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar openTime = customBars.Bars.Count > 0 ? customBars.Bars[0].OpenTime.AddHours(-1) : Server.Time.Date;\ncustomBars.PrependBar(new CustomBar(openTime, 1.0830, 1.0855, 1.0825, 1.0850, 900));","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nopenTime = customBars.Bars[0].OpenTime.AddHours(-1) if customBars.Bars.Count > 0 else api.Server.Time.Date\ncustomBars.PrependBar(CustomBar(openTime, 1.0830, 1.0855, 1.0825, 1.0850, 900))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/PrependBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/PrependBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBars.PrependBars(System.Collections.Generic.IEnumerable{cAlgo.API.CustomBar})","kind":"method","name":"PrependBars","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"void PrependBars(IEnumerable<CustomBar> bars)","python":"customBars.PrependBars(bars: Iterable[CustomBar]) -> None","summary":"Prepends a collection of bars to the start of bars collection.","remarks":"Prepend will fail with an exception if last new bar time is not before first bar time.","parameters":[{"name":"bars","csharpType":"IEnumerable<CustomBar>","pythonType":"Iterable[CustomBar]","summary":"New bars"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar sourceBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\nvar loadedCount = sourceBars.LoadMoreHistory();\ncustomBars.PrependBars(sourceBars.Take(loadedCount).Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));","python":"from System import Array\ncustomBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nsourceBars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\nloadedCount = sourceBars.LoadMoreHistory()\nolderBars = [CustomBar(sourceBars[i].OpenTime, sourceBars[i].Open, sourceBars[i].High, sourceBars[i].Low, sourceBars[i].Close, int(sourceBars[i].TickVolume)) for i in range(loadedCount)]\ncustomBars.PrependBars(Array[CustomBar](olderBars))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/PrependBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/PrependBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomBars.UpdateLastBar(System.Double,System.Double,System.Double,System.Double,System.Int64)","kind":"method","name":"UpdateLastBar","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"void UpdateLastBar(double open, double high, double low, double close, long volume)","python":"customBars.UpdateLastBar(open: float, high: float, low: float, close: float, volume: int) -> None","summary":"Updates the last bar.","remarks":"Update will fail with an exception if collection is empty.","parameters":[{"name":"open","csharpType":"double","pythonType":"float","summary":"Open price"},{"name":"high","csharpType":"double","pythonType":"float","summary":"High price"},{"name":"low","csharpType":"double","pythonType":"float","summary":"Low price"},{"name":"close","csharpType":"double","pythonType":"float","summary":"Close price"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"Volume amount"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nif (customBars.Bars.Count > 0)\n{\n    var lastBar = customBars.Bars.LastBar;\n    var price = customBars.Symbol.Bid;\n    customBars.UpdateLastBar(lastBar.Open, Math.Max(lastBar.High, price), Math.Min(lastBar.Low, price), price, (long)lastBar.TickVolume + 1);\n}","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nif customBars.Bars.Count > 0:\n    lastBar = customBars.Bars.LastBar\n    price = customBars.Symbol.Bid\n    customBars.UpdateLastBar(lastBar.Open, max(lastBar.High, price), min(lastBar.Low, price), price, int(lastBar.TickVolume) + 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/UpdateLastBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/UpdateLastBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBars.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"Bars Bars {get;}","python":"customBars.Bars: Bars","summary":"Gets readonly bars.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nvar sma = Indicators.SimpleMovingAverage(customBars.Bars.ClosePrices, 14);\nPrint(\"Custom bars: {0}, SMA: {1}\", customBars.Bars.Count, sma.Result.LastValue);","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\nsma = api.Indicators.SimpleMovingAverage(customBars.Bars.ClosePrices, 14)\napi.Print(f\"Custom bars: {customBars.Bars.Count}, SMA: {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBars.IsLoaded","kind":"property","name":"IsLoaded","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"bool IsLoaded {get;}","python":"customBars.IsLoaded: bool","summary":"Gets IsLoaded status, If true it means custom bars is being used and can't be removed.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\nvar symbol = Symbols.GetSymbol(\"EURUSD\");\nvar customBars = customTimeFrame.AddBars(symbol);\nif (!customBars.IsLoaded)\n    customTimeFrame.RemoveBars(symbol);","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\nsymbol = api.Symbols.GetSymbol(\"EURUSD\")\ncustomBars = customTimeFrame.AddBars(symbol)\nif not customBars.IsLoaded:\n    customTimeFrame.RemoveBars(symbol)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/IsLoaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/IsLoaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBars.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"Symbol Symbol {get;}","python":"customBars.Symbol: Symbol","summary":"Gets symbol of custom bars.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"Custom bars symbol: {0}\", customBars.Symbol.Name);","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"Custom bars symbol: {customBars.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBars.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"TimeFrame TimeFrame {get;}","python":"customBars.TimeFrame: TimeFrame","summary":"Gets timeframe of custom bars.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"Custom bars time frame: {0}\", customBars.TimeFrame);","python":"customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"Custom bars time frame: {customBars.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.CustomBars.NeedsMore","kind":"event","name":"NeedsMore","type":"T:cAlgo.API.CustomBars","namespace":"cAlgo.API","group":"Custom","csharp":"event Action<CustomBarsNeedsMoreEventArgs> NeedsMore;","python":"customBars.NeedsMore += handler  # handler(obj: CustomBarsNeedsMoreEventArgs)","summary":"Occurs when user scrolls back on a custom bars chart.","remarks":"Use this event to prepend more bars.","parameters":[],"returns":{"csharpType":"Action<CustomBarsNeedsMoreEventArgs>","pythonType":"Callable[[CustomBarsNeedsMoreEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private Bars _sourceBars;\n\nprotected override void OnStart()\n{\n    _sourceBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\n    var customBars = TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(Symbols.GetSymbol(\"EURUSD\"));\n    customBars.NeedsMore += OnNeedsMore;\n}\n\nprivate void OnNeedsMore(CustomBarsNeedsMoreEventArgs args)\n{\n    var loadedCount = _sourceBars.LoadMoreHistory();\n    args.CustomBars.PrependBars(_sourceBars.Take(loadedCount).Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n}","python":"from System import Array\n\ndef on_start(self):\n    self.sourceBars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\n    customBars = api.TimeFrameManager.Custom.Add(\"My Custom TF\").AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\n    customBars.NeedsMore += self.on_needs_more\n\ndef on_needs_more(self, args):\n    loadedCount = self.sourceBars.LoadMoreHistory()\n    olderBars = [CustomBar(self.sourceBars[i].OpenTime, self.sourceBars[i].Open, self.sourceBars[i].High, self.sourceBars[i].Low, self.sourceBars[i].Close, int(self.sourceBars[i].TickVolume)) for i in range(loadedCount)]\n    args.CustomBars.PrependBars(Array[CustomBar](olderBars))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/NeedsMore/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomBars/NeedsMore/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomBarsNeedsMoreEventArgs","kind":"class","name":"CustomBarsNeedsMoreEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CustomBarsNeedsMoreEventArgs","python":"CustomBarsNeedsMoreEventArgs","summary":"Provides data for CustomBars NeedsMore event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    var customBars = customTimeFrame.AddBars(Symbols.GetSymbol(\"EURUSD\"));\n    customBars.NeedsMore += OnCustomBarsNeedsMore;\n}\n\nprivate void OnCustomBarsNeedsMore(CustomBarsNeedsMoreEventArgs args)\n{\n    Print(\"{0} {1} custom bars need more history\", args.CustomBars.Symbol.Name, args.CustomBars.TimeFrame);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customBars = customTimeFrame.AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\n    customBars.NeedsMore += self.on_custom_bars_needs_more\n\ndef on_custom_bars_needs_more(self, args):\n    api.Print(f\"{args.CustomBars.Symbol.Name} {args.CustomBars.TimeFrame} custom bars need more history\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomBarsNeedsMoreEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomBarsNeedsMoreEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomBarsNeedsMoreEventArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomBarsNeedsMoreEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomBars CustomBars {get;}","python":"customBarsNeedsMoreEventArgs.CustomBars: CustomBars","summary":"Gets custom bars that needs more bars.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    var customBars = customTimeFrame.AddBars(Symbols.GetSymbol(\"EURUSD\"));\n    customBars.NeedsMore += OnCustomBarsNeedsMore;\n}\n\nprivate void OnCustomBarsNeedsMore(CustomBarsNeedsMoreEventArgs args)\n{\n    var customBars = args.CustomBars;\n    Print(\"Loaded: {0}, bars count: {1}\", customBars.IsLoaded, customBars.Bars.Count);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customBars = customTimeFrame.AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\n    customBars.NeedsMore += self.on_custom_bars_needs_more\n\ndef on_custom_bars_needs_more(self, args):\n    customBars = args.CustomBars\n    api.Print(f\"Loaded: {customBars.IsLoaded}, bars count: {customBars.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomBarsNeedsMoreEventArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomBarsNeedsMoreEventArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomControl","kind":"class","name":"CustomControl","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public abstract class CustomControl : ControlBase","python":"CustomControl","summary":"Represents the custom control to create reusable controls with customized look and behavior.","remarks":"Using CustomControl is currently not possible in Python algos.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Collections.Generic;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Chart Custom controls to create your own controls\n    // by combining multiple built-in controls, the combobox control is not a fully functioning combobox, its just for learning purpose\n    public partial class CustomControlSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var comboBox = new ComboBox\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            comboBox.AddItem(\"Item 1\");\n            comboBox.AddItem(\"Item 2\");\n            comboBox.AddItem(\"Item 3\");\n            comboBox.AddItem(\"Item 4\");\n            comboBox.AddItem(\"Item 5\");\n\n            Chart.AddControl(comboBox);\n        }\n\n        public override void Calculate(int index)\n        {\n            // Calculate value at specified index\n            // Result[index] = ...\n        }\n    }\n\n    public class ComboBox : CustomControl\n    {\n        private TextBox _textBox;\n\n        private Button _button;\n\n        private Grid _itemsGrid;\n\n        private StackPanel _panel;\n\n        private readonly List<object> _items = new List<object>();\n\n        private bool _isExpanded;\n\n        public ComboBox()\n        {\n            _textBox = new TextBox\n            {\n                Width = 100,\n                IsReadOnly = true,\n                IsReadOnlyCaretVisible = false\n            };\n\n            _button = new Button\n            {\n                Text = \"▼\"\n            };\n\n            _button.Click += Button_Click;\n\n            var stackPanel = new StackPanel\n            {\n                Orientation = Orientation.Horizontal\n            };\n\n            stackPanel.AddChild(_textBox);\n            stackPanel.AddChild(_button);\n\n            _panel = new StackPanel\n            {\n                Orientation = Orientation.Vertical\n            };\n\n            _panel.AddChild(stackPanel);\n\n            AddChild(_panel);\n        }\n\n        public void AddItem(object item)\n        {\n            _items.Add(item);\n        }\n\n        public bool RemoveItem(object item)\n        {\n            return _items.Remove(item);\n        }\n\n        private void Button_Click(ButtonClickEventArgs obj)\n        {\n            if (_itemsGrid != null)\n                _panel.RemoveChild(_itemsGrid);\n\n            if (_isExpanded)\n            {\n                _isExpanded = false;\n\n                return;\n            }\n\n            _isExpanded = true;\n\n            _itemsGrid = new Grid(_items.Count, 1);\n\n            for (int i = 0; i < _items.Count; i++)\n            {\n                var item = _items[i];\n\n                _itemsGrid.AddChild(new TextBlock\n                {\n                    Text = item.ToString()\n                }, i, 0);\n            }\n\n            _panel.AddChild(_itemsGrid);\n        }\n    }\n}","python":"# Not available in Python: CustomControl subclasses are C# classes, compose built-in controls instead\ntextBox = TextBox()\ntextBox.Width = 100\ntextBox.IsReadOnly = True\nbutton = Button()\nbutton.Text = \"v\"\npanel = StackPanel()\npanel.Orientation = Orientation.Horizontal\npanel.AddChild(textBox)\npanel.AddChild(button)\napi.Chart.AddControl(panel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CustomControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CustomControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.CustomControl.AddChild(cAlgo.API.ControlBase)","kind":"method","name":"AddChild","type":"T:cAlgo.API.CustomControl","namespace":"cAlgo.API","group":"Controls","csharp":"protected void AddChild(ControlBase childControl)","python":"customControl.AddChild(childControl: ControlBase) -> None","summary":"Adds a child control.","remarks":null,"parameters":[{"name":"childControl","csharpType":"ControlBase","pythonType":"ControlBase","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public class SpreadLabel : CustomControl\n{\n    private readonly TextBlock _textBlock = new TextBlock { Text = \"Spread\" };\n\n    public SpreadLabel()\n    {\n        var border = new Border { BorderThickness = 1, BorderColor = Color.Gray, Padding = 5, Child = _textBlock };\n        AddChild(border);\n    }\n\n    public void Update(double spreadInPips) => _textBlock.Text = \"Spread: \" + spreadInPips.ToString(\"F1\");\n}","python":"# Not available in Python: CustomControl subclasses are C# classes, compose built-in controls instead\ntextBlock = TextBlock()\ntextBlock.Text = \"Spread\"\nborder = Border()\nborder.BorderThickness = Thickness(1)\nborder.BorderColor = Color.Gray\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/CustomControl/AddChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/CustomControl/AddChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.CustomFrame","kind":"interface","name":"CustomFrame","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface CustomFrame","python":"CustomFrame","summary":"Represents a custom frame.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"ctrader.com\");\nvar webView = new WebView();\nwebView.Loaded += _ => webView.NavigateAsync(\"https://ctrader.com/\");\ncustomFrame.Child = webView;","python":"customFrame = api.ChartManager.AddCustomFrame(\"ctrader.com\")\nwebView = WebView()\nwebView.Loaded += lambda _: webView.NavigateAsync(\"https://ctrader.com/\")\ncustomFrame.Child = webView"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/CustomFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/CustomFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomFrame.Child","kind":"property","name":"Child","type":"T:cAlgo.API.CustomFrame","namespace":"cAlgo.API","group":"Chart","csharp":"ControlBase Child {get; set;}","python":"customFrame.Child: ControlBase","summary":"Get / set child control of frame.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"Account\");\nvar panel = new StackPanel { Margin = 10 };\npanel.AddChild(new TextBlock { Text = $\"Balance: {Account.Balance}\" });\npanel.AddChild(new TextBlock { Text = $\"Equity: {Account.Equity}\" });\ncustomFrame.Child = panel;","python":"customFrame = api.ChartManager.AddCustomFrame(\"Account\")\npanel = StackPanel()\npanel.Margin = Thickness(10)\nbalanceText = TextBlock()\nbalanceText.Text = f\"Balance: {api.Account.Balance}\"\nequityText = TextBlock()\nequityText.Text = f\"Equity: {api.Account.Equity}\"\npanel.AddChild(balanceText)\npanel.AddChild(equityText)\ncustomFrame.Child = panel"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/CustomFrame/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/CustomFrame/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbol","kind":"interface","name":"CustomSymbol","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomSymbol","python":"CustomSymbol","summary":"Represents a custom symbol.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Description = \"EURUSD copy with custom quotes\";\ncustomSymbol.TickDigits = 5;\ncustomSymbol.PipDigits = 4;\ncustomSymbol.BarsNeeded = args => args.CustomBars.AppendBars(MarketData.GetBars(args.CustomBars.TimeFrame, \"EURUSD\")\n    .Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\ncustomSymbol.UpdateQuote(1.08500, 1.08520);","python":"from System import Action\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Description = \"EURUSD copy with custom quotes\"\ncustomSymbol.TickDigits = 5\ncustomSymbol.PipDigits = 4\ncustomSymbol.BarsNeeded = Action[CustomSymbolBarsNeededArgs](lambda args: api.Print(f\"Bars needed for {args.CustomBars.TimeFrame}\"))\ncustomSymbol.UpdateQuote(1.08500, 1.08520)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbol.AddBars(cAlgo.API.TimeFrame)","kind":"method","name":"AddBars","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"CustomBars AddBars(TimeFrame timeFrame)","python":"customSymbol.AddBars(timeFrame: TimeFrame) -> CustomBars","summary":"Adds bars for a time frame that will be used for this custom symbol.","remarks":"If bars already exist for the time frame existing bars will be returned.","parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Bars TimeFrame, it must be a built-in time frame not custom."}],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"CustomBars","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar customBars = customSymbol.AddBars(TimeFrame.Hour);\nvar sourceBars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\ncustomBars.AppendBars(sourceBars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomBars = customSymbol.AddBars(TimeFrame.Hour)\nfor bar in api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\"):\n    customBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AddBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AddBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbol.GetBars(cAlgo.API.TimeFrame)","kind":"method","name":"GetBars","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"CustomBars GetBars(TimeFrame timeFrame)","python":"customSymbol.GetBars(timeFrame: TimeFrame) -> CustomBars","summary":"Returns bars of a time frame if exists otherwise null.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Bars TimeFrame, it must be a built-in time frame not custom."}],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"CustomBars","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar customBars = customSymbol.GetBars(TimeFrame.Hour);\nPrint(\"Hourly custom bars exist: {0}\", customBars != null);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomBars = customSymbol.GetBars(TimeFrame.Hour)\napi.Print(f\"Hourly custom bars exist: {customBars is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/GetBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/GetBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbol.RemoveAllUnloadedBars","kind":"method","name":"RemoveAllUnloadedBars","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"void RemoveAllUnloadedBars()","python":"customSymbol.RemoveAllUnloadedBars() -> None","summary":"Removes all existing unloaded custom bars that aren't being used.","remarks":"Use this method to free up memory.","parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Get(\"MYEURUSD\");\ncustomSymbol?.RemoveAllUnloadedBars();","python":"customSymbol = api.CustomSymbols.Get(\"MYEURUSD\")\nif customSymbol is not None:\n    customSymbol.RemoveAllUnloadedBars()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/RemoveAllUnloadedBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/RemoveAllUnloadedBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbol.RemoveBars(cAlgo.API.TimeFrame)","kind":"method","name":"RemoveBars","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"bool RemoveBars(TimeFrame timeFrame)","python":"customSymbol.RemoveBars(timeFrame: TimeFrame) -> bool","summary":"Removes bars of a time frame which has no user.","remarks":"Returns false if bars were being used or there was no added bars for passed time frame.","parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Bars TimeFrame, it must be a built-in time frame not custom."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if bars removed successfully otherwise false","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.AddBars(TimeFrame.Hour);\nPrint(\"Hourly custom bars removed: {0}\", customSymbol.RemoveBars(TimeFrame.Hour));","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.AddBars(TimeFrame.Hour)\napi.Print(f\"Hourly custom bars removed: {customSymbol.RemoveBars(TimeFrame.Hour)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/RemoveBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/RemoveBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbol.UpdateQuote(System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"UpdateQuote","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"void UpdateQuote(double? bid, double? ask)","python":"customSymbol.UpdateQuote(bid: float | None, ask: float | None) -> None","summary":"Updates current symbol quotes.","remarks":null,"parameters":[{"name":"bid","csharpType":"double?","pythonType":"float | None","summary":"Bid price if changed otherwise null."},{"name":"ask","csharpType":"double?","pythonType":"float | None","summary":"Ask price if changed otherwise null."}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private CustomSymbol _customSymbol;\n\nprotected override void OnStart()\n{\n    _customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\n    var eurUsd = Symbols.GetSymbol(\"EURUSD\");\n    eurUsd.Tick += args => _customSymbol.UpdateQuote(args.Bid, args.Ask);\n    _customSymbol.UpdateQuote(null, 1.08530);\n}","python":"def on_start(self):\n    self.customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\n    eurUsd = api.Symbols.GetSymbol(\"EURUSD\")\n    eurUsd.Tick += lambda args: self.customSymbol.UpdateQuote(args.Bid, args.Ask)\n    self.customSymbol.UpdateQuote(None, 1.08530)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/UpdateQuote/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/UpdateQuote/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.AdministrativeCharge","kind":"property","name":"AdministrativeCharge","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double AdministrativeCharge {get; set;}","python":"customSymbol.AdministrativeCharge: float","summary":"Gets symbol administrative charge. Administrative fee will be charged instead of SWAP if account is marked as SWAP free. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.AdministrativeCharge = 5;\nPrint(\"Administrative charge: {0}\", customSymbol.AdministrativeCharge);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.AdministrativeCharge = 5\napi.Print(f\"Administrative charge: {customSymbol.AdministrativeCharge}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AdministrativeCharge/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AdministrativeCharge/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.AdministrativeCharge3DaysRollover","kind":"property","name":"AdministrativeCharge3DaysRollover","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"DayOfWeek? AdministrativeCharge3DaysRollover {get; set;}","python":"customSymbol.AdministrativeCharge3DaysRollover: DayOfWeek | None","summary":"Gets / sets the Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek?","pythonType":"DayOfWeek | None","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.AdministrativeCharge3DaysRollover = DayOfWeek.Wednesday;\nPrint(\"Triple administrative fee day: {0}\", customSymbol.AdministrativeCharge3DaysRollover);","python":"from System import DayOfWeek\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.AdministrativeCharge3DaysRollover = DayOfWeek.Wednesday\napi.Print(f\"Triple administrative fee day: {customSymbol.AdministrativeCharge3DaysRollover}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AdministrativeCharge3DaysRollover/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/AdministrativeCharge3DaysRollover/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double Ask {get;}","python":"customSymbol.Ask: float","summary":"Gets the current ask price for this symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.UpdateQuote(1.08500, 1.08520);\nPrint(\"Custom symbol ask: {0}\", customSymbol.Ask);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.UpdateQuote(1.08500, 1.08520)\napi.Print(f\"Custom symbol ask: {customSymbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.BarsNeeded","kind":"property","name":"BarsNeeded","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"Action<CustomSymbolBarsNeededArgs> BarsNeeded {get; set;}","python":"customSymbol.BarsNeeded: Callable[[CustomSymbolBarsNeededArgs], None]","summary":"Gets / sets BarsNeeded handler, it's triggered when bars are needed for a time frame of current custom symbol.","remarks":"BarsNeeded is not triggered if there is already an added Bars for requested time frame.","parameters":[],"returns":{"csharpType":"Action<CustomSymbolBarsNeededArgs>","pythonType":"Callable[[CustomSymbolBarsNeededArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomSymbolBarsNeededArgs args)\n{\n    var bars = MarketData.GetBars(args.CustomBars.TimeFrame, \"EURUSD\");\n    args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n}","python":"from System import Action\n\ndef on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    bars = api.MarketData.GetBars(args.CustomBars.TimeFrame, \"EURUSD\")\n    for bar in bars:\n        args.CustomBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BarsNeeded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BarsNeeded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.BaseAsset","kind":"property","name":"BaseAsset","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"Asset BaseAsset {get; set;}","python":"customSymbol.BaseAsset: Asset","summary":"Gets / sets the symbol base asset.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.BaseAsset = Assets.GetAsset(\"EUR\");\nPrint(\"Base asset: {0}\", customSymbol.BaseAsset.Name);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.BaseAsset = api.Assets.GetAsset(\"EUR\")\napi.Print(f\"Base asset: {customSymbol.BaseAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BaseAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BaseAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double Bid {get;}","python":"customSymbol.Bid: float","summary":"Gets the current bid price for this symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.UpdateQuote(1.08500, 1.08520);\nPrint(\"Custom symbol bid: {0}\", customSymbol.Bid);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.UpdateQuote(1.08500, 1.08520)\napi.Print(f\"Custom symbol bid: {customSymbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Commission","kind":"property","name":"Commission","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double Commission {get; set;}","python":"customSymbol.Commission: float","summary":"Gets / sets the amount of base commission for the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume;\ncustomSymbol.Commission = 30;\nPrint(\"Commission: {0} ({1})\", customSymbol.Commission, customSymbol.CommissionType);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\ncustomSymbol.Commission = 30\napi.Print(f\"Commission: {customSymbol.Commission} ({customSymbol.CommissionType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Commission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Commission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.CommissionType","kind":"property","name":"CommissionType","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"SymbolCommissionType CommissionType {get; set;}","python":"customSymbol.CommissionType: SymbolCommissionType","summary":"Gets / sets the symbol base commission calculation type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.CommissionType = SymbolCommissionType.UsdPerOneLot;\ncustomSymbol.Commission = 3.5;\nPrint(\"Commission type: {0}\", customSymbol.CommissionType);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.CommissionType = SymbolCommissionType.UsdPerOneLot\ncustomSymbol.Commission = 3.5\napi.Print(f\"Commission type: {customSymbol.CommissionType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/CommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/CommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Description","kind":"property","name":"Description","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"string Description {get; set;}","python":"customSymbol.Description: str","summary":"Gets / sets symbol description.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Description = \"Euro vs US Dollar from my data feed\";\nPrint(\"Description: {0}\", customSymbol.Description);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Description = \"Euro vs US Dollar from my data feed\"\napi.Print(f\"Description: {customSymbol.Description}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Description/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Description/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.DynamicLeverage","kind":"property","name":"DynamicLeverage","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"ICollection<CustomSymbolLeverageTier> DynamicLeverage {get;}","python":"customSymbol.DynamicLeverage: Sequence[CustomSymbolLeverageTier]","summary":"Gets / sets the symbol dynamic leverage.","remarks":null,"parameters":[],"returns":{"csharpType":"ICollection<CustomSymbolLeverageTier>","pythonType":"Sequence[CustomSymbolLeverageTier]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.DynamicLeverage.Add(new CustomSymbolLeverageTier(2000000, 200));\nforeach (var tier in customSymbol.DynamicLeverage)\n    Print(\"Up to {0}: 1:{1}\", tier.Volume, tier.Leverage);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.DynamicLeverage.Add(CustomSymbolLeverageTier(2000000, 200))\nfor tier in customSymbol.DynamicLeverage:\n    api.Print(f\"Up to {tier.Volume}: 1:{tier.Leverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/DynamicLeverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/DynamicLeverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.FuturesSettings","kind":"property","name":"FuturesSettings","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbolFuturesSettings FuturesSettings {get; set;}","python":"customSymbol.FuturesSettings: CustomSymbolFuturesSettings","summary":"Gets / sets custom future contract settings.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbolFuturesSettings","pythonType":"CustomSymbolFuturesSettings","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYGOLD.Z25\", Symbols.GetSymbol(\"XAUUSD\"));\ncustomSymbol.FuturesSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22), 500);\nPrint(\"Last trade time: {0}\", customSymbol.FuturesSettings.LastTradeTime);","python":"from System import DateTime\ncustomSymbol = api.CustomSymbols.Add(\"MYGOLD.Z25\", api.Symbols.GetSymbol(\"XAUUSD\"))\ncustomSymbol.FuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22), 500)\napi.Print(f\"Last trade time: {customSymbol.FuturesSettings.LastTradeTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/FuturesSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/FuturesSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.GracePeriod","kind":"property","name":"GracePeriod","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"int GracePeriod {get; set;}","python":"customSymbol.GracePeriod: int","summary":"Gets / sets symbol grace period. This is the number of days free of Administrative fee from the time of opening a position. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.GracePeriod = 3;\nPrint(\"Days free of administrative fee: {0}\", customSymbol.GracePeriod);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.GracePeriod = 3\napi.Print(f\"Days free of administrative fee: {customSymbol.GracePeriod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/GracePeriod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/GracePeriod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Id","kind":"property","name":"Id","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"long Id {get;}","python":"customSymbol.Id: int","summary":"Gets the custom symbol ID.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"Custom symbol {0} ID: {1}\", customSymbol.Name, customSymbol.Id);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"Custom symbol {customSymbol.Name} ID: {customSymbol.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.LotSize","kind":"property","name":"LotSize","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"long LotSize {get; set;}","python":"customSymbol.LotSize: int","summary":"Gets / sets the lot size.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.LotSize = 100000;\nPrint(\"Lot size: {0}\", customSymbol.LotSize);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.LotSize = 100000\napi.Print(f\"Lot size: {customSymbol.LotSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/LotSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/LotSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MarketHours","kind":"property","name":"MarketHours","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbolMarketHours MarketHours {get;}","python":"customSymbol.MarketHours: CustomSymbolMarketHours","summary":"Gets / sets the symbol market hours.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbolMarketHours","pythonType":"CustomSymbolMarketHours","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MarketHours.Sessions.Clear();\ncustomSymbol.MarketHours.Sessions.Add(new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(1), TimeSpan.FromHours(23)));\nPrint(\"Sessions: {0}, holidays: {1}\", customSymbol.MarketHours.Sessions.Count, customSymbol.MarketHours.Holidays.Count);","python":"from System import DayOfWeek, TimeSpan\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MarketHours.Sessions.Clear()\ncustomSymbol.MarketHours.Sessions.Add(CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(1), TimeSpan.FromHours(23)))\napi.Print(f\"Sessions: {customSymbol.MarketHours.Sessions.Count}, holidays: {customSymbol.MarketHours.Holidays.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MarketHours/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MarketHours/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinCommission","kind":"property","name":"MinCommission","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double MinCommission {get; set;}","python":"customSymbol.MinCommission: float","summary":"Gets / sets the minimum amount of commission for the symbol. This is the amount of commission that will be paid by trader for any trade. Check MinCommissionType for interpretation of MinCommission value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.Asset;\ncustomSymbol.MinCommissionAsset = Assets.GetAsset(\"USD\");\ncustomSymbol.MinCommission = 1;\nPrint(\"Minimum commission: {0} {1}\", customSymbol.MinCommission, customSymbol.MinCommissionAsset.Name);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.Asset\ncustomSymbol.MinCommissionAsset = api.Assets.GetAsset(\"USD\")\ncustomSymbol.MinCommission = 1\napi.Print(f\"Minimum commission: {customSymbol.MinCommission} {customSymbol.MinCommissionAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinCommissionAsset","kind":"property","name":"MinCommissionAsset","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"Asset MinCommissionAsset {get; set;}","python":"customSymbol.MinCommissionAsset: Asset","summary":"Gets / sets the symbol minimum commission asset. If MinCommissionType is set to Asset then you can use this property to get that asset. The MinCommission value will be converted from MinCommissionAsset to account deposit asset at the moment of trade.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.Asset;\ncustomSymbol.MinCommissionAsset = Assets.GetAsset(\"EUR\");\nPrint(\"Minimum commission asset: {0}\", customSymbol.MinCommissionAsset.Name);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.Asset\ncustomSymbol.MinCommissionAsset = api.Assets.GetAsset(\"EUR\")\napi.Print(f\"Minimum commission asset: {customSymbol.MinCommissionAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommissionAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommissionAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinCommissionType","kind":"property","name":"MinCommissionType","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"SymbolMinCommissionType MinCommissionType {get; set;}","python":"customSymbol.MinCommissionType: SymbolMinCommissionType","summary":"Gets / sets the symbol minimum commission type. Use this property to interpret MinCommission value.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinCommissionType","pythonType":"SymbolMinCommissionType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.QuoteAsset;\nPrint(\"Minimum commission type: {0}\", customSymbol.MinCommissionType);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinCommissionType = SymbolMinCommissionType.QuoteAsset\napi.Print(f\"Minimum commission type: {customSymbol.MinCommissionType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinDistanceType","kind":"property","name":"MinDistanceType","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"SymbolMinDistanceType MinDistanceType {get; set;}","python":"customSymbol.MinDistanceType: SymbolMinDistanceType","summary":"Gets / sets the symbol minimum distances type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinDistanceType","pythonType":"SymbolMinDistanceType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips;\nPrint(\"Minimum distance type: {0}\", customSymbol.MinDistanceType);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips\napi.Print(f\"Minimum distance type: {customSymbol.MinDistanceType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinDistanceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinDistanceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinStopLossDistance","kind":"property","name":"MinStopLossDistance","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double MinStopLossDistance {get; set;}","python":"customSymbol.MinStopLossDistance: float","summary":"Gets / sets symbol minimum stop loss distance. Use MinDistanceType for interpretation.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips;\ncustomSymbol.MinStopLossDistance = 2;\nPrint(\"Minimum stop loss distance: {0} pips\", customSymbol.MinStopLossDistance);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips\ncustomSymbol.MinStopLossDistance = 2\napi.Print(f\"Minimum stop loss distance: {customSymbol.MinStopLossDistance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinStopLossDistance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinStopLossDistance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.MinTakeProfitDistance","kind":"property","name":"MinTakeProfitDistance","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double MinTakeProfitDistance {get; set;}","python":"customSymbol.MinTakeProfitDistance: float","summary":"Gets / sets symbol minimum take profit distance. Use MinDistanceType for interpretation.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips;\ncustomSymbol.MinTakeProfitDistance = 2;\nPrint(\"Minimum take profit distance: {0} pips\", customSymbol.MinTakeProfitDistance);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MinDistanceType = SymbolMinDistanceType.Pips\ncustomSymbol.MinTakeProfitDistance = 2\napi.Print(f\"Minimum take profit distance: {customSymbol.MinTakeProfitDistance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinTakeProfitDistance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/MinTakeProfitDistance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Name","kind":"property","name":"Name","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"string Name {get;}","python":"customSymbol.Name: str","summary":"Gets custom symbol unique name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var customSymbol in CustomSymbols)\n    Print(\"Custom symbol: {0}\", customSymbol.Name);","python":"for customSymbol in api.CustomSymbols:\n    api.Print(f\"Custom symbol: {customSymbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.PipDigits","kind":"property","name":"PipDigits","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"int PipDigits {get; set;}","python":"customSymbol.PipDigits: int","summary":"Gets / sets the symbol pip digits.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.PipDigits = 4;\nPrint(\"Pip digits: {0}\", customSymbol.PipDigits);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.PipDigits = 4\napi.Print(f\"Pip digits: {customSymbol.PipDigits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/PipDigits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/PipDigits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.PnLConversionFeeRate","kind":"property","name":"PnLConversionFeeRate","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double PnLConversionFeeRate {get; set;}","python":"customSymbol.PnLConversionFeeRate: float","summary":"Gets / sets the symbol profit and loss conversion fee rate.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.PnLConversionFeeRate = 0.0005;\nPrint(\"PnL conversion fee rate: {0}\", customSymbol.PnLConversionFeeRate);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.PnLConversionFeeRate = 0.0005\napi.Print(f\"PnL conversion fee rate: {customSymbol.PnLConversionFeeRate}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/PnLConversionFeeRate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/PnLConversionFeeRate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.QuoteAsset","kind":"property","name":"QuoteAsset","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"Asset QuoteAsset {get; set;}","python":"customSymbol.QuoteAsset: Asset","summary":"Gets / sets the symbol quote asset.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.QuoteAsset = Assets.GetAsset(\"USD\");\nPrint(\"Quote asset: {0}\", customSymbol.QuoteAsset.Name);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.QuoteAsset = api.Assets.GetAsset(\"USD\")\napi.Print(f\"Quote asset: {customSymbol.QuoteAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/QuoteAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/QuoteAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Sentiment","kind":"property","name":"Sentiment","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbolSentiment Sentiment {get;}","python":"customSymbol.Sentiment: CustomSymbolSentiment","summary":"Gets custom symbol sentiment.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbolSentiment","pythonType":"CustomSymbolSentiment","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Sentiment.BuyPercentage = 70;\ncustomSymbol.Sentiment.SellPercentage = 30;","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Sentiment.BuyPercentage = 70\ncustomSymbol.Sentiment.SellPercentage = 30"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Sentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Sentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Swap3DaysRollover","kind":"property","name":"Swap3DaysRollover","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"DayOfWeek? Swap3DaysRollover {get; set;}","python":"customSymbol.Swap3DaysRollover: DayOfWeek | None","summary":"Gets / sets the Day of the week when Symbol SWAP charge amount will be tripled.","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek?","pythonType":"DayOfWeek | None","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Swap3DaysRollover = DayOfWeek.Wednesday;\nPrint(\"Triple swap day: {0}\", customSymbol.Swap3DaysRollover);","python":"from System import DayOfWeek\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Swap3DaysRollover = DayOfWeek.Wednesday\napi.Print(f\"Triple swap day: {customSymbol.Swap3DaysRollover}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Swap3DaysRollover/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Swap3DaysRollover/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.SwapCalculationType","kind":"property","name":"SwapCalculationType","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"SymbolSwapCalculationType SwapCalculationType {get; set;}","python":"customSymbol.SwapCalculationType: SymbolSwapCalculationType","summary":"Gets / sets the symbol SWAP calculation type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSwapCalculationType","pythonType":"SymbolSwapCalculationType","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage;\nPrint(\"Swap calculation type: {0}\", customSymbol.SwapCalculationType);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage\napi.Print(f\"Swap calculation type: {customSymbol.SwapCalculationType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.SwapLong","kind":"property","name":"SwapLong","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double SwapLong {get; set;}","python":"customSymbol.SwapLong: float","summary":"Gets / sets the SWAP charge for long positions of the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips;\ncustomSymbol.SwapLong = -6.5;\nPrint(\"Swap long: {0} pips\", customSymbol.SwapLong);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips\ncustomSymbol.SwapLong = -6.5\napi.Print(f\"Swap long: {customSymbol.SwapLong} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapLong/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapLong/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.SwapPeriod","kind":"property","name":"SwapPeriod","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"int SwapPeriod {get; set;}","python":"customSymbol.SwapPeriod: int","summary":"Gets / sets symbol swap period. This is the number of days free of Administrative fee from the time of opening a position.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.SwapPeriod = 1;\nPrint(\"Swap period: {0} days\", customSymbol.SwapPeriod);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.SwapPeriod = 1\napi.Print(f\"Swap period: {customSymbol.SwapPeriod} days\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapPeriod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapPeriod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.SwapShort","kind":"property","name":"SwapShort","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double SwapShort {get; set;}","python":"customSymbol.SwapShort: float","summary":"Gets / sets the SWAP charge for short positions of the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips;\ncustomSymbol.SwapShort = 1.2;\nPrint(\"Swap short: {0} pips\", customSymbol.SwapShort);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips\ncustomSymbol.SwapShort = 1.2\napi.Print(f\"Swap short: {customSymbol.SwapShort} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapShort/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapShort/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.SwapTimeInMinutes","kind":"property","name":"SwapTimeInMinutes","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"int SwapTimeInMinutes {get; set;}","python":"customSymbol.SwapTimeInMinutes: int","summary":"Gets / sets the SWAP time in minutes.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.SwapTimeInMinutes = 22 * 60;\nPrint(\"Swap is charged at {0}\", TimeSpan.FromMinutes(customSymbol.SwapTimeInMinutes));","python":"from System import TimeSpan\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.SwapTimeInMinutes = 22 * 60\napi.Print(f\"Swap is charged at {TimeSpan.FromMinutes(customSymbol.SwapTimeInMinutes)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapTimeInMinutes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapTimeInMinutes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"Symbol Symbol {get;}","python":"customSymbol.Symbol: Symbol","summary":"Gets regular Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar symbol = customSymbol.Symbol;\nPrint(\"Regular symbol {0}, pip size {1}\", symbol.Name, symbol.PipSize);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\nsymbol = customSymbol.Symbol\napi.Print(f\"Regular symbol {symbol.Name}, pip size {symbol.PipSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.TickDigits","kind":"property","name":"TickDigits","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"int TickDigits {get; set;}","python":"customSymbol.TickDigits: int","summary":"Gets / sets the symbol tick digits.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.TickDigits = 5;\nPrint(\"Tick digits: {0}\", customSymbol.TickDigits);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.TickDigits = 5\napi.Print(f\"Tick digits: {customSymbol.TickDigits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/TickDigits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/TickDigits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.VolumeInUnitsMax","kind":"property","name":"VolumeInUnitsMax","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double VolumeInUnitsMax {get; set;}","python":"customSymbol.VolumeInUnitsMax: float","summary":"Gets / sets the maximum units value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.VolumeInUnitsMax = 10000000;\nPrint(\"Maximum volume: {0} units\", customSymbol.VolumeInUnitsMax);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.VolumeInUnitsMax = 10000000\napi.Print(f\"Maximum volume: {customSymbol.VolumeInUnitsMax} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsMax/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsMax/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.VolumeInUnitsMin","kind":"property","name":"VolumeInUnitsMin","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double VolumeInUnitsMin {get; set;}","python":"customSymbol.VolumeInUnitsMin: float","summary":"Gets / sets the minimum units value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.VolumeInUnitsMin = 1000;\nPrint(\"Minimum volume: {0} units\", customSymbol.VolumeInUnitsMin);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.VolumeInUnitsMin = 1000\napi.Print(f\"Minimum volume: {customSymbol.VolumeInUnitsMin} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsMin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsMin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.VolumeInUnitsStep","kind":"property","name":"VolumeInUnitsStep","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"double VolumeInUnitsStep {get; set;}","python":"customSymbol.VolumeInUnitsStep: float","summary":"Gets / sets the step volume in units.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.VolumeInUnitsStep = 1000;\nPrint(\"Volume step: {0} units\", customSymbol.VolumeInUnitsStep);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.VolumeInUnitsStep = 1000\napi.Print(f\"Volume step: {customSymbol.VolumeInUnitsStep} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsStep/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/VolumeInUnitsStep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbol.WeekendSwaps","kind":"property","name":"WeekendSwaps","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"bool WeekendSwaps {get; set;}","python":"customSymbol.WeekendSwaps: bool","summary":"Gets / sets whether swap is charged on weekends or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.WeekendSwaps = false;\nPrint(\"Swaps charged on weekends: {0}\", customSymbol.WeekendSwaps);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.WeekendSwaps = False\napi.Print(f\"Swaps charged on weekends: {customSymbol.WeekendSwaps}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/WeekendSwaps/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/WeekendSwaps/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.CustomSymbol.BarsUnloaded","kind":"event","name":"BarsUnloaded","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"event Action<CustomSymbolBarsUnloadedEventArgs> BarsUnloaded;","python":"customSymbol.BarsUnloaded += handler  # handler(obj: CustomSymbolBarsUnloadedEventArgs)","summary":"Occurs when a custom bars is unloaded and not being used anymore.","remarks":"Use this event to remove the unloaded custom bars to free up memory.","parameters":[],"returns":{"csharpType":"Action<CustomSymbolBarsUnloadedEventArgs>","pythonType":"Callable[[CustomSymbolBarsUnloadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsUnloaded += OnBarsUnloaded;\n}\n\nprivate void OnBarsUnloaded(CustomSymbolBarsUnloadedEventArgs args)\n{\n    var isRemoved = args.CustomSymbol.RemoveBars(args.CustomBars.TimeFrame);\n    Print(\"Unloaded {0} bars removed: {1}\", args.CustomBars.TimeFrame, isRemoved);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsUnloaded += self.on_bars_unloaded\n\ndef on_bars_unloaded(self, args):\n    isRemoved = args.CustomSymbol.RemoveBars(args.CustomBars.TimeFrame)\n    api.Print(f\"Unloaded {args.CustomBars.TimeFrame} bars removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BarsUnloaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/BarsUnloaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.CustomSymbol.NewChart","kind":"event","name":"NewChart","type":"T:cAlgo.API.CustomSymbol","namespace":"cAlgo.API","group":"Custom","csharp":"event Action<CustomSymbolNewChartEventArgs> NewChart;","python":"customSymbol.NewChart += handler  # handler(obj: CustomSymbolNewChartEventArgs)","summary":"Occurs when user opens a new chart of current custom symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CustomSymbolNewChartEventArgs>","pythonType":"Callable[[CustomSymbolNewChartEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.NewChart += OnCustomSymbolNewChart;\n}\n\nprivate void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)\n{\n    Print(\"New {0} chart opened on {1}\", args.CustomSymbol.Name, args.CustomBars.TimeFrame);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.NewChart += self.on_custom_symbol_new_chart\n\ndef on_custom_symbol_new_chart(self, args):\n    api.Print(f\"New {args.CustomSymbol.Name} chart opened on {args.CustomBars.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/NewChart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/NewChart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolBarsNeededArgs","kind":"class","name":"CustomSymbolBarsNeededArgs","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomSymbolBarsNeededArgs","python":"CustomSymbolBarsNeededArgs","summary":"Provides data for custom symbol BarsNeeded handler.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomSymbolBarsNeededArgs args)\n{\n    var bars = MarketData.GetBars(args.CustomBars.TimeFrame, \"EURUSD\");\n    args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n    Print(\"Provided {0} bars for {1}\", bars.Count, args.CustomSymbol.Name);\n}","python":"from System import Action\n\ndef on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    bars = api.MarketData.GetBars(args.CustomBars.TimeFrame, \"EURUSD\")\n    for bar in bars:\n        args.CustomBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))\n    api.Print(f\"Provided {bars.Count} bars for {args.CustomSymbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolBarsNeededArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomSymbolBarsNeededArgs","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomBars CustomBars {get;}","python":"customSymbolBarsNeededArgs.CustomBars: CustomBars","summary":"Gets custom bars.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\")).BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomSymbolBarsNeededArgs args)\n{\n    Print(\"Bars needed for time frame {0}, loaded bars: {1}\", args.CustomBars.TimeFrame, args.CustomBars.Bars.Count);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\")).BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    api.Print(f\"Bars needed for time frame {args.CustomBars.TimeFrame}, loaded bars: {args.CustomBars.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolBarsNeededArgs.CustomSymbol","kind":"property","name":"CustomSymbol","type":"T:cAlgo.API.CustomSymbolBarsNeededArgs","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomSymbol CustomSymbol {get;}","python":"customSymbolBarsNeededArgs.CustomSymbol: CustomSymbol","summary":"Gets custom symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\")).BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomSymbolBarsNeededArgs args)\n{\n    Print(\"Custom symbol {0} needs bars\", args.CustomSymbol.Name);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\")).BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    api.Print(f\"Custom symbol {args.CustomSymbol.Name} needs bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/CustomSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolBarsNeededArgs/CustomSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolBarsUnloadedEventArgs","kind":"class","name":"CustomSymbolBarsUnloadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CustomSymbolBarsUnloadedEventArgs","python":"CustomSymbolBarsUnloadedEventArgs","summary":"Provides data for custom symbol BarsUnloaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsUnloaded += OnCustomSymbolBarsUnloaded;\n}\n\nprivate void OnCustomSymbolBarsUnloaded(CustomSymbolBarsUnloadedEventArgs args)\n{\n    Print(\"{0} {1} bars were unloaded\", args.CustomSymbol.Name, args.CustomBars.TimeFrame);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsUnloaded += self.on_custom_symbol_bars_unloaded\n\ndef on_custom_symbol_bars_unloaded(self, args):\n    api.Print(f\"{args.CustomSymbol.Name} {args.CustomBars.TimeFrame} bars were unloaded\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolBarsUnloadedEventArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomSymbolBarsUnloadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomBars CustomBars {get;}","python":"customSymbolBarsUnloadedEventArgs.CustomBars: CustomBars","summary":"Gets custom bars that was unloaded.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsUnloaded += OnCustomSymbolBarsUnloaded;\n}\n\nprivate void OnCustomSymbolBarsUnloaded(CustomSymbolBarsUnloadedEventArgs args)\n{\n    args.CustomSymbol.RemoveBars(args.CustomBars.TimeFrame);\n    Print(\"Removed unloaded {0} bars\", args.CustomBars.TimeFrame);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsUnloaded += self.on_custom_symbol_bars_unloaded\n\ndef on_custom_symbol_bars_unloaded(self, args):\n    args.CustomSymbol.RemoveBars(args.CustomBars.TimeFrame)\n    api.Print(f\"Removed unloaded {args.CustomBars.TimeFrame} bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolBarsUnloadedEventArgs.CustomSymbol","kind":"property","name":"CustomSymbol","type":"T:cAlgo.API.CustomSymbolBarsUnloadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomSymbol CustomSymbol {get;}","python":"customSymbolBarsUnloadedEventArgs.CustomSymbol: CustomSymbol","summary":"Gets custom symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.BarsUnloaded += OnCustomSymbolBarsUnloaded;\n}\n\nprivate void OnCustomSymbolBarsUnloaded(CustomSymbolBarsUnloadedEventArgs args)\n{\n    Print(\"Custom symbol {0} ({1}) bars unloaded\", args.CustomSymbol.Name, args.CustomSymbol.Id);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.BarsUnloaded += self.on_custom_symbol_bars_unloaded\n\ndef on_custom_symbol_bars_unloaded(self, args):\n    api.Print(f\"Custom symbol {args.CustomSymbol.Name} ({args.CustomSymbol.Id}) bars unloaded\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/CustomSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolBarsUnloadedEventArgs/CustomSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolFuturesSettings","kind":"class","name":"CustomSymbolFuturesSettings","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomSymbolFuturesSettings","python":"CustomSymbolFuturesSettings","summary":"Represents a custom symbol futures settings.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYGOLD.Z25\", Symbols.GetSymbol(\"XAUUSD\"));\ncustomSymbol.FuturesSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22, 0, 0, 0), 500);\nPrint(\"Contract expires at {0}\", customSymbol.FuturesSettings.ExpirationTime);","python":"from System import DateTime\ncustomSymbol = api.CustomSymbols.Add(\"MYGOLD.Z25\", api.Symbols.GetSymbol(\"XAUUSD\"))\ncustomSymbol.FuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22, 0, 0, 0), 500)\napi.Print(f\"Contract expires at {customSymbol.FuturesSettings.ExpirationTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbolFuturesSettings.#ctor(System.DateTime,System.DateTime,System.Nullable{System.Double})","kind":"constructor","name":"CustomSymbolFuturesSettings","type":"T:cAlgo.API.CustomSymbolFuturesSettings","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomSymbolFuturesSettings(DateTime lastTradeTime, DateTime expirationTime, double? maintenanceMargin)","python":"CustomSymbolFuturesSettings(lastTradeTime: DateTime, expirationTime: DateTime, maintenanceMargin: float | None)","summary":"Creates a new custom symbol futures settings.","remarks":null,"parameters":[{"name":"lastTradeTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Last contract trade time"},{"name":"expirationTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Contract expiration time"},{"name":"maintenanceMargin","csharpType":"double?","pythonType":"float | None","summary":"Amount of maintenance margin"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var futuresSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22, 0, 0, 0), null);\nPrint(\"Last trade time: {0}, maintenance margin: {1}\", futuresSettings.LastTradeTime, futuresSettings.MaintenanceMargin);","python":"from System import DateTime\nfuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22, 0, 0, 0), None)\napi.Print(f\"Last trade time: {futuresSettings.LastTradeTime}, maintenance margin: {futuresSettings.MaintenanceMargin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolFuturesSettings.ExpirationTime","kind":"property","name":"ExpirationTime","type":"T:cAlgo.API.CustomSymbolFuturesSettings","namespace":"cAlgo.API","group":"Custom","csharp":"public DateTime ExpirationTime {get;}","python":"customSymbolFuturesSettings.ExpirationTime: DateTime","summary":"Gets the expiration time of future contract.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var futuresSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22), 500);\nPrint(\"Days to expiration: {0}\", (futuresSettings.ExpirationTime - Server.Time).TotalDays);","python":"from System import DateTime\nfuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22), 500)\napi.Print(f\"Days to expiration: {(futuresSettings.ExpirationTime - api.Server.Time).TotalDays}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/ExpirationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/ExpirationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolFuturesSettings.LastTradeTime","kind":"property","name":"LastTradeTime","type":"T:cAlgo.API.CustomSymbolFuturesSettings","namespace":"cAlgo.API","group":"Custom","csharp":"public DateTime LastTradeTime {get;}","python":"customSymbolFuturesSettings.LastTradeTime: DateTime","summary":"Gets the last trade time of future contract.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var futuresSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22), 500);\nPrint(\"Last trade time: {0}\", futuresSettings.LastTradeTime);","python":"from System import DateTime\nfuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22), 500)\napi.Print(f\"Last trade time: {futuresSettings.LastTradeTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/LastTradeTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/LastTradeTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolFuturesSettings.MaintenanceMargin","kind":"property","name":"MaintenanceMargin","type":"T:cAlgo.API.CustomSymbolFuturesSettings","namespace":"cAlgo.API","group":"Custom","csharp":"public double? MaintenanceMargin {get;}","python":"customSymbolFuturesSettings.MaintenanceMargin: float | None","summary":"The amount of quote asset that will be taken as a margin per one traded lot.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var futuresSettings = new CustomSymbolFuturesSettings(new DateTime(2025, 12, 19, 20, 0, 0), new DateTime(2025, 12, 22), 500);\nif (futuresSettings.MaintenanceMargin.HasValue)\n    Print(\"Maintenance margin per lot: {0}\", futuresSettings.MaintenanceMargin.Value);","python":"from System import DateTime\nfuturesSettings = CustomSymbolFuturesSettings(DateTime(2025, 12, 19, 20, 0, 0), DateTime(2025, 12, 22), 500)\nif futuresSettings.MaintenanceMargin is not None:\n    api.Print(f\"Maintenance margin per lot: {futuresSettings.MaintenanceMargin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/MaintenanceMargin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolFuturesSettings/MaintenanceMargin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolLeverageTier","kind":"class","name":"CustomSymbolLeverageTier","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomSymbolLeverageTier","python":"CustomSymbolLeverageTier","summary":"Custom symbol tier of dynamic leverage.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.DynamicLeverage.Clear();\ncustomSymbol.DynamicLeverage.Add(new CustomSymbolLeverageTier(1000000, 500));\ncustomSymbol.DynamicLeverage.Add(new CustomSymbolLeverageTier(5000000, 100));\nPrint(\"Leverage tiers: {0}\", customSymbol.DynamicLeverage.Count);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.DynamicLeverage.Clear()\ncustomSymbol.DynamicLeverage.Add(CustomSymbolLeverageTier(1000000, 500))\ncustomSymbol.DynamicLeverage.Add(CustomSymbolLeverageTier(5000000, 100))\napi.Print(f\"Leverage tiers: {customSymbol.DynamicLeverage.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbolLeverageTier.#ctor(System.Double,System.Double)","kind":"constructor","name":"CustomSymbolLeverageTier","type":"T:cAlgo.API.CustomSymbolLeverageTier","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomSymbolLeverageTier(double volume, double leverage)","python":"CustomSymbolLeverageTier(volume: float, leverage: float)","summary":"Creates a new custom symbol leverage tier.","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume"},{"name":"leverage","csharpType":"double","pythonType":"float","summary":"Leverage"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var tier = new CustomSymbolLeverageTier(1000000, 500);\nPrint(\"Up to {0} volume the leverage is 1:{1}\", tier.Volume, tier.Leverage);","python":"tier = CustomSymbolLeverageTier(1000000, 500)\napi.Print(f\"Up to {tier.Volume} volume the leverage is 1:{tier.Leverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolLeverageTier.Leverage","kind":"property","name":"Leverage","type":"T:cAlgo.API.CustomSymbolLeverageTier","namespace":"cAlgo.API","group":"Custom","csharp":"public double Leverage {get;}","python":"customSymbolLeverageTier.Leverage: float","summary":"Leverage of dynamic leverage tier.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var tier = new CustomSymbolLeverageTier(1000000, 500);\nPrint(\"Tier leverage: 1:{0}\", tier.Leverage);","python":"tier = CustomSymbolLeverageTier(1000000, 500)\napi.Print(f\"Tier leverage: 1:{tier.Leverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Leverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Leverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolLeverageTier.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.CustomSymbolLeverageTier","namespace":"cAlgo.API","group":"Custom","csharp":"public double Volume {get;}","python":"customSymbolLeverageTier.Volume: float","summary":"Volume of dynamic leverage tier.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var tier = new CustomSymbolLeverageTier(1000000, 500);\nPrint(\"Tier volume: {0}\", tier.Volume);","python":"tier = CustomSymbolLeverageTier(1000000, 500)\napi.Print(f\"Tier volume: {tier.Volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolLeverageTier/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolMarketHours","kind":"interface","name":"CustomSymbolMarketHours","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomSymbolMarketHours","python":"CustomSymbolMarketHours","summary":"Access to custom symbol's trading sessions schedule.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar marketHours = customSymbol.MarketHours;\nmarketHours.Sessions.Clear();\nmarketHours.Sessions.Add(new CustomSymbolTradingSession(DayOfWeek.Sunday, DayOfWeek.Friday, new TimeSpan(22, 0, 0), new TimeSpan(21, 59, 0)));\nmarketHours.Holidays.Add(new CustomSymbolTradingHoliday(\"New Year\", new DateTime(2026, 1, 1), new DateTime(2026, 1, 2), true));","python":"from System import DayOfWeek, TimeSpan, DateTime\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\nmarketHours = customSymbol.MarketHours\nmarketHours.Sessions.Clear()\nmarketHours.Sessions.Add(CustomSymbolTradingSession(DayOfWeek.Sunday, DayOfWeek.Friday, TimeSpan(22, 0, 0), TimeSpan(21, 59, 0)))\nmarketHours.Holidays.Add(CustomSymbolTradingHoliday(\"New Year\", DateTime(2026, 1, 1), DateTime(2026, 1, 2), True))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolMarketHours.Holidays","kind":"property","name":"Holidays","type":"T:cAlgo.API.CustomSymbolMarketHours","namespace":"cAlgo.API","group":"Custom","csharp":"ICollection<CustomSymbolTradingHoliday> Holidays {get;}","python":"customSymbolMarketHours.Holidays: Sequence[CustomSymbolTradingHoliday]","summary":"Collection of all symbol's trading holidays","remarks":null,"parameters":[],"returns":{"csharpType":"ICollection<CustomSymbolTradingHoliday>","pythonType":"Sequence[CustomSymbolTradingHoliday]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.MarketHours.Holidays.Add(new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true));\nforeach (var holiday in customSymbol.MarketHours.Holidays)\n    Print(\"Holiday: {0} from {1} to {2}\", holiday.Name, holiday.StartTime, holiday.EndTime);","python":"from System import DateTime\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.MarketHours.Holidays.Add(CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True))\nfor holiday in customSymbol.MarketHours.Holidays:\n    api.Print(f\"Holiday: {holiday.Name} from {holiday.StartTime} to {holiday.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/Holidays/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/Holidays/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolMarketHours.Sessions","kind":"property","name":"Sessions","type":"T:cAlgo.API.CustomSymbolMarketHours","namespace":"cAlgo.API","group":"Custom","csharp":"ICollection<CustomSymbolTradingSession> Sessions {get;}","python":"customSymbolMarketHours.Sessions: Sequence[CustomSymbolTradingSession]","summary":"Collection of all symbol's trading sessions","remarks":null,"parameters":[],"returns":{"csharpType":"ICollection<CustomSymbolTradingSession>","pythonType":"Sequence[CustomSymbolTradingSession]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nforeach (var session in customSymbol.MarketHours.Sessions)\n    Print(\"Session: {0} {1} - {2} {3}\", session.StartDay, session.StartTime, session.EndDay, session.EndTime);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\nfor session in customSymbol.MarketHours.Sessions:\n    api.Print(f\"Session: {session.StartDay} {session.StartTime} - {session.EndDay} {session.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/Sessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolMarketHours/Sessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolNewChartEventArgs","kind":"class","name":"CustomSymbolNewChartEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CustomSymbolNewChartEventArgs","python":"CustomSymbolNewChartEventArgs","summary":"Provides data for custom symbol NewChart event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.NewChart += OnCustomSymbolNewChart;\n}\n\nprivate void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)\n{\n    Print(\"New {0} chart opened for {1}, custom bars available: {2}\", args.Chart.TimeFrame, args.CustomSymbol.Name, args.CustomBars != null);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.NewChart += self.on_custom_symbol_new_chart\n\ndef on_custom_symbol_new_chart(self, args):\n    api.Print(f\"New {args.Chart.TimeFrame} chart opened for {args.CustomSymbol.Name}, custom bars available: {args.CustomBars is not None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolNewChartEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.CustomSymbolNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"customSymbolNewChartEventArgs.Chart: Chart","summary":"Chart that is newly opened or switched to custom symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.NewChart += OnCustomSymbolNewChart;\n}\n\nprivate void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)\n{\n    args.Chart.DrawStaticText(\"info\", \"Custom symbol chart\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.NewChart += self.on_custom_symbol_new_chart\n\ndef on_custom_symbol_new_chart(self, args):\n    args.Chart.DrawStaticText(\"info\", \"Custom symbol chart\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolNewChartEventArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomSymbolNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomBars CustomBars {get;}","python":"customSymbolNewChartEventArgs.CustomBars: CustomBars","summary":"Gets custom bars for the newly opened custom symbol chart.","remarks":"It will be null if chart TimeFrame is custom.","parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.NewChart += OnCustomSymbolNewChart;\n}\n\nprivate void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)\n{\n    if (args.CustomBars == null)\n        return;\n    args.CustomBars.AppendBar(new CustomBar(Server.Time, 1.1, 1.2, 1.0, 1.15, 100));\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.NewChart += self.on_custom_symbol_new_chart\n\ndef on_custom_symbol_new_chart(self, args):\n    if args.CustomBars is None:\n        return\n    args.CustomBars.AppendBar(CustomBar(api.Server.Time, 1.1, 1.2, 1.0, 1.15, 100))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolNewChartEventArgs.CustomSymbol","kind":"property","name":"CustomSymbol","type":"T:cAlgo.API.CustomSymbolNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomSymbol CustomSymbol {get;}","python":"customSymbolNewChartEventArgs.CustomSymbol: CustomSymbol","summary":"Gets custom symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customSymbol = CustomSymbols.Add(\"EURUSD.custom\", Symbols.GetSymbol(\"EURUSD\"));\n    customSymbol.NewChart += OnCustomSymbolNewChart;\n}\n\nprivate void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)\n{\n    Print(\"Chart opened for custom symbol {0}, pip digits: {1}\", args.CustomSymbol.Name, args.CustomSymbol.PipDigits);\n}","python":"def on_start(self):\n    customSymbol = api.CustomSymbols.Add(\"EURUSD.custom\", api.Symbols.GetSymbol(\"EURUSD\"))\n    customSymbol.NewChart += self.on_custom_symbol_new_chart\n\ndef on_custom_symbol_new_chart(self, args):\n    api.Print(f\"Chart opened for custom symbol {args.CustomSymbol.Name}, pip digits: {args.CustomSymbol.PipDigits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolSentiment","kind":"interface","name":"CustomSymbolSentiment","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomSymbolSentiment","python":"CustomSymbolSentiment","summary":"Represents a custom symbol sentiment.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Sentiment.BuyPercentage = 62;\ncustomSymbol.Sentiment.SellPercentage = 38;\nPrint(\"Sentiment: {0}% buy, {1}% sell\", customSymbol.Sentiment.BuyPercentage, customSymbol.Sentiment.SellPercentage);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Sentiment.BuyPercentage = 62\ncustomSymbol.Sentiment.SellPercentage = 38\napi.Print(f\"Sentiment: {customSymbol.Sentiment.BuyPercentage}% buy, {customSymbol.Sentiment.SellPercentage}% sell\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolSentiment.BuyPercentage","kind":"property","name":"BuyPercentage","type":"T:cAlgo.API.CustomSymbolSentiment","namespace":"cAlgo.API","group":"Custom","csharp":"double BuyPercentage {get; set;}","python":"customSymbolSentiment.BuyPercentage: float","summary":"Gets / sets buy percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Sentiment.BuyPercentage = 55;\nPrint(\"Buy percentage: {0}\", customSymbol.Sentiment.BuyPercentage);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Sentiment.BuyPercentage = 55\napi.Print(f\"Buy percentage: {customSymbol.Sentiment.BuyPercentage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/BuyPercentage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/BuyPercentage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolSentiment.SellPercentage","kind":"property","name":"SellPercentage","type":"T:cAlgo.API.CustomSymbolSentiment","namespace":"cAlgo.API","group":"Custom","csharp":"double SellPercentage {get; set;}","python":"customSymbolSentiment.SellPercentage: float","summary":"Gets / sets sell percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\ncustomSymbol.Sentiment.SellPercentage = 45;\nPrint(\"Sell percentage: {0}\", customSymbol.Sentiment.SellPercentage);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\ncustomSymbol.Sentiment.SellPercentage = 45\napi.Print(f\"Sell percentage: {customSymbol.Sentiment.SellPercentage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/SellPercentage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/SellPercentage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolTradingHoliday","kind":"class","name":"CustomSymbolTradingHoliday","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomSymbolTradingHoliday","python":"CustomSymbolTradingHoliday","summary":"Represents a custom symbol trading holiday.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar holiday = new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);\ncustomSymbol.MarketHours.Holidays.Add(holiday);\nPrint(\"Added holiday {0}, recurring: {1}\", holiday.Name, holiday.IsRecurring);","python":"from System import DateTime\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\nholiday = CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)\ncustomSymbol.MarketHours.Holidays.Add(holiday)\napi.Print(f\"Added holiday {holiday.Name}, recurring: {holiday.IsRecurring}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbolTradingHoliday.#ctor(System.String,System.DateTime,System.DateTime,System.Boolean)","kind":"constructor","name":"CustomSymbolTradingHoliday","type":"T:cAlgo.API.CustomSymbolTradingHoliday","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring)","python":"CustomSymbolTradingHoliday(name: str, startTime: DateTime, endTime: DateTime, isRecurring: bool)","summary":"Creates a new custom symbol trading holiday.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Holiday name"},{"name":"startTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Holiday start time"},{"name":"endTime","csharpType":"DateTime","pythonType":"DateTime","summary":"Holiday end time"},{"name":"isRecurring","csharpType":"bool","pythonType":"bool","summary":"Is recurring?"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var holiday = new CustomSymbolTradingHoliday(\"Exchange Maintenance\", new DateTime(2025, 6, 7, 0, 0, 0), new DateTime(2025, 6, 7, 6, 0, 0), false);\nPrint(\"{0}: {1} - {2}\", holiday.Name, holiday.StartTime, holiday.EndTime);","python":"from System import DateTime\nholiday = CustomSymbolTradingHoliday(\"Exchange Maintenance\", DateTime(2025, 6, 7, 0, 0, 0), DateTime(2025, 6, 7, 6, 0, 0), False)\napi.Print(f\"{holiday.Name}: {holiday.StartTime} - {holiday.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingHoliday.EndTime","kind":"property","name":"EndTime","type":"T:cAlgo.API.CustomSymbolTradingHoliday","namespace":"cAlgo.API","group":"Custom","csharp":"public DateTime EndTime {get;}","python":"customSymbolTradingHoliday.EndTime: DateTime","summary":"Gets the end date and time of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var holiday = new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);\nPrint(\"Holiday ends at {0}, duration {1} hours\", holiday.EndTime, (holiday.EndTime - holiday.StartTime).TotalHours);","python":"from System import DateTime\nholiday = CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)\napi.Print(f\"Holiday ends at {holiday.EndTime}, duration {(holiday.EndTime - holiday.StartTime).TotalHours} hours\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/EndTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/EndTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingHoliday.IsRecurring","kind":"property","name":"IsRecurring","type":"T:cAlgo.API.CustomSymbolTradingHoliday","namespace":"cAlgo.API","group":"Custom","csharp":"public bool IsRecurring {get;}","python":"customSymbolTradingHoliday.IsRecurring: bool","summary":"Gets a value indicating whether the trading holiday is recurring.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var holiday = new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);\nPrint(\"Repeats every year: {0}\", holiday.IsRecurring);","python":"from System import DateTime\nholiday = CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)\napi.Print(f\"Repeats every year: {holiday.IsRecurring}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/IsRecurring/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/IsRecurring/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingHoliday.Name","kind":"property","name":"Name","type":"T:cAlgo.API.CustomSymbolTradingHoliday","namespace":"cAlgo.API","group":"Custom","csharp":"public string Name {get;}","python":"customSymbolTradingHoliday.Name: str","summary":"Gets the name of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var holiday = new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);\nPrint(\"Holiday name: {0}\", holiday.Name);","python":"from System import DateTime\nholiday = CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)\napi.Print(f\"Holiday name: {holiday.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingHoliday.StartTime","kind":"property","name":"StartTime","type":"T:cAlgo.API.CustomSymbolTradingHoliday","namespace":"cAlgo.API","group":"Custom","csharp":"public DateTime StartTime {get;}","python":"customSymbolTradingHoliday.StartTime: DateTime","summary":"Gets the start date and time of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var holiday = new CustomSymbolTradingHoliday(\"Christmas\", new DateTime(2025, 12, 25), new DateTime(2025, 12, 26), true);\nPrint(\"Holiday starts at {0}\", holiday.StartTime);","python":"from System import DateTime\nholiday = CustomSymbolTradingHoliday(\"Christmas\", DateTime(2025, 12, 25), DateTime(2025, 12, 26), True)\napi.Print(f\"Holiday starts at {holiday.StartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/StartTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingHoliday/StartTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbolTradingSession","kind":"class","name":"CustomSymbolTradingSession","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomSymbolTradingSession","python":"CustomSymbolTradingSession","summary":"Custom symbol trading session schedule.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nvar session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));\ncustomSymbol.MarketHours.Sessions.Clear();\ncustomSymbol.MarketHours.Sessions.Add(session);","python":"from System import DayOfWeek, TimeSpan\ncustomSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\nsession = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))\ncustomSymbol.MarketHours.Sessions.Clear()\ncustomSymbol.MarketHours.Sessions.Add(session)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbolTradingSession.#ctor(System.DayOfWeek,System.DayOfWeek,System.TimeSpan,System.TimeSpan)","kind":"constructor","name":"CustomSymbolTradingSession","type":"T:cAlgo.API.CustomSymbolTradingSession","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomSymbolTradingSession(DayOfWeek startDay, DayOfWeek endDay, TimeSpan startTime, TimeSpan endTime)","python":"CustomSymbolTradingSession(startDay: DayOfWeek, endDay: DayOfWeek, startTime: TimeSpan, endTime: TimeSpan)","summary":"Creates a new custom symbol trading session.","remarks":null,"parameters":[{"name":"startDay","csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"Start day"},{"name":"endDay","csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"End day"},{"name":"startTime","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"Start time"},{"name":"endTime","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"End time"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var session = new CustomSymbolTradingSession(DayOfWeek.Sunday, DayOfWeek.Friday, new TimeSpan(22, 0, 0), new TimeSpan(21, 0, 0));\nPrint(\"Session: {0} {1} - {2} {3}\", session.StartDay, session.StartTime, session.EndDay, session.EndTime);","python":"from System import DayOfWeek, TimeSpan\nsession = CustomSymbolTradingSession(DayOfWeek.Sunday, DayOfWeek.Friday, TimeSpan(22, 0, 0), TimeSpan(21, 0, 0))\napi.Print(f\"Session: {session.StartDay} {session.StartTime} - {session.EndDay} {session.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingSession.EndDay","kind":"property","name":"EndDay","type":"T:cAlgo.API.CustomSymbolTradingSession","namespace":"cAlgo.API","group":"Custom","csharp":"public DayOfWeek EndDay {get;}","python":"customSymbolTradingSession.EndDay: DayOfWeek","summary":"Day of week when trading session ends","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));\nPrint(\"Session ends on {0}\", session.EndDay);","python":"from System import DayOfWeek, TimeSpan\nsession = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))\napi.Print(f\"Session ends on {session.EndDay}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/EndDay/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/EndDay/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingSession.EndTime","kind":"property","name":"EndTime","type":"T:cAlgo.API.CustomSymbolTradingSession","namespace":"cAlgo.API","group":"Custom","csharp":"public TimeSpan EndTime {get;}","python":"customSymbolTradingSession.EndTime: TimeSpan","summary":"Time when trading session ends","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));\nPrint(\"Session closes at {0}\", session.EndTime);","python":"from System import DayOfWeek, TimeSpan\nsession = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))\napi.Print(f\"Session closes at {session.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/EndTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/EndTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingSession.StartDay","kind":"property","name":"StartDay","type":"T:cAlgo.API.CustomSymbolTradingSession","namespace":"cAlgo.API","group":"Custom","csharp":"public DayOfWeek StartDay {get;}","python":"customSymbolTradingSession.StartDay: DayOfWeek","summary":"Day of week when trading session starts","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));\nPrint(\"Session starts on {0}\", session.StartDay);","python":"from System import DayOfWeek, TimeSpan\nsession = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))\napi.Print(f\"Session starts on {session.StartDay}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/StartDay/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/StartDay/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomSymbolTradingSession.StartTime","kind":"property","name":"StartTime","type":"T:cAlgo.API.CustomSymbolTradingSession","namespace":"cAlgo.API","group":"Custom","csharp":"public TimeSpan StartTime {get;}","python":"customSymbolTradingSession.StartTime: TimeSpan","summary":"Time when trading session starts","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));\nPrint(\"Session opens at {0}\", session.StartTime);","python":"from System import DayOfWeek, TimeSpan\nsession = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))\napi.Print(f\"Session opens at {session.StartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/StartTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/StartTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomSymbols","kind":"interface","name":"CustomSymbols","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomSymbols","python":"CustomSymbols","summary":"Represents collection of custom symbols.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing cAlgo.API.Internals;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class CustomSymbolTest : Plugin\n{\n    private const string InitialDescription = \"This is custom symbol initial description\";\n    private const string ChangedDescription = \"This is custom symbol changed description\";\n\n    private bool _isLoadMoreEnabled = true;\n\n    private CustomSymbol _customSymbol;\n    private CustomBars _customBars;\n\n    protected override void OnStart()\n    {\n        var panel = new StackPanel();\n\n        var addCustomSymbolWithBaseButton = new Button { Text = \"Add custom symbol with Base Symbol\" };\n\n        addCustomSymbolWithBaseButton.Click += OnAddCustomSymbolWithBaseButtonClick;\n\n        panel.AddChild(addCustomSymbolWithBaseButton);\n\n        var addCustomSymbolWithoutBaseButton = new Button { Text = \"Add custom symbol without Base Symbol\" };\n\n        addCustomSymbolWithoutBaseButton.Click += OnAddCustomSymbolWithoutBaseButtonClick;\n\n        panel.AddChild(addCustomSymbolWithoutBaseButton);\n\n        var removeCustomSymbolButton = new Button { Text = \"Remove custom symbol\" };\n\n        removeCustomSymbolButton.Click += OnRemoveCustomSymbolButtonClick;\n\n        panel.AddChild(removeCustomSymbolButton);\n\n        var displayChartInfoButton = new Button { Text = \"Display Charts Info\" };\n\n        displayChartInfoButton.Click += OnDisplayChartInfoButtonClick;\n\n        panel.AddChild(displayChartInfoButton);\n\n        var changeDescriptionButton = new Button { Text = \"Change Description\" };\n\n        changeDescriptionButton.Click += OnChangeDescriptionButtonClick;\n\n        panel.AddChild(changeDescriptionButton);\n\n        var updateSymbolPropertiesButton = new Button { Text = \"Update Symbol Properties\" };\n\n        updateSymbolPropertiesButton.Click += OnUpdateSymbolPropertiesButtonClick;\n\n        panel.AddChild(updateSymbolPropertiesButton);\n\n        var updateSymbolBaseAssetButton = new Button { Text = \"Update Symbol Base Asset\" };\n\n        updateSymbolBaseAssetButton.Click += OnUpdateSymbolBaseAssetButtonClick;\n\n        panel.AddChild(updateSymbolBaseAssetButton);\n\n        var updateSymbolQuoteAssetButton = new Button { Text = \"Update Symbol Quote Asset\" };\n\n        updateSymbolQuoteAssetButton.Click += OnUpdateSymbolQuoteAssetButtonClick;\n\n        panel.AddChild(updateSymbolQuoteAssetButton);\n\n        var showSymbolPropertiesButton = new Button { Text = \"Show Symbol Properties\" };\n\n        showSymbolPropertiesButton.Click += args => ShowSymbolProperties();\n\n        panel.AddChild(showSymbolPropertiesButton);\n\n        var showSymbolAssetsButton = new Button { Text = \"Show Symbol Assets\" };\n\n        showSymbolAssetsButton.Click += args => ShowSymbolAssets();\n\n        panel.AddChild(showSymbolAssetsButton);\n\n        var pauseOrResumeLoadMoreButton = new Button { Text = \"Pause / Resume Load More\" };\n        pauseOrResumeLoadMoreButton.Click += OnPauseOrResumeLoadMoreButtonClick;\n\n        panel.AddChild(pauseOrResumeLoadMoreButton);\n\n        var showRegularBarsInfoButton = new Button { Text = \"Show Regular Bars Info\" };\n        showRegularBarsInfoButton.Click += OnShowRegularBarsInfoButtonClick;\n\n        panel.AddChild(showRegularBarsInfoButton);\n\n        var addBarsButton = new Button { Text = \"Add Bars For Active Chart Symbol\" };\n        addBarsButton.Click += OnAddBarsButtonClick;\n\n        panel.AddChild(addBarsButton);\n\n        var removeBarsButton = new Button { Text = \"Remove Bars For Active Chart Symbol\" };\n        removeBarsButton.Click += OnRemoveBarsButtonClick;\n\n        panel.AddChild(removeBarsButton);\n\n        var updateLastBarButton = new Button { Text = \"Update Last Bar\" };\n        updateLastBarButton.Click += OnUpdateLastBarButtonClick;\n\n        panel.AddChild(updateLastBarButton);\n\n        var updateSymbolSentimentButton = new Button { Text = \"Update Symbol Sentiment\" };\n\n        updateSymbolSentimentButton.Click += OnUpdateSymbolSentimentButtonClick;\n\n        panel.AddChild(updateSymbolSentimentButton);\n\n        var showSymbolSentimentButton = new Button { Text = \"Show Symbol Sentiment\" };\n\n        showSymbolSentimentButton.Click += _ => ShowSymbolSentiment();\n\n        panel.AddChild(showSymbolSentimentButton);\n\n        var updateSymbolDynamicLeverageButton = new Button { Text = \"Update Symbol Dynamic Leverage\" };\n\n        updateSymbolDynamicLeverageButton.Click += OnUpdateSymbolDynamicLeverageButtonClick;\n\n        panel.AddChild(updateSymbolDynamicLeverageButton);\n\n        var showSymbolDynamicLeverageButton = new Button { Text = \"Show Symbol Dynamic Leverage\" };\n\n        showSymbolDynamicLeverageButton.Click += _ => ShowSymbolDynamicLeverage();\n\n        panel.AddChild(showSymbolDynamicLeverageButton);\n\n        var updateSymbolHolidaysButton = new Button { Text = \"Update Symbol Holidays\" };\n\n        updateSymbolHolidaysButton.Click += OnUpdateSymbolHolidaysButtonClick;\n\n        panel.AddChild(updateSymbolHolidaysButton);\n\n        var showSymbolHolidaysButton = new Button { Text = \"Show Symbol Holidays\" };\n\n        showSymbolHolidaysButton.Click += OnShowSymbolHolidaysButtonClick;\n\n        panel.AddChild(showSymbolHolidaysButton);\n\n        var updateSymbolSessionsButton = new Button { Text = \"Update Symbol Sessions\" };\n\n        updateSymbolSessionsButton.Click += OnUpdateSymbolSessionsButtonClick;\n\n        panel.AddChild(updateSymbolSessionsButton);\n\n        var showSymbolSessionsButton = new Button { Text = \"Show Symbol Sessions\" };\n\n        showSymbolSessionsButton.Click += OnShowSymbolSessionsButtonClick;\n\n        panel.AddChild(showSymbolSessionsButton);\n\n        var updateSymbolFuturesSettingsButton = new Button { Text = \"Update Symbol Futures Settings\" };\n\n        updateSymbolFuturesSettingsButton.Click += OnUpdateSymbolFuturesSettingsButtonClick;\n\n        panel.AddChild(updateSymbolFuturesSettingsButton);\n\n        var showSymbolFuturesSettingsButton = new Button { Text = \"Show Symbol Futures Settings\" };\n\n        showSymbolFuturesSettingsButton.Click += OnShowSymbolFuturesSettingsButtonClick;\n\n        panel.AddChild(showSymbolFuturesSettingsButton);\n\n        var block = Asp.SymbolTab.AddBlock(\"Custom symbol Test\");\n        block.Child = panel;\n        block.Height = 550;\n\n        ChartManager.FramesAdded += OnChartManagerFramesAdded;\n\n        Symbols.Added += OnSymbolAdded;\n        Symbols.Removed += OnSymbolRemoved;\n    }\n\n    private void OnShowSymbolFuturesSettingsButtonClick(ButtonClickEventArgs obj)\n    {\n        Print($\"Last Trade Time: {_customSymbol.Symbol.FuturesSettings.LastTradeTime} | Expiration Time: {_customSymbol.Symbol.FuturesSettings.ExpirationTime} | Maintenance Margin: {_customSymbol.Symbol.FuturesSettings.MaintenanceMargin}\");\n    }\n\n    private void OnUpdateSymbolFuturesSettingsButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.FuturesSettings = new CustomSymbolFuturesSettings(Server.Time, Server.Time.AddMonths(Random.Shared.Next(1, 10)), Random.Shared.NextDouble() * 100 + 1000);\n    }\n\n    private void OnShowSymbolSessionsButtonClick(ButtonClickEventArgs obj)\n    {\n        Print($\"Sessions Count: {_customSymbol.Symbol.MarketHours.Sessions.Count}\");\n\n        foreach (var session in _customSymbol.Symbol.MarketHours.Sessions)\n        {\n            Print($\"Start Day: {session.StartDay} | End Day: {session.EndDay} | Start Time: {session.StartTime} | End Time: {session.EndTime}\");\n        }\n    }\n\n    private void OnUpdateSymbolSessionsButtonClick(ButtonClickEventArgs obj)\n    {\n        var startDay = (DayOfWeek)Random.Shared.Next(0, 6);\n        var endDay = (DayOfWeek)((int)startDay + 1);\n        var startTime = TimeSpan.FromHours(Random.Shared.Next(0, 22));\n        var endTime = startTime.Add(TimeSpan.FromHours(1));\n\n        _customSymbol.MarketHours.Sessions.Add(new CustomSymbolTradingSession(startDay, endDay, startTime, endTime));\n    }\n\n    private void OnShowSymbolHolidaysButtonClick(ButtonClickEventArgs obj)\n    {\n        Print($\"Holidays Count: {_customSymbol.Symbol.MarketHours.Holidays.Count}\");\n\n        foreach (var holiday in _customSymbol.Symbol.MarketHours.Holidays)\n        {\n            Print($\"Name: {holiday.Name} | Start: {holiday.StartTime:o} | End: {holiday.EndTime:o} | Is Recurring: {holiday.IsRecurring}\");\n        }\n    }\n\n    private void OnUpdateSymbolHolidaysButtonClick(ButtonClickEventArgs obj)\n    {\n        var startTime = Server.Time.AddMonths(Random.Shared.Next(1, 3));\n        var endTime = startTime.AddDays(1);\n        var isRecurring = Random.Shared.Next(0, 1) > 0;\n\n        _customSymbol.MarketHours.Holidays.Add(new CustomSymbolTradingHoliday(\"Test \" + Random.Shared.Next().ToString(), startTime, endTime, isRecurring));\n    }\n\n    private void ShowSymbolDynamicLeverage()\n    {\n        Print($\"Dynamic Leverage Count: {_customSymbol.Symbol.DynamicLeverage.Count}\");\n\n        foreach (var leverage in _customSymbol.Symbol.DynamicLeverage)\n        {\n            Print($\"Volume: {leverage.Volume} | Leverage: {leverage.Leverage}\");\n        }\n    }\n\n    private void OnUpdateSymbolDynamicLeverageButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.DynamicLeverage.Add(new CustomSymbolLeverageTier(Random.Shared.NextDouble() * 100 + 1000, 100 + Random.Shared.Next(0, 100)));\n    }\n\n    private void OnUpdateSymbolSentimentButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.Sentiment.BuyPercentage = _customSymbol.Sentiment.BuyPercentage < 99 ? _customSymbol.Sentiment.BuyPercentage + 1 : _customSymbol.Sentiment.BuyPercentage - 1;\n    }\n\n    private void ShowSymbolSentiment()\n    {\n        Print($\"Buy: {_customSymbol.Symbol.Sentiment.BuyPercentage} | Sell: {_customSymbol.Symbol.Sentiment.SellPercentage}\");\n    }\n\n    private void OnSymbolAdded(SymbolAddedEventArgs args)\n    {\n        Print($\"Symbol Added: {args.SymbolName}\");\n    }\n\n    private void OnSymbolRemoved(SymbolRemovedEventArgs args)\n    {\n        Print($\"Symbol Removed: {args.SymbolName}\");\n    }\n\n    private void OnChartManagerFramesAdded(FramesAddedEventArgs obj)\n    {\n        if (obj.AddedFrames[0] is not ChartFrame chartFrame)\n            return;\n\n        Print($\"New chart frame added, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\");\n    }\n\n    private void OnUpdateLastBarButtonClick(ButtonClickEventArgs obj)\n    {\n        var changeAmount = (_customBars.Bars.LastBar.High - _customBars.Bars.LastBar.Low) * (Random.Shared.NextDouble() + 0.5) * 2;\n\n        Print($\"Changing Last Bar: {_customBars.Bars.LastBar} | change: {changeAmount}\");\n\n        _customBars.UpdateLastBar(_customBars.Bars.LastBar.Open, _customBars.Bars.LastBar.Open + changeAmount, _customBars.Bars.LastBar.Open - changeAmount, _customBars.Bars.LastBar.Close + changeAmount, (int)_customBars.Bars.LastBar.TickVolume + 1);\n    }\n\n    private void OnRemoveCustomSymbolButtonClick(ButtonClickEventArgs obj)\n    {\n        if (!CustomSymbols.Remove(_customSymbol))\n            return;\n\n        Print($\"custom symbol '{_customSymbol.Name}' has been removed.\");\n\n        _customSymbol = null;\n    }\n\n    private void OnUpdateSymbolBaseAssetButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.BaseAsset = Assets.GetAsset(Assets.First(a => a != _customSymbol.BaseAsset.Name && a != _customSymbol.QuoteAsset.Name));\n\n        ShowSymbolAssets();\n    }\n\n    private void OnUpdateSymbolQuoteAssetButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.QuoteAsset = Assets.GetAsset(Assets.First(a => a != _customSymbol.BaseAsset.Name && a != _customSymbol.QuoteAsset.Name));\n\n        ShowSymbolAssets();\n    }\n\n    private void ShowSymbolAssets()\n    {\n        Print($\"Base Asset: {_customSymbol.Symbol.BaseAsset.Name} | Quote Asset: {_customSymbol.Symbol.QuoteAsset.Name}\");\n    }\n\n    private void OnDisplayChartInfoButtonClick(ButtonClickEventArgs obj)\n    {\n        foreach (var frame in ChartManager)\n        {\n            if (frame is not ChartFrame chartFrame)\n                continue;\n\n            Print($\"Chart, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\");\n        }\n    }\n\n    private void OnChangeDescriptionButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.Description = _customSymbol.Description == InitialDescription ? ChangedDescription : InitialDescription;\n\n        Print($\"Changed description to: {_customSymbol.Description}\");\n    }\n\n    private void OnUpdateSymbolPropertiesButtonClick(ButtonClickEventArgs obj)\n    {\n        _customSymbol.PipDigits = _customSymbol.PipDigits + 1;\n        _customSymbol.TickDigits = _customSymbol.TickDigits + 1;\n        _customSymbol.VolumeInUnitsMin = _customSymbol.VolumeInUnitsMin - 10;\n        _customSymbol.VolumeInUnitsStep = _customSymbol.VolumeInUnitsStep + 10;\n        _customSymbol.VolumeInUnitsMax = _customSymbol.VolumeInUnitsMax + 10;\n        _customSymbol.Commission = _customSymbol.Commission + 1;\n        _customSymbol.GracePeriod = _customSymbol.GracePeriod + 1;\n        _customSymbol.LotSize = _customSymbol.LotSize * 2;\n        _customSymbol.PnLConversionFeeRate = _customSymbol.PnLConversionFeeRate + 1;\n        _customSymbol.CommissionType = SymbolCommissionType.PercentageOfTradingVolume;\n        _customSymbol.MinCommission = _customSymbol.MinCommission + 1;\n        _customSymbol.MinCommissionType = SymbolMinCommissionType.QuoteAsset;\n        _customSymbol.AdministrativeCharge3DaysRollover = DayOfWeek.Thursday;\n        _customSymbol.AdministrativeCharge = _customSymbol.AdministrativeCharge + 1;\n        _customSymbol.SwapPeriod = _customSymbol.SwapPeriod + 1;\n        _customSymbol.WeekendSwaps = !_customSymbol.WeekendSwaps;\n        _customSymbol.SwapLong = _customSymbol.SwapLong + 1;\n        _customSymbol.SwapShort = _customSymbol.SwapShort + 1;\n        _customSymbol.SwapTimeInMinutes = _customSymbol.SwapTimeInMinutes + 1;\n        _customSymbol.Swap3DaysRollover = DayOfWeek.Tuesday;\n        _customSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage;\n        _customSymbol.MinDistanceType = SymbolMinDistanceType.Pips;\n        _customSymbol.MinTakeProfitDistance = _customSymbol.MinTakeProfitDistance + 1;\n        _customSymbol.MinStopLossDistance = _customSymbol.MinStopLossDistance + 1;\n\n        ShowSymbolProperties();\n    }\n\n    private void ShowSymbolProperties()\n    {\n        foreach (var property in _customSymbol.Symbol.GetType().GetProperties())\n        {\n            Print($\"{property.Name}: {property.GetValue(_customSymbol.Symbol)}\");\n        }\n    }\n\n    private void OnPauseOrResumeLoadMoreButtonClick(ButtonClickEventArgs obj)\n    {\n        _isLoadMoreEnabled = !_isLoadMoreEnabled;\n    }\n\n    private void OnAddBarsButtonClick(ButtonClickEventArgs obj)\n    {\n        if (ChartManager.ActiveFrame is not ChartFrame { Chart: var chart })\n            return;\n\n        var bars = _customSymbol.AddBars(chart.TimeFrame);\n\n        Print($\"Added Bars, Count: {bars.Bars.Count}, Get: {bars == _customSymbol.GetBars(chart.TimeFrame)}\");\n    }\n\n    private void OnRemoveBarsButtonClick(ButtonClickEventArgs obj)\n    {\n        if (ChartManager.ActiveFrame is not ChartFrame { Chart: var chart })\n            return;\n\n        var result = _customSymbol.RemoveBars(chart.TimeFrame);\n\n        Print($\"Removed Bars, Result: {result}, Get is null: {_customSymbol.GetBars(chart.TimeFrame) == null}\");\n    }\n\n    private void OnShowRegularBarsInfoButtonClick(ButtonClickEventArgs obj)\n    {\n        Print($\"Regular Bars, Count: {_customBars.Bars.Count}, LastBar: {_customBars.Bars.LastBar}, FirstBar: {_customBars.Bars[0]}\");\n    }\n\n    private void OnAddCustomSymbolWithBaseButtonClick(ButtonClickEventArgs obj)\n    {\n        var baseSymbol = Symbols.GetSymbol(\"EURUSD\");\n\n        _customSymbol = CustomSymbols.Add(\"Custom Symbol With Base\", baseSymbol);\n\n        _customSymbol.Symbol.Sentiment.Updated += OnSymbolSentimentUpdated;\n\n        _customSymbol.Description = InitialDescription;\n\n        _customSymbol.BarsNeeded = OnCustomSymbolBarsNeeded;\n\n        baseSymbol.Tick += OnBaseSymbolTick;\n\n        _customSymbol.UpdateQuote(baseSymbol.Bid, baseSymbol.Ask);\n\n        Print($\"custom symbol '{_customSymbol.Name}' has been added.\");\n    }\n\n    private void OnAddCustomSymbolWithoutBaseButtonClick(ButtonClickEventArgs obj)\n    {\n        var baseAsset = Account.Asset;\n        var quoteAsset = Assets.GetAsset(Assets.FirstOrDefault(assetName => assetName != baseAsset.Name));\n\n        _customSymbol = CustomSymbols.Add(\"Custom Symbol Without Base\", baseAsset, quoteAsset);\n\n        _customSymbol.Symbol.Sentiment.Updated += OnSymbolSentimentUpdated;\n\n        _customSymbol.Description = InitialDescription;\n\n        _customSymbol.BarsNeeded = OnCustomSymbolBarsNeeded;\n\n        var trackingSymbol = Symbols.GetSymbol(\"EURUSD\");\n\n        trackingSymbol.Tick += OnBaseSymbolTick;\n\n        _customSymbol.UpdateQuote(trackingSymbol.Bid, trackingSymbol.Ask);\n\n        Print($\"custom symbol '{_customSymbol.Name}' has been added.\");\n    }\n\n    private void OnSymbolSentimentUpdated(SymbolSentimentUpdatedEventArgs args)\n    {\n        Print($\"SentimentUpdated, Buy: {args.Sentiment.BuyPercentage} | Sell: {args.Sentiment.SellPercentage}\");\n    }\n\n    private void OnBaseSymbolTick(SymbolTickEventArgs args)\n    {\n        if (_customSymbol is null)\n        {\n            args.Symbol.Tick -= OnBaseSymbolTick;\n            return;\n        }\n\n        _customSymbol.UpdateQuote(args.Symbol.Bid, args.Symbol.Ask);\n    }\n\n    private void OnCustomSymbolBarsNeeded(CustomSymbolBarsNeededArgs args)\n    {\n        Print($\"Bars Needed for custom symbol, Symbol: {args.CustomBars.Symbol}, Name: {args.CustomSymbol.Name}\");\n\n        _customBars = args.CustomBars;\n\n        MarketData.GetBarsAsync(args.CustomBars.TimeFrame, \"EURUSD\", bars =>\n        {\n            Print($\"Bars Loaded: {bars.Count}\");\n\n            Sleep(TimeSpan.FromSeconds(2));\n\n            args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (int)bar.TickVolume)));\n\n            args.CustomBars.NeedsMore += _ =>\n            {\n                if (!_isLoadMoreEnabled)\n                {\n                    Print(\"Needs more requested but load more is disabled\");\n                    return;\n                }\n\n                Print($\"Bars NeedsMore\");\n\n                bars.LoadMoreHistoryAsync(loadedMoreArgs =>\n                {\n                    Print($\"Bars Loaded more: {loadedMoreArgs.Count}\");\n\n                    if (loadedMoreArgs.Count == 0)\n                        return;\n\n                    Sleep(TimeSpan.FromSeconds(2));\n                    args.CustomBars.PrependBars(bars.Take(loadedMoreArgs.Count).Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (int)bar.TickVolume)));\n                });\n            };\n\n            bars.BarOpened += _ =>\n            {\n                if (_customSymbol is null)\n                    return;\n\n                args.CustomBars.AppendBar(new CustomBar(bars.LastBar.OpenTime, bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume));\n            };\n\n            bars.Tick += _ =>\n            {\n                if (_customSymbol is null)\n                    return;\n\n                args.CustomBars.UpdateLastBar(bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume);\n            };\n        });\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, TimeSpan, Array, DayOfWeek\nimport random\n\nclass Test():\n    InitialDescription = \"This is custom symbol initial description\"\n    ChangedDescription = \"This is custom symbol changed description\"\n\n    def on_start(self):\n        self.isLoadMoreEnabled = True\n        self.customSymbol = None\n\n        panel = StackPanel()\n\n        addCustomSymbolWithBaseButton = Button()\n        addCustomSymbolWithBaseButton.Text = \"Add custom symbol with Base Symbol\"\n        addCustomSymbolWithBaseButton.Click += self.on_add_custom_symbol_with_base_button_click\n\n        panel.AddChild(addCustomSymbolWithBaseButton)\n\n        addCustomSymbolWithoutBaseButton = Button()\n        addCustomSymbolWithoutBaseButton.Text = \"Add custom symbol without Base Symbol\"\n        addCustomSymbolWithoutBaseButton.Click += self.on_add_custom_symbol_without_base_button_click\n\n        panel.AddChild(addCustomSymbolWithoutBaseButton)\n\n        removeCustomSymbolButton = Button()\n        removeCustomSymbolButton.Text = \"Remove custom symbol\"\n        removeCustomSymbolButton.Click += self.on_remove_custom_symbol_button_click\n\n        panel.AddChild(removeCustomSymbolButton)\n\n        displayChartInfoButton = Button()\n        displayChartInfoButton.Text = \"Display Charts Info\"\n        displayChartInfoButton.Click += self.on_display_chart_info_button_click\n\n        panel.AddChild(displayChartInfoButton)\n\n        changeDescriptionButton = Button()\n        changeDescriptionButton.Text = \"Change Description\"\n        changeDescriptionButton.Click += self.on_change_description_button_click\n\n        panel.AddChild(changeDescriptionButton)\n\n        updateSymbolPropertiesButton = Button()\n        updateSymbolPropertiesButton.Text = \"Update Symbol Properties\"\n        updateSymbolPropertiesButton.Click += self.on_update_symbol_properties_button_click\n\n        panel.AddChild(updateSymbolPropertiesButton)\n\n        updateSymbolBaseAssetButton = Button()\n        updateSymbolBaseAssetButton.Text = \"Update Symbol Base Asset\"\n        updateSymbolBaseAssetButton.Click += self.on_update_symbol_base_asset_button_click\n\n        panel.AddChild(updateSymbolBaseAssetButton)\n\n        updateSymbolQuoteAssetButton = Button()\n        updateSymbolQuoteAssetButton.Text = \"Update Symbol Quote Asset\"\n        updateSymbolQuoteAssetButton.Click += self.on_update_symbol_quote_asset_button_click\n\n        panel.AddChild(updateSymbolQuoteAssetButton)\n\n        showSymbolPropertiesButton = Button()\n        showSymbolPropertiesButton.Text = \"Show Symbol Properties\"\n        showSymbolPropertiesButton.Click += lambda _: self.show_symbol_properties()\n\n        panel.AddChild(showSymbolPropertiesButton)\n\n        showSymbolAssetsButton = Button()\n        showSymbolAssetsButton.Text = \"Show Symbol Assets\"\n        showSymbolAssetsButton.Click += lambda _: self.show_symbol_assets()\n\n        panel.AddChild(showSymbolAssetsButton)\n\n        pauseOrResumeLoadMoreButton = Button()\n        pauseOrResumeLoadMoreButton.Text = \"Pause / Resume Load More\"\n        pauseOrResumeLoadMoreButton.Click += self.on_pause_or_resume_load_more_button_click\n\n        panel.AddChild(pauseOrResumeLoadMoreButton)\n\n        showRegularBarsInfoButton = Button()\n        showRegularBarsInfoButton.Text = \"Show Regular Bars Info\"\n        showRegularBarsInfoButton.Click += self.on_show_regular_bars_info_button_click\n\n        panel.AddChild(showRegularBarsInfoButton)\n\n        addBarsButton = Button()\n        addBarsButton.Text = \"Add Bars For Active Chart Symbol\"\n        addBarsButton.Click += self.on_add_bars_button_click\n\n        panel.AddChild(addBarsButton)\n\n        removeBarsButton = Button()\n        removeBarsButton.Text = \"Remove Bars For Active Chart Symbol\"\n        removeBarsButton.Click += self.on_remove_bars_button_click\n\n        panel.AddChild(removeBarsButton)\n\n        updateLastBarButton = Button()\n        updateLastBarButton.Text = \"Update Last Bar\"\n        updateLastBarButton.Click += self.on_update_last_bar_button_click\n\n        panel.AddChild(updateLastBarButton)\n\n        updateSymbolSentimentButton = Button()\n        updateSymbolSentimentButton.Text = \"Update Symbol Sentiment\"\n        updateSymbolSentimentButton.Click += self.on_update_symbol_sentiment_button_click\n\n        panel.AddChild(updateSymbolSentimentButton)\n\n        showSymbolSentimentButton = Button()\n        showSymbolSentimentButton.Text = \"Show Symbol Sentiment\"\n        showSymbolSentimentButton.Click += lambda _: self.show_symbol_sentiment()\n\n        panel.AddChild(showSymbolSentimentButton)\n\n        updateSymbolDynamicLeverageButton = Button()\n        updateSymbolDynamicLeverageButton.Text = \"Update Symbol Dynamic Leverage\"\n        updateSymbolDynamicLeverageButton.Click += self.on_update_symbol_dynamic_leverage_button_click\n\n        panel.AddChild(updateSymbolDynamicLeverageButton)\n\n        showSymbolDynamicLeverageButton = Button()\n        showSymbolDynamicLeverageButton.Text = \"Show Symbol Dynamic Leverage\"\n        showSymbolDynamicLeverageButton.Click += lambda _: self.show_symbol_dynamic_leverage()\n\n        panel.AddChild(showSymbolDynamicLeverageButton)\n\n        updateSymbolHolidaysButton = Button()\n        updateSymbolHolidaysButton.Text = \"Update Symbol Holidays\"\n        updateSymbolHolidaysButton.Click += self.on_update_symbol_holidays_button_click\n\n        panel.AddChild(updateSymbolHolidaysButton)\n\n        showSymbolHolidaysButton = Button()\n        showSymbolHolidaysButton.Text = \"Show Symbol Holidays\"\n        showSymbolHolidaysButton.Click += self.on_show_symbol_holidays_button_click\n\n        panel.AddChild(showSymbolHolidaysButton)\n\n        updateSymbolSessionsButton = Button()\n        updateSymbolSessionsButton.Text = \"Update Symbol Sessions\"\n        updateSymbolSessionsButton.Click += self.on_update_symbol_sessions_button_click\n\n        panel.AddChild(updateSymbolSessionsButton)\n\n        showSymbolSessionsButton = Button()\n        showSymbolSessionsButton.Text = \"Show Symbol Sessions\"\n        showSymbolSessionsButton.Click += self.on_show_symbol_sessions_button_click\n\n        panel.AddChild(showSymbolSessionsButton)\n\n        updateSymbolFuturesSettingsButton = Button()\n        updateSymbolFuturesSettingsButton.Text = \"Update Symbol Futures Settings\"\n        updateSymbolFuturesSettingsButton.Click += self.on_update_symbol_futures_settings_button_click\n\n        panel.AddChild(updateSymbolFuturesSettingsButton)\n\n        showSymbolFuturesSettingsButton = Button()\n        showSymbolFuturesSettingsButton.Text = \"Show Symbol Futures Settings\"\n        showSymbolFuturesSettingsButton.Click += self.on_show_symbol_futures_settings_button_click\n\n        panel.AddChild(showSymbolFuturesSettingsButton)\n\n        block = api.Asp.SymbolTab.AddBlock(\"Custom symbol Test\")\n        block.Child = panel\n        block.Height = 550\n\n        api.ChartManager.FramesAdded += self.on_chart_manager_frames_addded\n\n        api.Symbols.Added += self.on_symbol_added\n        api.Symbols.Removed += self.on_symbol_removed\n\n    def on_add_custom_symbol_with_base_button_click(self, args):\n        baseSymbol = api.Symbols.GetSymbol(\"EURUSD\")\n\n        self.customSymbol = api.CustomSymbols.Add(\"Custom Symbol With Base\", baseSymbol)\n        self.customSymbol.Symbol.Sentiment.Updated += self.on_symbol_sentiment_updated\n        self.customSymbol.Description = self.InitialDescription\n        self.customSymbol.BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_custom_symbol_bars_needed)\n\n        baseSymbol.Tick += self.on_base_symbol_tick\n\n        self.customSymbol.UpdateQuote(baseSymbol.Bid, baseSymbol.Ask)\n\n        print(f\"custom symbol '{self.customSymbol.Name}' has been added.\")\n\n    def on_add_custom_symbol_without_base_button_click(self, args):\n        baseAsset = api.Account.Asset\n        quoteAsset = api.Assets.GetAsset(next((assetName for assetName in api.Assets if assetName != baseAsset.Name)))\n\n        self.customSymbol = api.CustomSymbols.Add(\"Custom Symbol Without Base\", baseAsset, quoteAsset)\n        self.customSymbol.Symbol.Sentiment.Updated += self.on_symbol_sentiment_updated\n        self.customSymbol.Description = self.InitialDescription\n        self.customSymbol.BarsNeeded = Action[CustomSymbolBarsNeededArgs](self.on_custom_symbol_bars_needed)\n\n        trackingSymbol = api.Symbols.GetSymbol(\"EURUSD\")\n        trackingSymbol.Tick += self.on_base_symbol_tick\n\n        self.customSymbol.UpdateQuote(trackingSymbol.Bid, trackingSymbol.Ask)\n\n        print(f\"custom symbol '{self.customSymbol.Name}' has been added.\")\n\n    def on_symbol_sentiment_updated(self, args):\n        print(f\"SentimentUpdated, Buy: {args.Sentiment.BuyPercentage} | Sell: {args.Sentiment.SellPercentage}\")\n\n    def on_custom_symbol_bars_needed(self, args):\n        print(f\"Bars Needed for custom symbol, Symbol: {args.CustomBars.Symbol}, Name: {args.CustomSymbol.Name}\")\n\n        self.customBars = args.CustomBars\n\n        api.MarketData.GetBarsAsync(args.CustomBars.TimeFrame, \"EURUSD\", Action[Bars](self.on_bars_received))\n\n    def on_bars_received(self, bars):\n        print(f\"Bars Loaded: {bars.Count}\")\n\n        api.Sleep(2000)\n\n        self.customBars.AppendBars(self.to_array([CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in bars], CustomBar))\n        self.customBars.NeedsMore += lambda args: self.on_custom_bars_needs_more(bars, args.CustomBars)\n\n        bars.BarOpened += lambda args: self.on_bar_opened(self.customBars, args.Bars)\n        bars.Tick += lambda args: self.on_tick(self.customBars, args.Bars)\n\n    def on_custom_bars_needs_more(self, bars, customBars):\n        if self.isLoadMoreEnabled is False:\n            print(\"Needs more requested but load more is disabled\")\n            return\n\n        print(\"Bars NeedsMore\")\n\n        bars.LoadMoreHistoryAsync(Action[BarsHistoryLoadedEventArgs](lambda args: self.on_bars_more_history_loaded(customBars, bars, args.Count)))\n\n    def on_bars_more_history_loaded(self, customBars, bars, loadedCount):\n        print(f\"Bars Loaded more: {loadedCount}\")\n\n        if loadedCount == 0:\n            return\n\n        api.Sleep(2000)\n\n        loadedBars = []\n\n        for i, bar in enumerate(bars):\n            if i >= loadedCount:\n                break\n            loadedBars.append(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))\n\n        customBars.PrependBars(self.to_array(loadedBars, CustomBar))\n\n    def on_bar_opened(self, customBars, bars):\n        if self.customSymbol is None:\n            return\n\n        customBars.AppendBar(CustomBar(bars.LastBar.OpenTime, bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume))\n\n    def on_tick(self, customBars, bars):\n        if self.customSymbol is None:\n            return\n\n        customBars.UpdateLastBar(bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume)\n\n    def on_base_symbol_tick(self, args):\n        if self.customSymbol is None:\n            args.Symbol.Tick -= self.on_base_symbol_tick\n            return\n\n        self.customSymbol.UpdateQuote(args.Symbol.Bid, args.Symbol.Ask)\n\n    def on_remove_custom_symbol_button_click(self, args):\n        if api.CustomSymbols.Remove(self.customSymbol):\n            return\n\n        print(f\"custom symbol '{self.customSymbol.Name}' has been removed.\")\n        self.customSymbol = None\n\n    def on_display_chart_info_button_click(self, args):\n        for frame in api.ChartManager:\n            if isinstance(frame.__implementation__, ChartFrame) == False:\n                continue\n\n            chartFrame = ChartFrame(frame)\n            print(f\"Chart, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\")\n\n    def on_change_description_button_click(self, args):\n        self.customSymbol.Description = self.ChangedDescription if self.customSymbol.Description == self.InitialDescription else self.InitialDescription\n        print(f\"Changed description to: {self.customSymbol.Description}\")\n\n    def on_update_symbol_properties_button_click(self, args):\n        self.customSymbol.PipDigits = self.customSymbol.PipDigits + 1\n        self.customSymbol.TickDigits = self.customSymbol.TickDigits + 1\n        self.customSymbol.VolumeInUnitsMin = self.customSymbol.VolumeInUnitsMin - 10\n        self.customSymbol.VolumeInUnitsStep = self.customSymbol.VolumeInUnitsStep + 10\n        self.customSymbol.VolumeInUnitsMax = self.customSymbol.VolumeInUnitsMax + 10\n        self.customSymbol.Commission = self.customSymbol.Commission + 1\n        self.customSymbol.GracePeriod = self.customSymbol.GracePeriod + 1\n        self.customSymbol.LotSize = self.customSymbol.LotSize * 2\n        self.customSymbol.PnLConversionFeeRate = self.customSymbol.PnLConversionFeeRate + 1\n        self.customSymbol.CommissionType = SymbolCommissionType.PercentageOfTradingVolume\n        self.customSymbol.MinCommission = self.customSymbol.MinCommission + 1\n        self.customSymbol.MinCommissionType = SymbolMinCommissionType.QuoteAsset\n        self.customSymbol.AdministrativeCharge3DaysRollover = DayOfWeek.Thursday\n        self.customSymbol.AdministrativeCharge = self.customSymbol.AdministrativeCharge + 1\n        self.customSymbol.SwapPeriod = self.customSymbol.SwapPeriod + 1\n        self.customSymbol.WeekendSwaps = not self.customSymbol.WeekendSwaps\n        self.customSymbol.SwapLong = self.customSymbol.SwapLong + 1\n        self.customSymbol.SwapShort = self.customSymbol.SwapShort + 1\n        self.customSymbol.SwapTimeInMinutes = self.customSymbol.SwapTimeInMinutes + 1\n        self.customSymbol.Swap3DaysRollover = DayOfWeek.Tuesday\n        self.customSymbol.SwapCalculationType = SymbolSwapCalculationType.Percentage\n        self.customSymbol.MinDistanceType = SymbolMinDistanceType.Pips\n        self.customSymbol.MinTakeProfitDistance = self.customSymbol.MinTakeProfitDistance + 1\n        self.customSymbol.MinStopLossDistance = self.customSymbol.MinStopLossDistance + 1\n\n        self.show_symbol_properties()\n\n    def to_array(self, iterable, itemType):\n        length = len(iterable)\n        array = Array[itemType](length)\n        for i in range(length):\n            array[i] = iterable[i]\n\n        return array\n\n    def show_symbol_properties(self):\n        for propertyInfo in self.customSymbol.Symbol.GetType().GetProperties():\n            print(f\"{propertyInfo.Name}: {propertyInfo.GetValue(self.customSymbol.Symbol)}\")\n\n    def on_update_symbol_base_asset_button_click(self, args):\n        self.customSymbol.BaseAsset = api.Assets.GetAsset(next((assetName for assetName in api.Assets if assetName != self.customSymbol.BaseAsset.Name and assetName != self.customSymbol.QuoteAsset.Name)))\n        self.show_symbol_assets()\n\n    def on_update_symbol_quote_asset_button_click(self, args):\n        self.customSymbol.QuoteAsset = api.Assets.GetAsset(next((assetName for assetName in api.Assets if assetName != self.customSymbol.BaseAsset.Name and assetName != self.customSymbol.QuoteAsset.Name)))\n        self.show_symbol_assets()\n\n    def show_symbol_assets(self):\n        print(f\"Base Asset: {self.customSymbol.Symbol.BaseAsset.Name} | Quote Asset: {self.customSymbol.Symbol.QuoteAsset.Name}\")\n\n    def on_pause_or_resume_load_more_button_click(self, args):\n        self.isLoadMoreEnabled = not self.isLoadMoreEnabled\n\n    def on_show_regular_bars_info_button_click(self, args):\n        print(f\"Regular Bars, Count: {self.customBars.Bars.Count}, LastBar: {self.customBars.Bars.LastBar}, FirstBar: {self.customBars.Bars[0]}\")\n\n    def on_add_bars_button_click(self, args):\n        if isinstance(api.ChartManager.ActiveFrame.__implementation__, ChartFrame) == False:\n            return\n        chart = ChartFrame(api.ChartManager.ActiveFrame).Chart\n        bars = self.customSymbol.AddBars(chart.TimeFrame)\n        print(f\"Added Bars, Count: {bars.Bars.Count}, Get: {bars == self.customSymbol.GetBars(chart.TimeFrame)}\")\n\n    def on_remove_bars_button_click(self, args):\n        if isinstance(api.ChartManager.ActiveFrame.__implementation__, ChartFrame) == False:\n            return\n        chart = ChartFrame(api.ChartManager.ActiveFrame).Chart\n        result = self.customSymbol.RemoveBars(chart.TimeFrame)\n        print(f\"Removed Bars, Result: {result}, Get is None: {self.customSymbol.GetBars(chart.TimeFrame) is None}\")\n\n    def on_update_last_bar_button_click(self, args):\n        changeAmount = (self.customBars.Bars.LastBar.High - self.customBars.Bars.LastBar.Low) * (random.random() + 0.5) * 2\n        print(f\"Changing Last Bar: {self.customBars.Bars.LastBar} | change: {changeAmount}\")\n        bars = self.customBars.Bars\n        self.customBars.UpdateLastBar(bars.LastBar.Open, bars.LastBar.Open + changeAmount, bars.LastBar.Open - changeAmount, bars.LastBar.Close + changeAmount, int(bars.LastBar.TickVolume + 1))\n\n    def on_update_symbol_sentiment_button_click(self, args):\n        self.customSymbol.Sentiment.BuyPercentage = self.customSymbol.Sentiment.BuyPercentage + 1 if self.customSymbol.Sentiment.BuyPercentage < 99 else self.customSymbol.Sentiment.BuyPercentage - 1\n\n    def show_symbol_sentiment(self):\n        print(f\"Buy: {self.customSymbol.Symbol.Sentiment.BuyPercentage} | Sell: {self.customSymbol.Symbol.Sentiment.SellPercentage}\")\n\n    def on_update_symbol_dynamic_leverage_button_click(self, args):\n        self.customSymbol.DynamicLeverage.Add(CustomSymbolLeverageTier(random.random() * 100 + 1000, 100 + random.randint(0, 100)))\n\n    def show_symbol_dynamic_leverage(self):\n        print(f\"Dynamic Leverage Count: {self.customSymbol.Symbol.DynamicLeverage.Count}\")\n        for leverage in self.customSymbol.Symbol.DynamicLeverage:\n            print(f\"Volume: {leverage.Volume} | Leverage: {leverage.Leverage}\")\n\n    def on_update_symbol_holidays_button_click(self, args):\n        startTime = api.Server.Time.AddMonths(random.randint(1, 3))\n        endTime = startTime.AddDays(1)\n        isRecurring = random.randint(0, 1) > 0\n        self.customSymbol.MarketHours.Holidays.Add(CustomSymbolTradingHoliday(f\"Test {self.customSymbol.MarketHours.Holidays.Count}\", startTime, endTime, isRecurring))\n\n    def on_show_symbol_holidays_button_click(self, args):\n        print(f\"Holidays Count: {self.customSymbol.Symbol.MarketHours.Holidays.Count}\")\n\n        for holiday in self.customSymbol.Symbol.MarketHours.Holidays:\n            print(f\"Name: {holiday.Name} | Start: {holiday.StartTime} | End: {holiday.EndTime} | Is Recurring: {holiday.IsRecurring}\")\n\n    def on_update_symbol_sessions_button_click(self, args):\n        startDay = DayOfWeek(random.randint(0, 6))\n        endDay = DayOfWeek(int(startDay) + 1)\n        startTime = TimeSpan.FromHours(random.randint(0, 22))\n        endTime = startTime.Add(TimeSpan.FromHours(1))\n        self.customSymbol.MarketHours.Sessions.Add(CustomSymbolTradingSession(startDay, endDay, startTime, endTime))\n\n    def on_show_symbol_sessions_button_click(self, args):\n        print(f\"Sessions Count: {self.customSymbol.Symbol.MarketHours.Sessions.Count}\")\n\n        for session in self.customSymbol.Symbol.MarketHours.Sessions:\n            print(f\"Start Day: {session.StartDay} | End Day: {session.EndDay} | Start Time: {session.StartTime} | End Time: {session.EndTime}\")\n\n    def on_update_symbol_futures_settings_button_click(self, args):\n        self.customSymbol.FuturesSettings = CustomSymbolFuturesSettings(api.Server.Time, api.Server.Time.AddMonths(random.randint(1, 10)), random.random() * 100 + 1000)\n\n    def on_show_symbol_futures_settings_button_click(self, args):\n        symbol = self.customSymbol.Symbol\n        print(f\"Last Trade Time: {symbol.FuturesSettings.LastTradeTime} | Expiration Time: {symbol.FuturesSettings.ExpirationTime} | Maintenance Margin: {symbol.FuturesSettings.MaintenanceMargin}\")\n\n    def on_chart_manager_frames_addded(self, args):\n        for frame in args.AddedFrames:\n            if isinstance(frame.__implementation__, ChartFrame) == False:\n                continue\n            chartFrame = ChartFrame(frame)\n            print(f\"New chart frame added, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\")\n\n    def on_symbol_added(self, args):\n        print(f\"Symbol Added: {args.SymbolName}\")\n\n    def on_symbol_removed(self, args):\n        print(f\"Symbol Removed: {args.SymbolName}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbols.Add(System.String,cAlgo.API.Asset,cAlgo.API.Asset)","kind":"method","name":"Add","type":"T:cAlgo.API.CustomSymbols","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbol Add(string name, Asset baseAsset, Asset quoteAsset)","python":"api.CustomSymbols.Add(name: str, baseAsset: Asset, quoteAsset: Asset) -> CustomSymbol","summary":"Adds a new custom symbol.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Custom symbol unique name."},{"name":"baseAsset","csharpType":"Asset","pythonType":"Asset","summary":"Symbol base asset."},{"name":"quoteAsset","csharpType":"Asset","pythonType":"Asset","summary":"Symbol quote asset."}],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"CustomSymbol","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"BTCEUR.custom\", Assets.GetAsset(\"BTC\"), Assets.GetAsset(\"EUR\"));\ncustomSymbol.Description = \"Bitcoin vs Euro with quotes from my data feed\";\nPrint(\"Added custom symbol {0} ({1}/{2})\", customSymbol.Name, customSymbol.BaseAsset.Name, customSymbol.QuoteAsset.Name);","python":"customSymbol = api.CustomSymbols.Add(\"BTCEUR.custom\", api.Assets.GetAsset(\"BTC\"), api.Assets.GetAsset(\"EUR\"))\ncustomSymbol.Description = \"Bitcoin vs Euro with quotes from my data feed\"\napi.Print(f\"Added custom symbol {customSymbol.Name} ({customSymbol.BaseAsset.Name}/{customSymbol.QuoteAsset.Name})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbols.Add(System.String,cAlgo.API.Internals.Symbol)","kind":"method","name":"Add","type":"T:cAlgo.API.CustomSymbols","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbol Add(string name, Symbol baseSymbol)","python":"api.CustomSymbols.Add(name: str, baseSymbol: Symbol) -> CustomSymbol","summary":"Adds a new custom symbol based on existing symbol.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Custom symbol unique name."},{"name":"baseSymbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Base symbol."}],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"CustomSymbol","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"Custom symbol {0} copies the settings of EURUSD, lot size {1}\", customSymbol.Name, customSymbol.LotSize);","python":"customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"Custom symbol {customSymbol.Name} copies the settings of EURUSD, lot size {customSymbol.LotSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbols.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.CustomSymbols","namespace":"cAlgo.API","group":"Custom","csharp":"CustomSymbol Get(string name)","python":"api.CustomSymbols.Get(name: str) -> CustomSymbol | None","summary":"Returns a custom symbol by it's name.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Name of custom symbol"}],"returns":{"csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"CustomSymbol if custom symbol found otherwise null.","nullable":true},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Get(\"MYEURUSD\");\nif (customSymbol == null)\n    Print(\"Custom symbol MYEURUSD does not exist\");\nelse\n    Print(\"Custom symbol bid: {0}, ask: {1}\", customSymbol.Bid, customSymbol.Ask);","python":"customSymbol = api.CustomSymbols.Get(\"MYEURUSD\")\nif customSymbol is None:\n    api.Print(\"Custom symbol MYEURUSD does not exist\")\nelse:\n    api.Print(f\"Custom symbol bid: {customSymbol.Bid}, ask: {customSymbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomSymbols.Remove(cAlgo.API.CustomSymbol)","kind":"method","name":"Remove","type":"T:cAlgo.API.CustomSymbols","namespace":"cAlgo.API","group":"Custom","csharp":"bool Remove(CustomSymbol customSymbol)","python":"api.CustomSymbols.Remove(customSymbol: CustomSymbol) -> bool","summary":"Removes a custom symbol.","remarks":null,"parameters":[{"name":"customSymbol","csharpType":"CustomSymbol","pythonType":"CustomSymbol","summary":"Custom symbol"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise False.","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Get(\"MYEURUSD\");\nif (customSymbol != null)\n    Print(\"Custom symbol removed: {0}\", CustomSymbols.Remove(customSymbol));","python":"customSymbol = api.CustomSymbols.Get(\"MYEURUSD\")\nif customSymbol is not None:\n    api.Print(f\"Custom symbol removed: {api.CustomSymbols.Remove(customSymbol)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbols/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomTimeFrame","kind":"interface","name":"CustomTimeFrame","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomTimeFrame","python":"CustomTimeFrame","summary":"Represents a custom time frame.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"Daily Copy\");\n    customTimeFrame.Description = \"Daily bars provided by my plugin\";\n    customTimeFrame.BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n{\n    var bars = MarketData.GetBars(TimeFrame.Daily, args.CustomBars.Symbol.Name);\n    args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n}","python":"from System import Action\n\ndef on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"Daily Copy\")\n    customTimeFrame.Description = \"Daily bars provided by my plugin\"\n    customTimeFrame.BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    bars = api.MarketData.GetBars(TimeFrame.Daily, args.CustomBars.Symbol.Name)\n    for bar in bars:\n        args.CustomBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrame.AddBars(cAlgo.API.Internals.Symbol)","kind":"method","name":"AddBars","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"CustomBars AddBars(Symbol symbol)","python":"customTimeFrame.AddBars(symbol: Symbol) -> CustomBars","summary":"Adds bars for a symbol that will be used for this custom time frame when needed.","remarks":"If bars already exist for the symbol existing bars will be returned.","parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Bars Symbol"}],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"CustomBars","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\nvar customBars = customTimeFrame.AddBars(Symbols.GetSymbol(\"EURUSD\"));\ncustomBars.AppendBar(new CustomBar(Server.Time, 1.0850, 1.0870, 1.0840, 1.0865, 1200));\nPrint(\"Custom bars for {0}: {1}\", customBars.Symbol.Name, customBars.Bars.Count);","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\ncustomBars = customTimeFrame.AddBars(api.Symbols.GetSymbol(\"EURUSD\"))\ncustomBars.AppendBar(CustomBar(api.Server.Time, 1.0850, 1.0870, 1.0840, 1.0865, 1200))\napi.Print(f\"Custom bars for {customBars.Symbol.Name}: {customBars.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/AddBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/AddBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrame.GetBars(cAlgo.API.Internals.Symbol)","kind":"method","name":"GetBars","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"CustomBars GetBars(Symbol symbol)","python":"customTimeFrame.GetBars(symbol: Symbol) -> CustomBars","summary":"Returns bars of a symbol if exists otherwise null.","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Bars Symbol"}],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"CustomBars","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\nvar customBars = customTimeFrame.GetBars(Symbols.GetSymbol(\"EURUSD\"));\nif (customBars == null)\n    Print(\"No custom bars added for EURUSD yet\");","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\ncustomBars = customTimeFrame.GetBars(api.Symbols.GetSymbol(\"EURUSD\"))\nif customBars is None:\n    api.Print(\"No custom bars added for EURUSD yet\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/GetBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/GetBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrame.RemoveAllUnloadedBars","kind":"method","name":"RemoveAllUnloadedBars","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"void RemoveAllUnloadedBars()","python":"customTimeFrame.RemoveAllUnloadedBars() -> None","summary":"Removes all existing unloaded custom bars that aren't being used.","remarks":"Use this method to free up memory.","parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\");\ncustomTimeFrame?.RemoveAllUnloadedBars();","python":"customTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is not None:\n    customTimeFrame.RemoveAllUnloadedBars()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/RemoveAllUnloadedBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/RemoveAllUnloadedBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrame.RemoveBars(cAlgo.API.Internals.Symbol)","kind":"method","name":"RemoveBars","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"bool RemoveBars(Symbol symbol)","python":"customTimeFrame.RemoveBars(symbol: Symbol) -> bool","summary":"Removes bars of a symbol which is not being used.","remarks":"Returns false if it was being used or there was no added bars for passed symbol.","parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Bars Symbol"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if bars removed successfully otherwise false","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\nvar symbol = Symbols.GetSymbol(\"EURUSD\");\ncustomTimeFrame.AddBars(symbol);\nPrint(\"Custom bars removed: {0}\", customTimeFrame.RemoveBars(symbol));","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\nsymbol = api.Symbols.GetSymbol(\"EURUSD\")\ncustomTimeFrame.AddBars(symbol)\napi.Print(f\"Custom bars removed: {customTimeFrame.RemoveBars(symbol)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/RemoveBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/RemoveBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrame.BarsNeeded","kind":"property","name":"BarsNeeded","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"Action<CustomTimeFrameBarsNeededArgs> BarsNeeded {get; set;}","python":"customTimeFrame.BarsNeeded: Callable[[CustomTimeFrameBarsNeededArgs], None]","summary":"Gets / sets BarsNeeded handler, it's triggered when bars are needed for a symbol of current time frame.","remarks":"BarsNeeded is not triggered if there is already an added Bars for requested symbol.","parameters":[],"returns":{"csharpType":"Action<CustomTimeFrameBarsNeededArgs>","pythonType":"Callable[[CustomTimeFrameBarsNeededArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\n    customTimeFrame.BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n{\n    var bars = MarketData.GetBars(TimeFrame.Hour4, args.CustomBars.Symbol.Name);\n    args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n}","python":"from System import Action\n\ndef on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\n    customTimeFrame.BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    bars = api.MarketData.GetBars(TimeFrame.Hour4, args.CustomBars.Symbol.Name)\n    for bar in bars:\n        args.CustomBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/BarsNeeded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/BarsNeeded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrame.Description","kind":"property","name":"Description","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"string Description {get; set;}","python":"customTimeFrame.Description: str","summary":"Gets / sets custom time frame description.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\ncustomTimeFrame.Description = \"Bars built from my data feed\";\nPrint(\"Description: {0}\", customTimeFrame.Description);","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\ncustomTimeFrame.Description = \"Bars built from my data feed\"\napi.Print(f\"Description: {customTimeFrame.Description}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/Description/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/Description/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrame.Name","kind":"property","name":"Name","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"string Name {get;}","python":"customTimeFrame.Name: str","summary":"Gets Custom time frame unique name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var customTimeFrame in TimeFrameManager.Custom)\n    Print(\"Custom time frame: {0}\", customTimeFrame.Name);","python":"for customTimeFrame in api.TimeFrameManager.Custom:\n    api.Print(f\"Custom time frame: {customTimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrame.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"TimeFrame TimeFrame {get;}","python":"customTimeFrame.TimeFrame: TimeFrame","summary":"Gets regular time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\nvar chartFrame = ChartManager.AddChartFrame(\"EURUSD\", customTimeFrame.TimeFrame);\nPrint(\"Opened chart with time frame {0}\", chartFrame.TimeFrame);","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\nchartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", customTimeFrame.TimeFrame)\napi.Print(f\"Opened chart with time frame {chartFrame.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.CustomTimeFrame.BarsUnloaded","kind":"event","name":"BarsUnloaded","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"event Action<CustomTimeFrameBarsUnloadedEventArgs> BarsUnloaded;","python":"customTimeFrame.BarsUnloaded += handler  # handler(obj: CustomTimeFrameBarsUnloadedEventArgs)","summary":"Occurs when a custom bars is unloaded and not being used anymore.","remarks":"Use this event to remove the unloaded custom bars to free up memory.","parameters":[],"returns":{"csharpType":"Action<CustomTimeFrameBarsUnloadedEventArgs>","pythonType":"Callable[[CustomTimeFrameBarsUnloadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\n    customTimeFrame.BarsUnloaded += OnBarsUnloaded;\n}\n\nprivate void OnBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)\n{\n    var isRemoved = args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol);\n    Print(\"Unloaded bars of {0} removed: {1}\", args.CustomBars.Symbol.Name, isRemoved);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\n    customTimeFrame.BarsUnloaded += self.on_bars_unloaded\n\ndef on_bars_unloaded(self, args):\n    isRemoved = args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol)\n    api.Print(f\"Unloaded bars of {args.CustomBars.Symbol.Name} removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/BarsUnloaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/BarsUnloaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.CustomTimeFrame.NewChart","kind":"event","name":"NewChart","type":"T:cAlgo.API.CustomTimeFrame","namespace":"cAlgo.API","group":"Custom","csharp":"event Action<CustomTimeFrameNewChartEventArgs> NewChart;","python":"customTimeFrame.NewChart += handler  # handler(obj: CustomTimeFrameNewChartEventArgs)","summary":"Occurs when user opens a new chart of current custom time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<CustomTimeFrameNewChartEventArgs>","pythonType":"Callable[[CustomTimeFrameNewChartEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\n    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;\n}\n\nprivate void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)\n{\n    Print(\"New {0} chart opened for {1}\", args.CustomTimeFrame.Name, args.CustomBars.Symbol.Name);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\n    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart\n\ndef on_custom_time_frame_new_chart(self, args):\n    api.Print(f\"New {args.CustomTimeFrame.Name} chart opened for {args.CustomBars.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/NewChart/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrame/NewChart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomTimeFrameBarsNeededArgs","kind":"class","name":"CustomTimeFrameBarsNeededArgs","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public class CustomTimeFrameBarsNeededArgs","python":"CustomTimeFrameBarsNeededArgs","summary":"Provides data for custom time frame BarsNeeded handler.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\n    customTimeFrame.BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n{\n    var bars = MarketData.GetBars(TimeFrame.Daily, args.CustomBars.Symbol.Name);\n    args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (long)bar.TickVolume)));\n    Print(\"Provided {0} bars for {1}\", bars.Count, args.CustomTimeFrame.Name);\n}","python":"from System import Action\n\ndef on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\n    customTimeFrame.BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    bars = api.MarketData.GetBars(TimeFrame.Daily, args.CustomBars.Symbol.Name)\n    for bar in bars:\n        args.CustomBars.AppendBar(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))\n    api.Print(f\"Provided {bars.Count} bars for {args.CustomTimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameBarsNeededArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomTimeFrameBarsNeededArgs","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomBars CustomBars {get;}","python":"customTimeFrameBarsNeededArgs.CustomBars: CustomBars","summary":"Gets custom bars.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Custom.Add(\"My Custom TF\").BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n{\n    var customBars = args.CustomBars;\n    Print(\"Bars needed for {0}, loaded bars: {1}\", customBars.Symbol.Name, customBars.Bars.Count);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.TimeFrameManager.Custom.Add(\"My Custom TF\").BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    customBars = args.CustomBars\n    api.Print(f\"Bars needed for {customBars.Symbol.Name}, loaded bars: {customBars.Bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameBarsNeededArgs.CustomTimeFrame","kind":"property","name":"CustomTimeFrame","type":"T:cAlgo.API.CustomTimeFrameBarsNeededArgs","namespace":"cAlgo.API","group":"Custom","csharp":"public CustomTimeFrame CustomTimeFrame {get;}","python":"customTimeFrameBarsNeededArgs.CustomTimeFrame: CustomTimeFrame","summary":"Gets custom time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Custom.Add(\"My Custom TF\").BarsNeeded = OnBarsNeeded;\n}\n\nprivate void OnBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n{\n    Print(\"Custom time frame {0} needs bars\", args.CustomTimeFrame.Name);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.TimeFrameManager.Custom.Add(\"My Custom TF\").BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_bars_needed)\n\ndef on_bars_needed(self, args):\n    api.Print(f\"Custom time frame {args.CustomTimeFrame.Name} needs bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/CustomTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrameBarsNeededArgs/CustomTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomTimeFrameBarsUnloadedEventArgs","kind":"class","name":"CustomTimeFrameBarsUnloadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CustomTimeFrameBarsUnloadedEventArgs","python":"CustomTimeFrameBarsUnloadedEventArgs","summary":"Provides data for custom time frame BarsUnloaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.BarsUnloaded += OnCustomTimeFrameBarsUnloaded;\n}\n\nprivate void OnCustomTimeFrameBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)\n{\n    Print(\"{0} bars of {1} were unloaded\", args.CustomBars.Symbol.Name, args.CustomTimeFrame.Name);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.BarsUnloaded += self.on_custom_time_frame_bars_unloaded\n\ndef on_custom_time_frame_bars_unloaded(self, args):\n    api.Print(f\"{args.CustomBars.Symbol.Name} bars of {args.CustomTimeFrame.Name} were unloaded\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameBarsUnloadedEventArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomTimeFrameBarsUnloadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomBars CustomBars {get;}","python":"customTimeFrameBarsUnloadedEventArgs.CustomBars: CustomBars","summary":"Gets custom bars that was unloaded.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.BarsUnloaded += OnCustomTimeFrameBarsUnloaded;\n}\n\nprivate void OnCustomTimeFrameBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)\n{\n    args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol);\n    Print(\"Removed unloaded bars of {0}\", args.CustomBars.Symbol.Name);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.BarsUnloaded += self.on_custom_time_frame_bars_unloaded\n\ndef on_custom_time_frame_bars_unloaded(self, args):\n    args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol)\n    api.Print(f\"Removed unloaded bars of {args.CustomBars.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameBarsUnloadedEventArgs.CustomTimeFrame","kind":"property","name":"CustomTimeFrame","type":"T:cAlgo.API.CustomTimeFrameBarsUnloadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomTimeFrame CustomTimeFrame {get;}","python":"customTimeFrameBarsUnloadedEventArgs.CustomTimeFrame: CustomTimeFrame","summary":"Gets custom time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.BarsUnloaded += OnCustomTimeFrameBarsUnloaded;\n}\n\nprivate void OnCustomTimeFrameBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)\n{\n    Print(\"Bars unloaded for custom time frame {0} ({1})\", args.CustomTimeFrame.Name, args.CustomTimeFrame.TimeFrame);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.BarsUnloaded += self.on_custom_time_frame_bars_unloaded\n\ndef on_custom_time_frame_bars_unloaded(self, args):\n    api.Print(f\"Bars unloaded for custom time frame {args.CustomTimeFrame.Name} ({args.CustomTimeFrame.TimeFrame})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/CustomTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameBarsUnloadedEventArgs/CustomTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomTimeFrameNewChartEventArgs","kind":"class","name":"CustomTimeFrameNewChartEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class CustomTimeFrameNewChartEventArgs","python":"CustomTimeFrameNewChartEventArgs","summary":"Provides data for custom time frame NewChart event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;\n}\n\nprivate void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)\n{\n    Print(\"New {0} chart opened for {1}\", args.CustomTimeFrame.Name, args.CustomBars.Symbol.Name);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart\n\ndef on_custom_time_frame_new_chart(self, args):\n    api.Print(f\"New {args.CustomTimeFrame.Name} chart opened for {args.CustomBars.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameNewChartEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.CustomTimeFrameNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"customTimeFrameNewChartEventArgs.Chart: Chart","summary":"Chart that is newly opened or switched to custom time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;\n}\n\nprivate void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)\n{\n    args.Chart.DrawStaticText(\"info\", \"Custom time frame chart\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart\n\ndef on_custom_time_frame_new_chart(self, args):\n    args.Chart.DrawStaticText(\"info\", \"Custom time frame chart\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameNewChartEventArgs.CustomBars","kind":"property","name":"CustomBars","type":"T:cAlgo.API.CustomTimeFrameNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomBars CustomBars {get;}","python":"customTimeFrameNewChartEventArgs.CustomBars: CustomBars","summary":"Gets custom bars for the newly opened custom time frame chart.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomBars","pythonType":"CustomBars","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;\n}\n\nprivate void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)\n{\n    var symbol = args.CustomBars.Symbol;\n    args.CustomBars.AppendBar(new CustomBar(Server.Time, symbol.Bid, symbol.Bid, symbol.Bid, symbol.Bid, 0));\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart\n\ndef on_custom_time_frame_new_chart(self, args):\n    symbol = args.CustomBars.Symbol\n    args.CustomBars.AppendBar(CustomBar(api.Server.Time, symbol.Bid, symbol.Bid, symbol.Bid, symbol.Bid, 0))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/CustomBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/CustomBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.CustomTimeFrameNewChartEventArgs.CustomTimeFrame","kind":"property","name":"CustomTimeFrame","type":"T:cAlgo.API.CustomTimeFrameNewChartEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public CustomTimeFrame CustomTimeFrame {get;}","python":"customTimeFrameNewChartEventArgs.CustomTimeFrame: CustomTimeFrame","summary":"Gets custom time frame.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customTimeFrame = TimeFrameManager.Custom.Add(\"My Time Frame\");\n    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;\n}\n\nprivate void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)\n{\n    Print(\"Custom time frame: {0} | Description: {1}\", args.CustomTimeFrame.Name, args.CustomTimeFrame.Description);\n}","python":"def on_start(self):\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Time Frame\")\n    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart\n\ndef on_custom_time_frame_new_chart(self, args):\n    api.Print(f\"Custom time frame: {args.CustomTimeFrame.Name} | Description: {args.CustomTimeFrame.Description}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/CustomTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomTimeFrameNewChartEventArgs/CustomTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.CustomTimeFrames","kind":"interface","name":"CustomTimeFrames","type":null,"namespace":"cAlgo.API","group":"Custom","csharp":"public interface CustomTimeFrames","python":"CustomTimeFrames","summary":"Represents collection of custom time frames.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing cAlgo.API.Internals;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class CustomTimeFrameTest : Plugin\n{\n    private const string InitialDescription = \"This is custom time frame initial description\";\n    private const string ChangedDescription = \"This is custom time frame changed description\";\n\n    private bool _isLoadMoreEnabled = true;\n\n    private CustomTimeFrame _customTimeFrame;\n    private CustomBars _customBars;\n\n    protected override void OnStart()\n    {\n        var panel = new StackPanel();\n\n        var addCustomTimeFrameButton = new Button { Text = \"Add Custom Time Frame\" };\n\n        addCustomTimeFrameButton.Click += OnAddCustomTimeFrameButtonClick;\n\n        panel.AddChild(addCustomTimeFrameButton);\n\n        var removeCustomTimeFrameButton = new Button { Text = \"Remove Custom Time Frame\" };\n\n        removeCustomTimeFrameButton.Click += OnRemoveCustomTimeFrameButtonClick;\n\n        panel.AddChild(removeCustomTimeFrameButton);\n\n        var displayChartInfoButton = new Button { Text = \"Display Charts Info\" };\n\n        displayChartInfoButton.Click += OnDisplayChartInfoButtonClick;\n\n        panel.AddChild(displayChartInfoButton);\n\n        var changeDescriptionButton = new Button { Text = \"Change Description\" };\n\n        changeDescriptionButton.Click += OnChangeDescriptionButtonClick;\n\n        panel.AddChild(changeDescriptionButton);\n\n        var pauseOrResumeLoadMoreButton = new Button { Text = \"Pause / Resume Load More\" };\n        pauseOrResumeLoadMoreButton.Click += OnPauseOrResumeLoadMoreButtonClick;\n\n        panel.AddChild(pauseOrResumeLoadMoreButton);\n\n        var showRegularBarsInfoButton = new Button { Text = \"Show Regular Bars Info\" };\n        showRegularBarsInfoButton.Click += OnShowRegularBarsInfoButtonClick;\n\n        panel.AddChild(showRegularBarsInfoButton);\n\n        var addBarsButton = new Button { Text = \"Add Bars For Active Chart Symbol\" };\n        addBarsButton.Click += OnAddBarsButtonClick;\n\n        panel.AddChild(addBarsButton);\n\n        var removeBarsButton = new Button { Text = \"Remove Bars For Active Chart Symbol\" };\n        removeBarsButton.Click += OnRemoveBarsButtonClick;\n\n        panel.AddChild(removeBarsButton);\n\n        var updateLastBarButton = new Button { Text = \"Update Last Bar\" };\n        updateLastBarButton.Click += OnUpdateLastBarButtonClick;\n\n        panel.AddChild(updateLastBarButton);\n\n        var block = Asp.SymbolTab.AddBlock(\"Custom Time Frame Test\");\n\n        block.Child = panel;\n\n        ChartManager.FramesAdded += OnChartManagerFramesAdded;\n\n        TimeFrames.Added += OnTimeFramesAdded;\n        TimeFrames.Removed += OnTimeFramesRemoved;\n    }\n\n    private void OnTimeFramesRemoved(TimeFramesRemovedEventArgs args)\n    {\n        Print($\"TimeFrames Removed: {string.Join(\", \", args.TimeFrames.Select(tf => tf.Name))}\");\n    }\n\n    private void OnTimeFramesAdded(TimeFramesAddedEventArgs args)\n    {\n        Print($\"TimeFrames Added: {string.Join(\", \", args.TimeFrames.Select(tf => tf.Name))}\");\n    }\n\n    private void OnChartManagerFramesAdded(FramesAddedEventArgs obj)\n    {\n        if (obj.AddedFrames[0] is not ChartFrame chartFrame)\n            return;\n\n        Print($\"New chart frame added, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\");\n    }\n\n    private void OnUpdateLastBarButtonClick(ButtonClickEventArgs obj)\n    {\n        var changeAmount = (_customBars.Bars.LastBar.High - _customBars.Bars.LastBar.Low) * (Random.Shared.NextDouble() + 0.5) * 2;\n\n        Print($\"Chaning Last Bar: {_customBars.Bars.LastBar} | change: {changeAmount}\");\n\n        _customBars.UpdateLastBar(_customBars.Bars.LastBar.Open, _customBars.Bars.LastBar.Open + changeAmount, _customBars.Bars.LastBar.Open - changeAmount, _customBars.Bars.LastBar.Close + changeAmount, (int)_customBars.Bars.LastBar.TickVolume + 1);\n    }\n\n    private void OnRemoveCustomTimeFrameButtonClick(ButtonClickEventArgs obj)\n    {\n        TimeFrameManager.Custom.Remove(_customTimeFrame);\n\n        Print($\"Custom Time frame '{_customTimeFrame.Name}' has been removed.\");\n    }\n\n    private void OnDisplayChartInfoButtonClick(ButtonClickEventArgs obj)\n    {\n        DisplayChartsInfo();\n    }\n\n    private void OnChangeDescriptionButtonClick(ButtonClickEventArgs obj)\n    {\n        _customTimeFrame.Description = _customTimeFrame.Description == InitialDescription ? ChangedDescription : InitialDescription;\n\n        Print($\"Changed description to: {_customTimeFrame.Description}\");\n    }\n\n    private void OnPauseOrResumeLoadMoreButtonClick(ButtonClickEventArgs obj)\n    {\n        _isLoadMoreEnabled = !_isLoadMoreEnabled;\n    }\n\n    private void OnAddBarsButtonClick(ButtonClickEventArgs obj)\n    {\n        if (ChartManager.ActiveFrame is not ChartFrame { Chart: var chart })\n            return;\n\n        var bars = _customTimeFrame.AddBars(chart.Symbol);\n\n        Print($\"Added Bars, Count: {bars.Bars.Count}, Get: {bars == _customTimeFrame.GetBars(chart.Symbol)}\");\n    }\n\n    private void OnRemoveBarsButtonClick(ButtonClickEventArgs obj)\n    {\n        if (ChartManager.ActiveFrame is not ChartFrame { Chart: var chart })\n            return;\n\n        var result = _customTimeFrame.RemoveBars(chart.Symbol);\n\n        Print($\"Removed Bars, Result: {result}, Get is null: {_customTimeFrame.GetBars(chart.Symbol) == null}\");\n    }\n\n    private void OnShowRegularBarsInfoButtonClick(ButtonClickEventArgs obj)\n    {\n        Print($\"Regular Bars, Count: {_customBars.Bars.Count}, LastBar: {_customBars.Bars.LastBar}, FirstBar: {_customBars.Bars[0]}\");\n    }\n\n    private void OnAddCustomTimeFrameButtonClick(ButtonClickEventArgs obj)\n    {\n        _customTimeFrame = TimeFrameManager.Custom.Add(\"Test\");\n\n        _customTimeFrame.Description = InitialDescription;\n        _customTimeFrame.BarsNeeded = OnCustomTimeFrameBarsNeeded;\n\n        Print($\"Custom Time frame '{_customTimeFrame.Name}' has been added.\");\n\n        DisplayChartsInfo();\n    }\n\n    private void DisplayChartsInfo()\n    {\n        foreach (var frame in ChartManager)\n        {\n            if (frame is not ChartFrame chartFrame)\n                continue;\n\n            Print($\"Chart, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\");\n        }\n    }\n\n    private void OnCustomTimeFrameBarsNeeded(CustomTimeFrameBarsNeededArgs args)\n    {\n        Print($\"Bars Needed for custom time frame, Symbol: {args.CustomBars.Symbol}, Name: {args.CustomTimeFrame.Name}\");\n\n        _customBars = args.CustomBars;\n\n        MarketData.GetBarsAsync(TimeFrame.Daily, args.CustomBars.Symbol.Name, bars =>\n        {\n            Print($\"Bars Loaded: {bars.Count}\");\n\n            Sleep(TimeSpan.FromSeconds(5));\n\n            args.CustomBars.AppendBars(bars.Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (int)bar.TickVolume)));\n\n            args.CustomBars.NeedsMore += _ =>\n            {\n                if (!_isLoadMoreEnabled)\n                {\n                    Print(\"Needs more requested but load more is disabled\");\n                    return;\n                }\n\n                Print($\"Bars NeedsMore\");\n\n                bars.LoadMoreHistoryAsync(loadedMoreArgs =>\n                {\n                    Print($\"Bars Loaded more: {loadedMoreArgs.Count}\");\n\n                    if (loadedMoreArgs.Count == 0)\n                        return;\n\n                    Sleep(TimeSpan.FromSeconds(5));\n                    args.CustomBars.PrependBars(bars.Take(loadedMoreArgs.Count).Select(bar => new CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, (int)bar.TickVolume)));\n                });\n            };\n        });\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, TimeSpan, Array, DayOfWeek\nimport random\n\nclass Test():\n    InitialDescription = \"This is custom time frame initial description\"\n    ChangedDescription = \"This is custom time frame changed description\"\n\n    def on_start(self):\n        self.isLoadMoreEnabled = True\n        self.customTimeFrame = None\n\n        panel = StackPanel()\n\n        addCustomTimeFrameButton = Button()\n        addCustomTimeFrameButton.Text = \"Add Custom TimeFrame\"\n        addCustomTimeFrameButton.Click += self.on_add_custom_time_frame_button_click\n\n        panel.AddChild(addCustomTimeFrameButton)\n\n        removeCustomTimeFrameButton = Button()\n        removeCustomTimeFrameButton.Text = \"Remove Custom TimeFrame\"\n        removeCustomTimeFrameButton.Click += self.on_remove_custom_time_frame_button_click\n\n        panel.AddChild(removeCustomTimeFrameButton)\n\n        displayChartInfoButton = Button()\n        displayChartInfoButton.Text = \"Display Charts Info\"\n        displayChartInfoButton.Click += self.on_display_chart_info_button_click\n\n        panel.AddChild(displayChartInfoButton)\n\n        changeDescriptionButton = Button()\n        changeDescriptionButton.Text = \"Change Description\"\n        changeDescriptionButton.Click += self.on_change_description_button_click\n\n        panel.AddChild(changeDescriptionButton)\n\n        pauseOrResumeLoadMoreButton = Button()\n        pauseOrResumeLoadMoreButton.Text = \"Pause / Resume Load More\"\n        pauseOrResumeLoadMoreButton.Click += self.on_pause_or_resume_load_more_button_click\n\n        panel.AddChild(pauseOrResumeLoadMoreButton)\n\n        showRegularBarsInfoButton = Button()\n        showRegularBarsInfoButton.Text = \"Show Regular Bars Info\"\n        showRegularBarsInfoButton.Click += self.on_show_regular_bars_info_button_click\n\n        panel.AddChild(showRegularBarsInfoButton)\n\n        addBarsButton = Button()\n        addBarsButton.Text = \"Add Bars For Active Chart Symbol\"\n        addBarsButton.Click += self.on_add_bars_button_click\n\n        panel.AddChild(addBarsButton)\n\n        removeBarsButton = Button()\n        removeBarsButton.Text = \"Remove Bars For Active Chart Symbol\"\n        removeBarsButton.Click += self.on_remove_bars_button_click\n\n        panel.AddChild(removeBarsButton)\n\n        updateLastBarButton = Button()\n        updateLastBarButton.Text = \"Update Last Bar\"\n        updateLastBarButton.Click += self.on_update_last_bar_button_click\n\n        panel.AddChild(updateLastBarButton)\n\n        block = api.Asp.SymbolTab.AddBlock(\"Custom TimeFrame Test\")\n        block.Child = panel\n        block.Height = 550\n\n        api.ChartManager.FramesAdded += self.on_chart_manager_frames_addded\n\n        api.TimeFrames.Added += self.on_time_frames_added\n        api.TimeFrames.Removed += self.on_time_frames_removed\n\n    def on_add_custom_time_frame_button_click(self, args):\n        self.customTimeFrame = api.TimeFrameManager.Custom.Add(\"Test\")\n        self.customTimeFrame.Description = self.InitialDescription\n        self.customTimeFrame.BarsNeeded = Action[CustomTimeFrameBarsNeededArgs](self.on_custom_time_frame_bars_needed)\n\n        print(f\"custom TimeFrame '{self.customTimeFrame.Name}' has been added.\")\n\n    def on_custom_time_frame_bars_needed(self, args):\n        print(f\"Bars Needed for custom TimeFrame, Symbol: {args.CustomBars.Symbol}, Name: {args.CustomTimeFrame.Name}\")\n\n        self.customBars = args.CustomBars\n\n        api.MarketData.GetBarsAsync(TimeFrame.Daily, args.CustomBars.Symbol.Name, Action[Bars](self.on_bars_received))\n\n    def on_bars_received(self, bars):\n        print(f\"Bars Loaded: {bars.Count}\")\n\n        api.Sleep(2000)\n\n        self.customBars.AppendBars(self.to_array([CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)) for bar in bars], CustomBar))\n        self.customBars.NeedsMore += lambda args: self.on_custom_bars_needs_more(bars, args.CustomBars)\n\n        bars.BarOpened += lambda args: self.on_bar_opened(self.customBars, args.Bars)\n        bars.Tick += lambda args: self.on_tick(self.customBars, args.Bars)\n\n    def on_custom_bars_needs_more(self, bars, customBars):\n        if self.isLoadMoreEnabled is False:\n            print(\"Needs more requested but load more is disabled\")\n            return\n\n        print(\"Bars NeedsMore\")\n\n        bars.LoadMoreHistoryAsync(Action[BarsHistoryLoadedEventArgs](lambda args: self.on_bars_more_history_loaded(customBars, bars, args.Count)))\n\n    def on_bars_more_history_loaded(self, customBars, bars, loadedCount):\n        print(f\"Bars Loaded more: {loadedCount}\")\n\n        if loadedCount == 0:\n            return\n\n        api.Sleep(2000)\n\n        loadedBars = []\n\n        for i, bar in enumerate(bars):\n            if i >= loadedCount:\n                break\n            loadedBars.append(CustomBar(bar.OpenTime, bar.Open, bar.High, bar.Low, bar.Close, int(bar.TickVolume)))\n\n        customBars.PrependBars(self.to_array(loadedBars, CustomBar))\n\n    def on_bar_opened(self, customBars, bars):\n        if self.customTimeFrame is None:\n            return\n\n        customBars.AppendBar(CustomBar(bars.LastBar.OpenTime, bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume))\n\n    def on_tick(self, customBars, bars):\n        if self.customTimeFrame is None:\n            return\n\n        customBars.UpdateLastBar(bars.LastBar.Open, bars.LastBar.High, bars.LastBar.Low, bars.LastBar.Close, bars.LastBar.TickVolume)\n\n    def on_remove_custom_time_frame_button_click(self, args):\n        if api.TimeFrameManager.Custom.Remove(self.customTimeFrame) == False:\n            return\n\n        print(f\"custom TimeFrame '{self.customTimeFrame.Name}' has been removed.\")\n        self.customTimeFrame = None\n\n    def on_display_chart_info_button_click(self, args):\n        for frame in api.ChartManager:\n            if isinstance(frame.__implementation__, ChartFrame) == False:\n                continue\n\n            chartFrame = ChartFrame(frame)\n            print(f\"Chart, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\")\n\n    def on_change_description_button_click(self, args):\n        self.customTimeFrame.Description = self.ChangedDescription if self.customTimeFrame.Description == self.InitialDescription else self.InitialDescription\n        print(f\"Changed description to: {self.customTimeFrame.Description}\")\n\n    def to_array(self, iterable, itemType):\n        length = len(iterable)\n        array = Array[itemType](length)\n        for i in range(length):\n            array[i] = iterable[i]\n\n        return array\n\n    def on_pause_or_resume_load_more_button_click(self, args):\n        self.isLoadMoreEnabled = not self.isLoadMoreEnabled\n\n    def on_show_regular_bars_info_button_click(self, args):\n        print(f\"Regular Bars, Count: {self.customBars.Bars.Count}, LastBar: {self.customBars.Bars.LastBar}, FirstBar: {self.customBars.Bars[0]}\")\n\n    def on_add_bars_button_click(self, args):\n        if isinstance(api.ChartManager.ActiveFrame.__implementation__, ChartFrame) == False:\n            return\n        chart = ChartFrame(api.ChartManager.ActiveFrame).Chart\n        bars = self.customTimeFrame.AddBars(chart.Symbol)\n        print(f\"Added Bars, Count: {bars.Bars.Count}, Get: {bars == self.customTimeFrame.GetBars(chart.Symbol)}\")\n\n    def on_remove_bars_button_click(self, args):\n        if isinstance(api.ChartManager.ActiveFrame.__implementation__, ChartFrame) == False:\n            return\n        chart = ChartFrame(api.ChartManager.ActiveFrame).Chart\n        result = self.customTimeFrame.RemoveBars(chart.Symbol)\n        print(f\"Removed Bars, Result: {result}, Get is None: {self.customTimeFrame.GetBars(chart.Symbol) is None}\")\n\n    def on_update_last_bar_button_click(self, args):\n        changeAmount = (self.customBars.Bars.LastBar.High - self.customBars.Bars.LastBar.Low) * (random.random() + 0.5) * 2\n        print(f\"Changing Last Bar: {self.customBars.Bars.LastBar} | change: {changeAmount}\")\n        bars = self.customBars.Bars\n        self.customBars.UpdateLastBar(bars.LastBar.Open, bars.LastBar.Open + changeAmount, bars.LastBar.Open - changeAmount, bars.LastBar.Close + changeAmount, int(bars.LastBar.TickVolume + 1))\n\n    def on_chart_manager_frames_addded(self, args):\n        for frame in args.AddedFrames:\n            if isinstance(frame.__implementation__, ChartFrame) == False:\n                continue\n            chartFrame = ChartFrame(frame)\n            print(f\"New chart frame added, {chartFrame.Symbol.Name} {chartFrame.TimeFrame.Name}\")\n\n    def on_time_frames_added(self, args):\n        print(f\"TimeFrames Added: {', '.join([tf.Name for tf in args.TimeFrames])}\")\n\n    def on_time_frames_removed(self, args):\n        print(f\"TimeFrames Removed: {', '.join([tf.Name for tf in args.TimeFrames])}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrames.Add(System.String)","kind":"method","name":"Add","type":"T:cAlgo.API.CustomTimeFrames","namespace":"cAlgo.API","group":"Custom","csharp":"CustomTimeFrame Add(string name)","python":"customTimeFrames.Add(name: str) -> CustomTimeFrame","summary":"Adds a new custom time frame.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Custom time frame unique name."}],"returns":{"csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"CustomTimeFrame","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Add(\"My Custom TF\");\ncustomTimeFrame.Description = \"Bars provided by my plugin\";\nPrint(\"Added custom time frame {0}\", customTimeFrame.Name);","python":"customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\ncustomTimeFrame.Description = \"Bars provided by my plugin\"\napi.Print(f\"Added custom time frame {customTimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrames.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.CustomTimeFrames","namespace":"cAlgo.API","group":"Custom","csharp":"CustomTimeFrame Get(string name)","python":"customTimeFrames.Get(name: str) -> CustomTimeFrame | None","summary":"Returns a custom time frame by it's name.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Name of custom time frame"}],"returns":{"csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"CustomTimeFrame if custom time frame found otherwise null.","nullable":true},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\");\nif (customTimeFrame == null)\n    Print(\"Custom time frame not found\");\nelse\n    Print(\"Found custom time frame: {0}\", customTimeFrame.Description);","python":"customTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is None:\n    api.Print(\"Custom time frame not found\")\nelse:\n    api.Print(f\"Found custom time frame: {customTimeFrame.Description}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.CustomTimeFrames.Remove(cAlgo.API.CustomTimeFrame)","kind":"method","name":"Remove","type":"T:cAlgo.API.CustomTimeFrames","namespace":"cAlgo.API","group":"Custom","csharp":"bool Remove(CustomTimeFrame customTimeFrame)","python":"customTimeFrames.Remove(customTimeFrame: CustomTimeFrame) -> bool","summary":"Removes a custom time frame.","remarks":null,"parameters":[{"name":"customTimeFrame","csharpType":"CustomTimeFrame","pythonType":"CustomTimeFrame","summary":"Custom time frame"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove was successful otherwise False.","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\");\nif (customTimeFrame != null)\n    Print(\"Custom time frame removed: {0}\", TimeFrameManager.Custom.Remove(customTimeFrame));","python":"customTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is not None:\n    api.Print(f\"Custom time frame removed: {api.TimeFrameManager.Custom.Remove(customTimeFrame)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Indicators.CyberCycle","kind":"interface","name":"CyberCycle","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface CyberCycle","python":"CyberCycle","summary":"The Cyber Cycles Oscillator is an indicator designed by John Ehlers, it is used for isolating the cycle component of the market from its trend counterpart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cyberCycle = Indicators.CyberCycle(0.07);\nPrint(\"Cycle: {0}, Trigger: {1}\", cyberCycle.Cycle.Last(1), cyberCycle.Trigger.Last(1));","python":"cyberCycle = api.Indicators.CyberCycle(0.07)\napi.Print(f\"Cycle: {cyberCycle.Cycle.Last(1)}, Trigger: {cyberCycle.Trigger.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Cyber Cycle indicator\n    public partial class CyberCycleSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private CyberCycle _cyberCycle;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _cyberCycle = Indicators.CyberCycle(0.07);\n        }\n\n        protected override void OnBar()\n        {\n            if (_cyberCycle.Cycle.Last(1) > _cyberCycle.Trigger.Last(1) && _cyberCycle.Cycle.Last(2) <= _cyberCycle.Trigger.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_cyberCycle.Cycle.Last(1) < _cyberCycle.Trigger.Last(1) && _cyberCycle.Cycle.Last(2) >= _cyberCycle.Trigger.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass CyberCycleSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.cyberCycle = api.Indicators.CyberCycle(0.07)\n\n    def on_bar_closed(self):\n        if self.cyberCycle.Cycle.Last(0) > self.cyberCycle.Trigger.Last(0) and self.cyberCycle.Cycle.Last(1) <= self.cyberCycle.Trigger.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.cyberCycle.Cycle.Last(0) < self.cyberCycle.Trigger.Last(0) and self.cyberCycle.Cycle.Last(1) >= self.cyberCycle.Trigger.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.CyberCycle.Cycle","kind":"property","name":"Cycle","type":"T:cAlgo.API.Indicators.CyberCycle","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Cycle {get; set;}","python":"cyberCycle.Cycle: IndicatorDataSeries","summary":"The Cyber Cycles Oscillator plot.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cyberCycle = Indicators.CyberCycle(0.07);\nPrint(\"Cyber Cycle: {0}\", cyberCycle.Cycle.Last(1));","python":"cyberCycle = api.Indicators.CyberCycle(0.07)\napi.Print(f\"Cyber Cycle: {cyberCycle.Cycle.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/Cycle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/Cycle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.CyberCycle.Trigger","kind":"property","name":"Trigger","type":"T:cAlgo.API.Indicators.CyberCycle","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Trigger {get; set;}","python":"cyberCycle.Trigger: IndicatorDataSeries","summary":"The CCO plot shifted one bar back; crossovers of the two plots suggest Buy/Sell signals.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cyberCycle = Indicators.CyberCycle(0.07);\nif (cyberCycle.Cycle.Last(1) > cyberCycle.Trigger.Last(1) && cyberCycle.Cycle.Last(2) <= cyberCycle.Trigger.Last(2))\n    Print(\"Cycle crossed above Trigger: {0}\", cyberCycle.Trigger.Last(1));","python":"cyberCycle = api.Indicators.CyberCycle(0.07)\nif cyberCycle.Cycle.Last(1) > cyberCycle.Trigger.Last(1) and cyberCycle.Cycle.Last(2) <= cyberCycle.Trigger.Last(2):\n    api.Print(f\"Cycle crossed above Trigger: {cyberCycle.Trigger.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/Trigger/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/CyberCycle/Trigger/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DataSeries","kind":"interface","name":"DataSeries","type":null,"namespace":"cAlgo.API","group":"Data Series","csharp":"public interface DataSeries","python":"DataSeries","summary":"Represents a read only list of values, typically used to represent market price series. The values are accessed with an array-like [] operator.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class MidpointIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n        if (index == 0)\n            return;\n\n        Result[index] = (Source[index] + Source[index - 1]) / 2;\n\n        if (IsLastBar)\n            Print(\"Last value: {0}, previous value: {1}, count: {2}\", Source.LastValue, Source.Last(1), Source.Count);\n    }\n}","python":"def calculate(self, index):\n    if index == 0:\n        return\n    api.Result[index] = (api.Source[index] + api.Source[index - 1]) / 2\n    if api.IsLastBar:\n        api.Print(f\"Last value: {api.Source.LastValue}, previous value: {api.Source.Last(1)}, count: {api.Source.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.DataSeries.Last(System.Int32)","kind":"method","name":"Last","type":"T:cAlgo.API.DataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"double Last(int index)","python":"dataSeries.Last(index: int) -> float","summary":"Access a value in the data series certain bars ago","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Number of bars ago"}],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var previousClose = Bars.ClosePrices.Last(1);\nvar closeFiveBarsAgo = Bars.ClosePrices.Last(5);\nPrint(\"Previous close: {0}, close 5 bars ago: {1}\", previousClose, closeFiveBarsAgo);","python":"previousClose = api.Bars.ClosePrices.Last(1)\ncloseFiveBarsAgo = api.Bars.ClosePrices.Last(5)\napi.Print(f\"Previous close: {previousClose}, close 5 bars ago: {closeFiveBarsAgo}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Last/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Last/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DataSeries.Count","kind":"property","name":"Count","type":"T:cAlgo.API.DataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"int Count {get;}","python":"dataSeries.Count: int","summary":"Gets the total number of elements contained in the DataSeries.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var count = Bars.ClosePrices.Count;\nPrint(\"Close prices count: {0}, last close: {1}\", count, Bars.ClosePrices[count - 1]);","python":"count = api.Bars.ClosePrices.Count\napi.Print(f\"Close prices count: {count}, last close: {api.Bars.ClosePrices[count - 1]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DataSeries.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.DataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"double Item {get;}","python":"dataSeries[index: int] -> float","summary":"Gets the value in the data series at the specified position.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var closePrices = Bars.ClosePrices;\nvar lastIndex = closePrices.Count - 1;\nvar sum = 0.0;\nfor (var i = lastIndex - 9; i <= lastIndex; i++)\n    sum += closePrices[i];\nPrint(\"Average of the last 10 closes: {0}\", sum / 10);","python":"closePrices = api.Bars.ClosePrices\nlastIndex = closePrices.Count - 1\ntotal = 0.0\nfor i in range(lastIndex - 9, lastIndex + 1):\n    total += closePrices[i]\napi.Print(f\"Average of the last 10 closes: {total / 10}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DataSeries.LastValue","kind":"property","name":"LastValue","type":"T:cAlgo.API.DataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"double LastValue {get;}","python":"dataSeries.LastValue: float","summary":"Gets the last value of this DataSeries.","remarks":"The last value may represent one of the values of the last bar of the market series, e.g. Open, High, Low and Close. Therefore, take into consideration that on each tick, except the Open price, the rest of the values will most probably change.","parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    var lastClose = Bars.ClosePrices.LastValue;\n    Print(\"Close price of the forming bar: {0}\", lastClose);\n}","python":"def on_tick(self):\n    lastClose = api.Bars.ClosePrices.LastValue\n    api.Print(f\"Close price of the forming bar: {lastClose}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/LastValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/LastValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DateTimePicker","kind":"class","name":"DateTimePicker","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class DateTimePicker : ControlBase","python":"DateTimePicker","summary":"Represents the date time picker control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       var dateTimePicker = new DateTimePicker\n       {\n            Value = Server.Time,\n            MaxValue = Server.Time.AddMonths(1),\n            MinValue = Server.Time.AddMonths(-1)\n       };\n\n       dateTimePicker.ValueChanged += args => Print($\"Date Time Picker value change to: {args.NewValue}\");\n\n       var changeValueButton = new Button {Text = \"Change Value\"};\n\n       changeValueButton.Click += args => dateTimePicker.Value = Server.Time.AddDays(1);\n\n       var panel = new StackPanel\n       {\n            Orientation = Orientation.Vertical,\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center\n       };\n\n       panel.AddChild(dateTimePicker);\n       panel.AddChild(changeValueButton);\n\n       Chart.AddControl(panel);\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.dateTimePicker = DateTimePicker()\n        self.dateTimePicker.Value = api.Server.Time\n        self.dateTimePicker.MaxValue = api.Server.Time.AddMonths(1)\n        self.dateTimePicker.MinValue = api.Server.Time.AddMonths(-1)\n\n        self.dateTimePicker.ValueChanged += lambda args: api.Print(f\"Date Time Picker value change to: {args.NewValue}\")\n\n        changeValueButton = Button()\n        changeValueButton.Text = \"Change Value\"\n        changeValueButton.Click += self.on_change_value_button_clicked\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        panel.AddChild(self.dateTimePicker)\n        panel.AddChild(changeValueButton)\n\n        api.Chart.AddControl(panel)\n\n    def on_change_value_button_clicked(self, args):\n        self.dateTimePicker.Value = api.Server.Time.AddDays(1)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.DateTimePicker.#ctor","kind":"constructor","name":"DateTimePicker","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public DateTimePicker()","python":"DateTimePicker()","summary":"Initializes a new instance of the DateTimePicker class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var dateTimePicker = new DateTimePicker { Value = Server.Time, Width = 200 };\nChart.AddControl(dateTimePicker);","python":"dateTimePicker = DateTimePicker()\ndateTimePicker.Value = api.Server.Time\ndateTimePicker.Width = 200\napi.Chart.AddControl(dateTimePicker)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DateTimePicker.MaxValue","kind":"property","name":"MaxValue","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public DateTime MaxValue {get; set;}","python":"dateTimePicker.MaxValue: DateTime","summary":"Gets or sets maximum value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var dateTimePicker = new DateTimePicker { Value = Server.Time, MaxValue = Server.Time.AddDays(30) };\nChart.AddControl(dateTimePicker);\nPrint(\"Latest allowed date: {0}\", dateTimePicker.MaxValue);","python":"dateTimePicker = DateTimePicker()\ndateTimePicker.Value = api.Server.Time\ndateTimePicker.MaxValue = api.Server.Time.AddDays(30)\napi.Chart.AddControl(dateTimePicker)\napi.Print(f\"Latest allowed date: {dateTimePicker.MaxValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/MaxValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/MaxValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DateTimePicker.MinValue","kind":"property","name":"MinValue","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public DateTime MinValue {get; set;}","python":"dateTimePicker.MinValue: DateTime","summary":"Gets or sets minimum value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var dateTimePicker = new DateTimePicker { Value = Server.Time, MinValue = Bars.OpenTimes[0] };\nChart.AddControl(dateTimePicker);\nPrint(\"Earliest allowed date: {0}\", dateTimePicker.MinValue);","python":"dateTimePicker = DateTimePicker()\ndateTimePicker.Value = api.Server.Time\ndateTimePicker.MinValue = api.Bars.OpenTimes[0]\napi.Chart.AddControl(dateTimePicker)\napi.Print(f\"Earliest allowed date: {dateTimePicker.MinValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/MinValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/MinValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DateTimePicker.ShowTimeInput","kind":"property","name":"ShowTimeInput","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public bool ShowTimeInput {get; set;}","python":"dateTimePicker.ShowTimeInput: bool","summary":"Gets or sets whether show time picker input or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var datePicker = new DateTimePicker { Value = Server.Time.Date, ShowTimeInput = false };\nChart.AddControl(datePicker);","python":"datePicker = DateTimePicker()\ndatePicker.Value = api.Server.Time.Date\ndatePicker.ShowTimeInput = False\napi.Chart.AddControl(datePicker)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/ShowTimeInput/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/ShowTimeInput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DateTimePicker.Value","kind":"property","name":"Value","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public DateTime Value {get; set;}","python":"dateTimePicker.Value: DateTime","summary":"Gets or sets value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var dateTimePicker = new DateTimePicker { Value = Server.Time.AddHours(1) };\nChart.AddControl(dateTimePicker);\nPrint(\"Selected time: {0}\", dateTimePicker.Value);","python":"dateTimePicker = DateTimePicker()\ndateTimePicker.Value = api.Server.Time.AddHours(1)\napi.Chart.AddControl(dateTimePicker)\napi.Print(f\"Selected time: {dateTimePicker.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.DateTimePicker.ValueChanged","kind":"event","name":"ValueChanged","type":"T:cAlgo.API.DateTimePicker","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<DateTimePickerValueChangedEventArgs> ValueChanged;","python":"dateTimePicker.ValueChanged += handler  # handler(obj: DateTimePickerValueChangedEventArgs)","summary":"Occurs when value is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<DateTimePickerValueChangedEventArgs>","pythonType":"Callable[[DateTimePickerValueChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"var dateTimePicker = new DateTimePicker { Value = Server.Time };\ndateTimePicker.ValueChanged += args => Print(\"Value changed from {0} to {1}\", args.OldValue, args.NewValue);\nChart.AddControl(dateTimePicker);","python":"def on_start(self):\n    dateTimePicker = DateTimePicker()\n    dateTimePicker.Value = api.Server.Time\n    dateTimePicker.ValueChanged += self.on_value_changed\n    api.Chart.AddControl(dateTimePicker)\n\ndef on_value_changed(self, args):\n    api.Print(f\"Value changed from {args.OldValue} to {args.NewValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/ValueChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/ValueChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.DateTimePickerValueChangedEventArgs","kind":"class","name":"DateTimePickerValueChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class DateTimePickerValueChangedEventArgs","python":"DateTimePickerValueChangedEventArgs","summary":"Provides data for the DateTimePicker ValueChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dateTimePicker = new DateTimePicker { Value = Server.Time };\n    dateTimePicker.ValueChanged += OnDateTimePickerValueChanged;\n    Chart.AddControl(dateTimePicker);\n}\n\nprivate void OnDateTimePickerValueChanged(DateTimePickerValueChangedEventArgs args)\n{\n    Print(\"Date changed from {0} to {1}\", args.OldValue, args.NewValue);\n}","python":"def on_start(self):\n    dateTimePicker = DateTimePicker()\n    dateTimePicker.Value = api.Server.Time\n    dateTimePicker.ValueChanged += self.on_date_time_picker_value_changed\n    api.Chart.AddControl(dateTimePicker)\n\ndef on_date_time_picker_value_changed(self, args):\n    api.Print(f\"Date changed from {args.OldValue} to {args.NewValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DateTimePicker.ValueChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DateTimePicker.ValueChanged)."}]}
{"id":"P:cAlgo.API.DateTimePickerValueChangedEventArgs.DateTimePicker","kind":"property","name":"DateTimePicker","type":"T:cAlgo.API.DateTimePickerValueChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public DateTimePicker DateTimePicker {get;}","python":"dateTimePickerValueChangedEventArgs.DateTimePicker: DateTimePicker","summary":"Gets the date time picker control.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTimePicker","pythonType":"DateTimePicker","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dateTimePicker = new DateTimePicker { Value = Server.Time, ShowTimeInput = true };\n    dateTimePicker.ValueChanged += OnDateTimePickerValueChanged;\n    Chart.AddControl(dateTimePicker);\n}\n\nprivate void OnDateTimePickerValueChanged(DateTimePickerValueChangedEventArgs args)\n{\n    Print(\"Picker value: {0}, allowed range: {1} - {2}\", args.DateTimePicker.Value, args.DateTimePicker.MinValue, args.DateTimePicker.MaxValue);\n}","python":"def on_start(self):\n    dateTimePicker = DateTimePicker()\n    dateTimePicker.Value = api.Server.Time\n    dateTimePicker.ShowTimeInput = True\n    dateTimePicker.ValueChanged += self.on_date_time_picker_value_changed\n    api.Chart.AddControl(dateTimePicker)\n\ndef on_date_time_picker_value_changed(self, args):\n    api.Print(f\"Picker value: {args.DateTimePicker.Value}, allowed range: {args.DateTimePicker.MinValue} - {args.DateTimePicker.MaxValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/DateTimePicker/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/DateTimePicker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DateTimePicker.ValueChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DateTimePicker.ValueChanged)."}]}
{"id":"P:cAlgo.API.DateTimePickerValueChangedEventArgs.NewValue","kind":"property","name":"NewValue","type":"T:cAlgo.API.DateTimePickerValueChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public DateTime NewValue {get;}","python":"dateTimePickerValueChangedEventArgs.NewValue: DateTime","summary":"Gets the new selected value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dateTimePicker = new DateTimePicker { Value = Server.Time };\n    dateTimePicker.ValueChanged += OnDateTimePickerValueChanged;\n    Chart.AddControl(dateTimePicker);\n}\n\nprivate void OnDateTimePickerValueChanged(DateTimePickerValueChangedEventArgs args)\n{\n    Chart.DrawVerticalLine(\"selectedTime\", args.NewValue, Color.Yellow);\n}","python":"def on_start(self):\n    dateTimePicker = DateTimePicker()\n    dateTimePicker.Value = api.Server.Time\n    dateTimePicker.ValueChanged += self.on_date_time_picker_value_changed\n    api.Chart.AddControl(dateTimePicker)\n\ndef on_date_time_picker_value_changed(self, args):\n    api.Chart.DrawVerticalLine(\"selectedTime\", args.NewValue, Color.Yellow)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/NewValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/NewValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DateTimePicker.ValueChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DateTimePicker.ValueChanged)."}]}
{"id":"P:cAlgo.API.DateTimePickerValueChangedEventArgs.OldValue","kind":"property","name":"OldValue","type":"T:cAlgo.API.DateTimePickerValueChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public DateTime OldValue {get;}","python":"dateTimePickerValueChangedEventArgs.OldValue: DateTime","summary":"Gets the old selected value.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dateTimePicker = new DateTimePicker { Value = Server.Time };\n    dateTimePicker.ValueChanged += OnDateTimePickerValueChanged;\n    Chart.AddControl(dateTimePicker);\n}\n\nprivate void OnDateTimePickerValueChanged(DateTimePickerValueChangedEventArgs args)\n{\n    var shift = args.NewValue - args.OldValue;\n    Print(\"Previous value: {0}, moved by {1} days\", args.OldValue, shift.TotalDays);\n}","python":"def on_start(self):\n    dateTimePicker = DateTimePicker()\n    dateTimePicker.Value = api.Server.Time\n    dateTimePicker.ValueChanged += self.on_date_time_picker_value_changed\n    api.Chart.AddControl(dateTimePicker)\n\ndef on_date_time_picker_value_changed(self, args):\n    shift = args.NewValue.Subtract(args.OldValue)\n    api.Print(f\"Previous value: {args.OldValue}, moved by {shift.TotalDays} days\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/OldValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DateTimePickerValueChangedEventArgs/OldValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DateTimePicker.ValueChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DateTimePicker.ValueChanged)."}]}
{"id":"T:cAlgo.API.Indicators.DeMarker","kind":"interface","name":"DeMarker","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface DeMarker","python":"DeMarker","summary":"The DeMarker is an oscillator that compares the most recent maximum and minimum prices to the previous period's equivalent price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private DeMarker _deMarker;\n\nprotected override void OnStart()\n{\n    _deMarker = Indicators.DeMarker(14);\n}\n\nprotected override void OnBar()\n{\n    Print(\"DeMarker: {0}\", _deMarker.Result.Last(1));\n}","python":"def on_start(self):\n    self.deMarker = api.Indicators.DeMarker(14)\n\ndef on_bar(self):\n    api.Print(f\"DeMarker: {self.deMarker.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DeMarker/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DeMarker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DeMarker.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.DeMarker","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"deMarker.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the DeMarker calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var deMarker = Indicators.DeMarker(14);\nvar value = deMarker.Result.Last(1);\nif (value > 0.7)\n    Print(\"Overbought: {0}\", value);\nelse if (value < 0.3)\n    Print(\"Oversold: {0}\", value);","python":"deMarker = api.Indicators.DeMarker(14)\nvalue = deMarker.Result.Last(1)\nif value > 0.7:\n    api.Print(f\"Overbought: {value}\")\nelif value < 0.3:\n    api.Print(f\"Oversold: {value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DeMarker/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DeMarker/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Deal","kind":"interface","name":"Deal","type":null,"namespace":"cAlgo.API","group":"Deals","csharp":"public interface Deal","python":"Deal","summary":"Represents a deal.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Position {0} deal {1}: {2} {3} {4} units at {5}, {6}\", position.Id, deal.Id, deal.PositionImpact, deal.TradeType, deal.VolumeInUnits, deal.ExecutionPrice, deal.ExecutionTime);\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        api.Print(f\"Position {position.Id} deal {deal.Id}: {deal.PositionImpact} {deal.TradeType} {deal.VolumeInUnits} units at {deal.ExecutionPrice}, {deal.ExecutionTime}\")"},{"csharp":"foreach (var trade in History)\n{\n    var deal = trade.ClosingDeal;\n    Print(\"Trade closing deal {0}: {1} units at {2}, status {3}\", deal.Id, deal.VolumeInUnits, deal.ExecutionPrice, deal.Status);\n}","python":"for trade in api.History:\n    deal = trade.ClosingDeal\n    api.Print(f\"Trade closing deal {deal.Id}: {deal.VolumeInUnits} units at {deal.ExecutionPrice}, status {deal.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Channel","kind":"property","name":"Channel","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"string Channel {get;}","python":"deal.Channel: str","summary":"Gets the channel.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal channel: {0}\", trade.ClosingDeal.Channel);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal channel: {trade.ClosingDeal.Channel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Channel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Channel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Deals from the cBot's own orders carry channel 'cBot Console' instead of the desktop 'cBot cTrader'."},{"name":"Cloud","support":"Partial","behaviour":"Deals from the cBot's own orders carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'."}]}
{"id":"P:cAlgo.API.Deal.ClosedBy","kind":"property","name":"ClosedBy","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"IReadonlyList<Deal> ClosedBy {get;}","python":"deal.ClosedBy: IReadonlyList[Deal]","summary":"If deal was an opening deal then this property will return the deals that closed current deal.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<Deal>","pythonType":"IReadonlyList[Deal]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals.Where(positionDeal => positionDeal.PositionImpact == DealPositionImpact.Opening))\n        Print(\"Opening deal {0} partially closed by {1} deals\", deal.Id, deal.ClosedBy.Count);\n}","python":"for position in api.Positions:\n    for deal in [positionDeal for positionDeal in position.Deals if positionDeal.PositionImpact == DealPositionImpact.Opening]:\n        api.Print(f\"Opening deal {deal.Id} partially closed by {deal.ClosedBy.Count} deals\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ClosedBy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ClosedBy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Closing","kind":"property","name":"Closing","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"IReadonlyList<Deal> Closing {get;}","python":"deal.Closing: IReadonlyList[Deal]","summary":"If deal was a closing deal then this property will return the deals that were closed by current deal.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<Deal>","pythonType":"IReadonlyList[Deal]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n{\n    foreach (var openingDeal in trade.ClosingDeal.Closing)\n        Print(\"Closing deal closed opening deal {0} executed at {1}\", openingDeal.Id, openingDeal.ExecutionPrice);\n}","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    for openingDeal in trade.ClosingDeal.Closing:\n        api.Print(f\"Closing deal closed opening deal {openingDeal.Id} executed at {openingDeal.ExecutionPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Closing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Closing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"string Comment {get;}","python":"deal.Comment: str","summary":"Gets the comment.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Deal {0} comment: {1}\", deal.Id, deal.Comment);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    for deal in position.Deals:\n        api.Print(f\"Deal {deal.Id} comment: {deal.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.ExecutionPrice","kind":"property","name":"ExecutionPrice","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"double? ExecutionPrice {get;}","python":"deal.ExecutionPrice: float | None","summary":"Returns deal execution price if deal is filled otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null && trade.ClosingDeal.ExecutionPrice.HasValue)\n    Print(\"Closing deal executed at {0}\", trade.ClosingDeal.ExecutionPrice.Value);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None and trade.ClosingDeal.ExecutionPrice is not None:\n    api.Print(f\"Closing deal executed at {trade.ClosingDeal.ExecutionPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ExecutionPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ExecutionPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.ExecutionTime","kind":"property","name":"ExecutionTime","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"DateTime ExecutionTime {get;}","python":"deal.ExecutionTime: DateTime","summary":"Returns deal execution time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal executed at {0}\", trade.ClosingDeal.ExecutionTime);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal executed at {trade.ClosingDeal.ExecutionTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ExecutionTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/ExecutionTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"long Id {get;}","python":"deal.Id: int","summary":"Unique deal Id.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Position {0} has deal {1}\", position.Id, deal.Id);\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        api.Print(f\"Position {position.Id} has deal {deal.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Label","kind":"property","name":"Label","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"string Label {get;}","python":"deal.Label: str","summary":"Gets the label.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Deal {0} label: {1}\", deal.Id, deal.Label);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    for deal in position.Deals:\n        api.Print(f\"Deal {deal.Id} label: {deal.Label}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Label/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Label/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.OrderId","kind":"property","name":"OrderId","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"int OrderId {get;}","python":"deal.OrderId: int","summary":"Order Id.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal was created by order {0}\", trade.ClosingDeal.OrderId);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal was created by order {trade.ClosingDeal.OrderId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/OrderId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/OrderId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.PositionId","kind":"property","name":"PositionId","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"int PositionId {get;}","python":"deal.PositionId: int","summary":"Position Id.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal belongs to position {0}\", trade.ClosingDeal.PositionId);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal belongs to position {trade.ClosingDeal.PositionId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/PositionId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/PositionId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.PositionImpact","kind":"property","name":"PositionImpact","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"DealPositionImpact? PositionImpact {get;}","python":"deal.PositionImpact: DealPositionImpact | None","summary":"Returns deal position impact if deal is filled otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"DealPositionImpact?","pythonType":"DealPositionImpact | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    var openingDeals = position.Deals.Count(deal => deal.PositionImpact == DealPositionImpact.Opening);\n    Print(\"Position {0} opening deals: {1}\", position.Id, openingDeals);\n}","python":"for position in api.Positions:\n    openingDeals = len([deal for deal in position.Deals if deal.PositionImpact == DealPositionImpact.Opening])\n    api.Print(f\"Position {position.Id} opening deals: {openingDeals}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/PositionImpact/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/PositionImpact/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.Status","kind":"property","name":"Status","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus Status {get;}","python":"deal.Status: DealStatus","summary":"Returns status of deal.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Deal {0} status: {1}\", deal.Id, deal.Status);\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        api.Print(f\"Deal {deal.Id} status: {deal.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Status/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/Status/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"string SymbolName {get;}","python":"deal.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal symbol: {0}\", trade.ClosingDeal.SymbolName);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal symbol: {trade.ClosingDeal.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"TradeType TradeType {get;}","python":"deal.TradeType: TradeType","summary":"Gets the TradeType.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Position was {0}, closing deal was {1}\", trade.TradeType, trade.ClosingDeal.TradeType);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Position was {trade.TradeType}, closing deal was {trade.ClosingDeal.TradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Deal.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.Deal","namespace":"cAlgo.API","group":"Deals","csharp":"double VolumeInUnits {get;}","python":"deal.VolumeInUnits: float","summary":"Deal filled volume amount in units.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n    Print(\"Position {0} filled volume: {1}\", position.Id, position.Deals.Sum(deal => deal.VolumeInUnits));","python":"for position in api.Positions:\n    api.Print(f\"Position {position.Id} filled volume: {sum(deal.VolumeInUnits for deal in position.Deals)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/Deal/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DealPositionImpact","kind":"enum","name":"DealPositionImpact","type":null,"namespace":"cAlgo.API","group":"Deals","csharp":"public enum DealPositionImpact","python":"DealPositionImpact","summary":"Represents the impact of a deal on position.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n    {\n        var impact = deal.PositionImpact == DealPositionImpact.Opening ? \"opened\" : \"closed\";\n        Print(\"Deal {0} {1} {2} units of position {3}\", deal.Id, impact, deal.VolumeInUnits, position.Id);\n    }\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        impact = \"opened\" if deal.PositionImpact == DealPositionImpact.Opening else \"closed\"\n        api.Print(f\"Deal {deal.Id} {impact} {deal.VolumeInUnits} units of position {position.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealPositionImpact.Opening","kind":"enum value","name":"Opening","type":"T:cAlgo.API.DealPositionImpact","namespace":"cAlgo.API","group":"Deals","csharp":"DealPositionImpact.Opening;","python":"DealPositionImpact.Opening","summary":"Opening deal.","remarks":null,"parameters":[],"returns":{"csharpType":"DealPositionImpact","pythonType":"DealPositionImpact","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealPositionImpact.Closing","kind":"enum value","name":"Closing","type":"T:cAlgo.API.DealPositionImpact","namespace":"cAlgo.API","group":"Deals","csharp":"DealPositionImpact.Closing;","python":"DealPositionImpact.Closing","summary":"Closing deal.","remarks":null,"parameters":[],"returns":{"csharpType":"DealPositionImpact","pythonType":"DealPositionImpact","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealPositionImpact/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DealStatus","kind":"enum","name":"DealStatus","type":null,"namespace":"cAlgo.API","group":"Deals","csharp":"public enum DealStatus","python":"DealStatus","summary":"Represents the different status of a deal.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n    {\n        if (deal.Status == DealStatus.PartiallyFilled)\n            Print(\"Deal {0} of position {1} was only partially filled\", deal.Id, position.Id);\n    }\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        if deal.Status == DealStatus.PartiallyFilled:\n            api.Print(f\"Deal {deal.Id} of position {position.Id} was only partially filled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.Filled","kind":"enum value","name":"Filled","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.Filled;","python":"DealStatus.Filled","summary":"Filled.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.PartiallyFilled","kind":"enum value","name":"PartiallyFilled","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.PartiallyFilled;","python":"DealStatus.PartiallyFilled","summary":"Partially filled.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.Rejected","kind":"enum value","name":"Rejected","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.Rejected;","python":"DealStatus.Rejected","summary":"Rejected.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.Error","kind":"enum value","name":"Error","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.Error;","python":"DealStatus.Error","summary":"Error.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.Missed","kind":"enum value","name":"Missed","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.Missed;","python":"DealStatus.Missed","summary":"Missed.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.DealStatus.InternallyRejected","kind":"enum value","name":"InternallyRejected","type":"T:cAlgo.API.DealStatus","namespace":"cAlgo.API","group":"Deals","csharp":"DealStatus.InternallyRejected;","python":"DealStatus.InternallyRejected","summary":"Internally rejected.","remarks":null,"parameters":[],"returns":{"csharpType":"DealStatus","pythonType":"DealStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Deals/DealStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DefaultStyles","kind":"class","name":"DefaultStyles","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public static class DefaultStyles","python":"DefaultStyles","summary":"Represent the list of default styles for the built-in controls.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyStyle = new Style(DefaultStyles.ButtonStyle);\nbuyStyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen);\nbuyStyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover);\nvar button = new Button { Text = \"Buy\", Style = buyStyle };\nChart.AddControl(button);","python":"buyStyle = Style(DefaultStyles.ButtonStyle)\nbuyStyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen)\nbuyStyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover)\nbutton = Button()\nbutton.Text = \"Buy\"\nbutton.Style = buyStyle\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.ButtonStyle","kind":"property","name":"ButtonStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style ButtonStyle {get;}","python":"DefaultStyles.ButtonStyle: Style","summary":"Gets the Button default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.ButtonStyle);\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkRed);\nChart.AddControl(new Button { Text = \"Sell\", Style = style });","python":"style = Style(DefaultStyles.ButtonStyle)\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkRed)\nbutton = Button()\nbutton.Text = \"Sell\"\nbutton.Style = style\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ButtonStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ButtonStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.CheckBoxStyle","kind":"property","name":"CheckBoxStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style CheckBoxStyle {get;}","python":"DefaultStyles.CheckBoxStyle: Style","summary":"Gets the Checkbox default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.CheckBoxStyle);\nstyle.Set(ControlProperty.ForegroundColor, Color.Orange);\nChart.AddControl(new CheckBox { Text = \"Use trailing stop\", Style = style });","python":"style = Style(DefaultStyles.CheckBoxStyle)\nstyle.Set(ControlProperty.ForegroundColor, Color.Orange)\ncheckBox = CheckBox()\ncheckBox.Text = \"Use trailing stop\"\ncheckBox.Style = style\napi.Chart.AddControl(checkBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/CheckBoxStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/CheckBoxStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.ComboBoxStyle","kind":"property","name":"ComboBoxStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style ComboBoxStyle {get;}","python":"DefaultStyles.ComboBoxStyle: Style","summary":"Gets the ComboBox default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var padding = DefaultStyles.ComboBoxStyle.Get(ControlProperty.Padding);\nPrint(\"Combo box padding: {0}\", padding);","python":"padding = DefaultStyles.ComboBoxStyle.Get(ControlProperty.Padding)\napi.Print(f\"Combo box padding: {padding}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ComboBoxStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ComboBoxStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.MultiSelectStyle","kind":"property","name":"MultiSelectStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style MultiSelectStyle {get;}","python":"DefaultStyles.MultiSelectStyle: Style","summary":"Gets the MultiSelect default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var padding = DefaultStyles.MultiSelectStyle.Get(ControlProperty.Padding);\nPrint(\"Multi select padding: {0}\", padding);","python":"padding = DefaultStyles.MultiSelectStyle.Get(ControlProperty.Padding)\napi.Print(f\"Multi select padding: {padding}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/MultiSelectStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/MultiSelectStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.RadioButtonStyle","kind":"property","name":"RadioButtonStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style RadioButtonStyle {get;}","python":"DefaultStyles.RadioButtonStyle: Style","summary":"Gets the Radio Button default stile.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.RadioButtonStyle);\nstyle.Set(ControlProperty.Margin, 5);\nChart.AddControl(new RadioButton { Text = \"Buy\", Style = style });","python":"style = Style(DefaultStyles.RadioButtonStyle)\nstyle.Set(ControlProperty.Margin, 5)\nradioButton = RadioButton()\nradioButton.Text = \"Buy\"\nradioButton.Style = style\napi.Chart.AddControl(radioButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/RadioButtonStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/RadioButtonStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.ScrollViewerStyle","kind":"property","name":"ScrollViewerStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style ScrollViewerStyle {get;}","python":"DefaultStyles.ScrollViewerStyle: Style","summary":"Gets the Scroll Viewer default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var background = DefaultStyles.ScrollViewerStyle.Get(ControlProperty.BackgroundColor, ControlState.DarkTheme);\nPrint(\"Scroll viewer dark background: {0}\", background);","python":"background = DefaultStyles.ScrollViewerStyle.Get(ControlProperty.BackgroundColor, ControlState.DarkTheme)\napi.Print(f\"Scroll viewer dark background: {background}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ScrollViewerStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ScrollViewerStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.TabControlStyle","kind":"property","name":"TabControlStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style TabControlStyle {get;}","python":"DefaultStyles.TabControlStyle: Style","summary":"Gets the Tab Control default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var background = DefaultStyles.TabControlStyle.Get(ControlProperty.BackgroundColor, ControlState.DarkTheme);\nPrint(\"Tab control dark background: {0}\", background);","python":"background = DefaultStyles.TabControlStyle.Get(ControlProperty.BackgroundColor, ControlState.DarkTheme)\napi.Print(f\"Tab control dark background: {background}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TabControlStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TabControlStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.TabItemStyle","kind":"property","name":"TabItemStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style TabItemStyle {get;}","python":"DefaultStyles.TabItemStyle: Style","summary":"Gets the Tab Item default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var background = DefaultStyles.TabItemStyle.Get(ControlProperty.BackgroundColor, ControlState.LightTheme | ControlState.Checked);\nPrint(\"Selected tab background in the light theme: {0}\", background);","python":"background = DefaultStyles.TabItemStyle.Get(ControlProperty.BackgroundColor, ControlState.LightTheme | ControlState.Checked)\napi.Print(f\"Selected tab background in the light theme: {background}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TabItemStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TabItemStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.TextBlockStyle","kind":"property","name":"TextBlockStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style TextBlockStyle {get;}","python":"DefaultStyles.TextBlockStyle: Style","summary":"Gets the Text Block default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.TextBlockStyle);\nstyle.Set(ControlProperty.FontSize, 14);\nChart.AddControl(new TextBlock { Text = \"EURUSD\", Style = style });","python":"style = Style(DefaultStyles.TextBlockStyle)\nstyle.Set(ControlProperty.FontSize, 14)\ntextBlock = TextBlock()\ntextBlock.Text = \"EURUSD\"\ntextBlock.Style = style\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TextBlockStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TextBlockStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.TextBoxStyle","kind":"property","name":"TextBoxStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style TextBoxStyle {get;}","python":"DefaultStyles.TextBoxStyle: Style","summary":"Gets the Text Box default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.TextBoxStyle);\nstyle.Set(ControlProperty.Width, 120);\nChart.AddControl(new TextBox { Text = \"0.01\", Style = style });","python":"style = Style(DefaultStyles.TextBoxStyle)\nstyle.Set(ControlProperty.Width, 120)\ntextBox = TextBox()\ntextBox.Text = \"0.01\"\ntextBox.Style = style\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TextBoxStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/TextBoxStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DefaultStyles.ToggleButtonStyle","kind":"property","name":"ToggleButtonStyle","type":"T:cAlgo.API.DefaultStyles","namespace":"cAlgo.API","group":"Styles","csharp":"public static Style ToggleButtonStyle {get;}","python":"DefaultStyles.ToggleButtonStyle: Style","summary":"Gets the Toggle Button default style.","remarks":null,"parameters":[],"returns":{"csharpType":"Style","pythonType":"Style","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style(DefaultStyles.ToggleButtonStyle);\nstyle.Set(ControlProperty.BackgroundColor, Color.SteelBlue, ControlState.Checked);\nChart.AddControl(new ToggleButton { Text = \"Auto trading\", Style = style });","python":"style = Style(DefaultStyles.ToggleButtonStyle)\nstyle.Set(ControlProperty.BackgroundColor, Color.SteelBlue, ControlState.Checked)\ntoggleButton = ToggleButton()\ntoggleButton.Text = \"Auto trading\"\ntoggleButton.Style = style\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ToggleButtonStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/DefaultStyles/ToggleButtonStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DetachedWindow","kind":"interface","name":"DetachedWindow","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public interface DetachedWindow","python":"DetachedWindow","summary":"Used to represent the properties of a detached window.","remarks":"Its being used by UI components that can be detached on a separate window and algos can use it to manage that detached window.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Risk calculator\");\nvar detachedWindow = block.DetachedWindow;\ndetachedWindow.Width = 400;\ndetachedWindow.Height = 300;\ndetachedWindow.ResizeMode = ResizeMode.CanResize;\ndetachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;\nPrint(\"Detached window size: {0}x{1}\", detachedWindow.Width, detachedWindow.Height);","python":"block = api.Asp.SymbolTab.AddBlock(\"Risk calculator\")\ndetachedWindow = block.DetachedWindow\ndetachedWindow.Width = 400\ndetachedWindow.Height = 300\ndetachedWindow.ResizeMode = ResizeMode.CanResize\ndetachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen\napi.Print(f\"Detached window size: {detachedWindow.Width}x{detachedWindow.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.Height","kind":"property","name":"Height","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double Height {get; set;}","python":"detachedWindow.Height: float","summary":"Get / Set height of the Window","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.Height = 350;\nPrint(\"Detached window height: {0}\", block.DetachedWindow.Height);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.Height = 350\napi.Print(f\"Detached window height: {block.DetachedWindow.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.Left","kind":"property","name":"Left","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double Left {get; set;}","python":"detachedWindow.Left: float","summary":"Get / Set window left margin (X)","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.Left = 200;\nPrint(\"Detached window left: {0}\", block.DetachedWindow.Left);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.Left = 200\napi.Print(f\"Detached window left: {block.DetachedWindow.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Left/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Left/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.MaxHeight","kind":"property","name":"MaxHeight","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double MaxHeight {get; set;}","python":"detachedWindow.MaxHeight: float","summary":"Get / Set the window maximum height","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.MaxHeight = 800;\nPrint(\"Detached window maximum height: {0}\", block.DetachedWindow.MaxHeight);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.MaxHeight = 800\napi.Print(f\"Detached window maximum height: {block.DetachedWindow.MaxHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.MaxWidth","kind":"property","name":"MaxWidth","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double MaxWidth {get; set;}","python":"detachedWindow.MaxWidth: float","summary":"Get / Set the window maximum width","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.MaxWidth = 900;\nPrint(\"Detached window maximum width: {0}\", block.DetachedWindow.MaxWidth);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.MaxWidth = 900\napi.Print(f\"Detached window maximum width: {block.DetachedWindow.MaxWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.MinHeight","kind":"property","name":"MinHeight","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double MinHeight {get; set;}","python":"detachedWindow.MinHeight: float","summary":"Get / Set the window minimum height","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.MinHeight = 200;\nPrint(\"Detached window minimum height: {0}\", block.DetachedWindow.MinHeight);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.MinHeight = 200\napi.Print(f\"Detached window minimum height: {block.DetachedWindow.MinHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.MinWidth","kind":"property","name":"MinWidth","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double MinWidth {get; set;}","python":"detachedWindow.MinWidth: float","summary":"Get / Set the window minimum width","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.MinWidth = 250;\nPrint(\"Detached window minimum width: {0}\", block.DetachedWindow.MinWidth);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.MinWidth = 250\napi.Print(f\"Detached window minimum width: {block.DetachedWindow.MinWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.ResizeMode","kind":"property","name":"ResizeMode","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"ResizeMode ResizeMode {get; set;}","python":"detachedWindow.ResizeMode: ResizeMode","summary":"Get / Set the window resize mode","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.ResizeMode = ResizeMode.NoResize;\nPrint(\"Detached window resize mode: {0}\", block.DetachedWindow.ResizeMode);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.ResizeMode = ResizeMode.NoResize\napi.Print(f\"Detached window resize mode: {block.DetachedWindow.ResizeMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.Top","kind":"property","name":"Top","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double Top {get; set;}","python":"detachedWindow.Top: float","summary":"Get / Set window top margin (Y)","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.Top = 150;\nPrint(\"Detached window top: {0}\", block.DetachedWindow.Top);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.Top = 150\napi.Print(f\"Detached window top: {block.DetachedWindow.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.Width","kind":"property","name":"Width","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"double Width {get; set;}","python":"detachedWindow.Width: float","summary":"Get / Set width of the window","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.Width = 450;\nPrint(\"Detached window width: {0}\", block.DetachedWindow.Width);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.Width = 450\napi.Print(f\"Detached window width: {block.DetachedWindow.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"P:cAlgo.API.DetachedWindow.WindowStartupLocation","kind":"property","name":"WindowStartupLocation","type":"T:cAlgo.API.DetachedWindow","namespace":"cAlgo.API","group":"Windows","csharp":"WindowStartupLocation WindowStartupLocation {get; set;}","python":"detachedWindow.WindowStartupLocation: WindowStartupLocation","summary":"Get / Set the window startup location","remarks":null,"parameters":[],"returns":{"csharpType":"WindowStartupLocation","pythonType":"WindowStartupLocation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"Signals\");\nblock.DetachedWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;\nPrint(\"Detached window startup location: {0}\", block.DetachedWindow.WindowStartupLocation);","python":"block = api.Asp.SymbolTab.AddBlock(\"Signals\")\nblock.DetachedWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner\napi.Print(f\"Detached window startup location: {block.DetachedWindow.WindowStartupLocation}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."},{"name":"Cloud","support":"None","behaviour":"Values start at 0 and are only stored in the algo; no window is read or changed."}]}
{"id":"T:cAlgo.API.Indicators.DetrendedPriceOscillator","kind":"interface","name":"DetrendedPriceOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface DetrendedPriceOscillator","python":"DetrendedPriceOscillator","summary":"The Detrended Price Oscillator Indicator interface.","remarks":"The Detrended Price Oscillator eliminates trends in prices, showing only absolute changes in price movement.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private DetrendedPriceOscillator _detrendedPriceOscillator;\n\nprotected override void Initialize()\n{\n    _detrendedPriceOscillator = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 14, MovingAverageType.Simple);\n}\npublic override void Calculate(int index)\n{\n    // Display Result of Indicator\n    Result[index] = _detrendedPriceOscillator.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.detrendedPriceOscillator = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        api.Result[index] = self.detrendedPriceOscillator.Result[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Detrended Price Oscillator indicator\n    public partial class DetrendedPriceOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private DetrendedPriceOscillator _detrendedPriceOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _detrendedPriceOscillator = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 14, MovingAverageType.Simple);\n        }\n\n        protected override void OnBar()\n        {\n            if (_detrendedPriceOscillator.Result.Last(1) > 0 && _detrendedPriceOscillator.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_detrendedPriceOscillator.Result.Last(1) < 0 && _detrendedPriceOscillator.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass DetrendedPriceOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.detrendedPriceOscillator = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\n\n    def on_bar_closed(self):\n        if self.detrendedPriceOscillator.Result.Last(0) > 0 and self.detrendedPriceOscillator.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.detrendedPriceOscillator.Result.Last(0) < 0 and self.detrendedPriceOscillator.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DetrendedPriceOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DetrendedPriceOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DetrendedPriceOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.DetrendedPriceOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"detrendedPriceOscillator.Result: IndicatorDataSeries","summary":"The resulting time series of Detrended Price Oscillator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private DetrendedPriceOscillator _dpoFast;\nprivate DetrendedPriceOscillator _dpoSlow;\n\nprotected override void OnStart()\n{\n    _dpoFast = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 10, MovingAverageType.Simple);\n    _dpoSlow = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 20, MovingAverageType.Simple);\n}\n\nprotected override void OnBar()\n{\n    if (_dpoFast.Result.Last(1) > _dpoSlow.Result.Last(1))\n        Print(\"Fast DPO {0} is above slow DPO {1}\", _dpoFast.Result.Last(1), _dpoSlow.Result.Last(1));\n}","python":"def on_start(self):\n    self.dpoFast = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 10, MovingAverageType.Simple)\n    self.dpoSlow = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 20, MovingAverageType.Simple)\n\ndef on_bar(self):\n    if self.dpoFast.Result.Last(1) > self.dpoSlow.Result.Last(1):\n        api.Print(f\"Fast DPO {self.dpoFast.Result.Last(1)} is above slow DPO {self.dpoSlow.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DetrendedPriceOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DetrendedPriceOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.DirectionalMovementSystem","kind":"interface","name":"DirectionalMovementSystem","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface DirectionalMovementSystem","python":"DirectionalMovementSystem","summary":"The Welles Wilder's Directional Movement Indicator calculation.","remarks":"Welles Wilder's Directional Movement System uses three indicators to determine whether the market is trending, and in which direction, and sends trading signals accordingly. A buy signal occurs when +DI line crosses above -DI line. A sell signal occurs when -DI line crosses below +DI line.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\n\npublic partial class SampleADX : Indicator\n{\n    private DirectionalMovementSystem _dms;\n    private double _dIplus;\n    private double _dIminus;\n\n    protected override void Initialize()\n    {\n        _dms = Indicators.DirectionalMovementSystem(Period);\n    }\n\n    public override void Calculate(int index)\n    {\n        _dIplus = _dms.DIPlus[index];\n        _dIminus = _dms.DIMinus[index];\n\n        if (_dIminus > _dIplus)\n        {\n            Sell[index] = Bars.ClosePrices[index] + Symbol.TickSize*100;\n        }\n        else\n        {\n            Buy[index] = Bars.ClosePrices[index] - Symbol.TickSize*100;\n        }\n    }\n}\n\n//...","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.dms = api.Indicators.DirectionalMovementSystem(api.Period)\n\n    def calculate(self, index):\n        if self.dms.DIMinus[index] > self.dms.DIPlus[index]:\n            api.Sell[index] = api.Bars.ClosePrices[index] + api.Symbol.TickSize * 100\n        else:\n            api.Buy[index] = api.Bars.ClosePrices[index] - api.Symbol.TickSize * 100","config":"{\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"DisplayName\": \"ADX Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Buy\",\n      \"PlotType\": \"Points\",\n      \"Color\": \"Green\",\n      \"Thickness\": 4\n    },\n    {\n      \"Name\": \"Sell\",\n      \"PlotType\": \"Points\",\n      \"Color\": \"Red\",\n      \"Thickness\": 4\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Directional Movement System indicator\n    public partial class DirectionalMovementSystemSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private DirectionalMovementSystem _directionalMovementSystem;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _directionalMovementSystem = Indicators.DirectionalMovementSystem(20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_directionalMovementSystem.ADX.Last(1) < 25) return;\n\n            if (_directionalMovementSystem.DIPlus.Last(1) > _directionalMovementSystem.DIMinus.Last(1) && _directionalMovementSystem.DIPlus.Last(2) <= _directionalMovementSystem.DIMinus.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_directionalMovementSystem.DIPlus.Last(1) < _directionalMovementSystem.DIMinus.Last(1) && _directionalMovementSystem.DIPlus.Last(2) >= _directionalMovementSystem.DIMinus.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass DirectionalMovementSystemSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.directionalMovementSystem = api.Indicators.DirectionalMovementSystem(20)\n\n    def on_bar_closed(self):\n        if self.directionalMovementSystem.ADX.Last(0) < 25:\n            return\n\n        if self.directionalMovementSystem.DIPlus.Last(0) > self.directionalMovementSystem.DIMinus.Last(0) and self.directionalMovementSystem.DIPlus.Last(1) <= self.directionalMovementSystem.DIMinus.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.directionalMovementSystem.DIPlus.Last(0) < self.directionalMovementSystem.DIMinus.Last(0) and self.directionalMovementSystem.DIPlus.Last(1) >= self.directionalMovementSystem.DIMinus.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DirectionalMovementSystem.ADX","kind":"property","name":"ADX","type":"T:cAlgo.API.Indicators.DirectionalMovementSystem","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries ADX {get;}","python":"directionalMovementSystem.ADX: IndicatorDataSeries","summary":"The Average Directional Movement Index (ADX) indicates whether the market is trending or ranging.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dms = Indicators.DirectionalMovementSystem(14);\nif (dms.ADX.Last(1) > 25)\n    Print(\"The market is trending, ADX: {0}\", dms.ADX.Last(1));","python":"dms = api.Indicators.DirectionalMovementSystem(14)\nif dms.ADX.Last(1) > 25:\n    api.Print(f\"The market is trending, ADX: {dms.ADX.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/ADX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/ADX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DirectionalMovementSystem.DIMinus","kind":"property","name":"DIMinus","type":"T:cAlgo.API.Indicators.DirectionalMovementSystem","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DIMinus {get;}","python":"directionalMovementSystem.DIMinus: IndicatorDataSeries","summary":"The Negative Direction Indicator (-DI) indicates downward trend movement.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dms = Indicators.DirectionalMovementSystem(14);\nif (dms.DIMinus.Last(1) > dms.DIPlus.Last(1) && dms.DIMinus.Last(2) <= dms.DIPlus.Last(2))\n    Print(\"-DI crossed above +DI: {0}\", dms.DIMinus.Last(1));","python":"dms = api.Indicators.DirectionalMovementSystem(14)\nif dms.DIMinus.Last(1) > dms.DIPlus.Last(1) and dms.DIMinus.Last(2) <= dms.DIPlus.Last(2):\n    api.Print(f\"-DI crossed above +DI: {dms.DIMinus.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/DIMinus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/DIMinus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DirectionalMovementSystem.DIPlus","kind":"property","name":"DIPlus","type":"T:cAlgo.API.Indicators.DirectionalMovementSystem","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DIPlus {get;}","python":"directionalMovementSystem.DIPlus: IndicatorDataSeries","summary":"The Positive Direction Indicator (+DI) indicates upward trend movement.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dms = Indicators.DirectionalMovementSystem(14);\nif (dms.DIPlus.Last(1) > dms.DIMinus.Last(1) && dms.DIPlus.Last(2) <= dms.DIMinus.Last(2))\n    Print(\"+DI crossed above -DI: {0}\", dms.DIPlus.Last(1));","python":"dms = api.Indicators.DirectionalMovementSystem(14)\nif dms.DIPlus.Last(1) > dms.DIMinus.Last(1) and dms.DIPlus.Last(2) <= dms.DIMinus.Last(2):\n    api.Print(f\"+DI crossed above -DI: {dms.DIPlus.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/DIPlus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DirectionalMovementSystem/DIPlus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Dock","kind":"enum","name":"Dock","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public enum Dock","python":"Dock","summary":"Specifies where a chart control will be docked inside the DockPanel.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dockPanel = new DockPanel { Width = 300, Height = 150, BackgroundColor = Color.DarkSlateGray };\ndockPanel.AddChild(new TextBlock { Text = \"Top\", Dock = Dock.Top });\ndockPanel.AddChild(new TextBlock { Text = \"Left\", Dock = Dock.Left });\ndockPanel.AddChild(new TextBlock { Text = \"Right\", Dock = Dock.Right });\ndockPanel.AddChild(new TextBlock { Text = \"Bottom\", Dock = Dock.Bottom });\nChart.AddControl(dockPanel);","python":"dockPanel = DockPanel()\ndockPanel.Width = 300\ndockPanel.Height = 150\ndockPanel.BackgroundColor = Color.DarkSlateGray\nfor text, dock in [(\"Top\", Dock.Top), (\"Left\", Dock.Left), (\"Right\", Dock.Right), (\"Bottom\", Dock.Bottom)]:\n    textBlock = TextBlock()\n    textBlock.Text = text\n    textBlock.Dock = dock\n    dockPanel.AddChild(textBlock)\napi.Chart.AddControl(dockPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Dock.Left","kind":"enum value","name":"Left","type":"T:cAlgo.API.Dock","namespace":"cAlgo.API","group":"Layout","csharp":"Dock.Left;","python":"Dock.Left","summary":"Dock to the left side of the DockPanel.","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Dock.Top","kind":"enum value","name":"Top","type":"T:cAlgo.API.Dock","namespace":"cAlgo.API","group":"Layout","csharp":"Dock.Top;","python":"Dock.Top","summary":"Dock to the top of the DockPanel.","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Dock.Right","kind":"enum value","name":"Right","type":"T:cAlgo.API.Dock","namespace":"cAlgo.API","group":"Layout","csharp":"Dock.Right;","python":"Dock.Right","summary":"Dock to the right side of the DockPanel.","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Dock.Bottom","kind":"enum value","name":"Bottom","type":"T:cAlgo.API.Dock","namespace":"cAlgo.API","group":"Layout","csharp":"Dock.Bottom;","python":"Dock.Bottom","summary":"Dock to the bottom of the DockPanel.","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Dock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DockPanel","kind":"class","name":"DockPanel","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public class DockPanel : Panel","python":"DockPanel","summary":"Defines the area where you can arrange child elemens either horizontally or vertically, relative to each other.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use DockPanel\n    public partial class DockPanelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var dockPanel = new DockPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.8\n            };\n\n            dockPanel.AddChild(new TextBlock\n            {\n                Text = \"Enter Your Name\",\n                Margin = 5,\n                Dock = Dock.Top,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                ForegroundColor = Color.Black,\n                FontWeight = FontWeight.ExtraBold\n            });\n\n            dockPanel.AddChild(new TextBox\n            {\n                Dock = Dock.Bottom,\n                Margin = 5,\n                Width = 100\n            });\n\n            Chart.AddControl(dockPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        dockPanel = DockPanel()\n        dockPanel.HorizontalAlignment = HorizontalAlignment.Center\n        dockPanel.VerticalAlignment = VerticalAlignment.Center\n        dockPanel.BackgroundColor = Color.Gold\n        dockPanel.Opacity = 0.8\n\n        textBlock = TextBlock()\n        textBlock.Text = \"Enter Your Name\"\n        textBlock.Margin = Thickness(5)\n        textBlock.Dock = Dock.Top\n        textBlock.HorizontalAlignment = HorizontalAlignment.Center\n        textBlock.ForegroundColor = Color.Black\n        textBlock.FontWeight = FontWeight.ExtraBold\n\n        dockPanel.AddChild(textBlock)\n\n        textBox = TextBox()\n        textBox.Dock = Dock.Bottom\n        textBox.Margin = Thickness(5)\n        textBox.Width = 100\n\n        dockPanel.AddChild(textBox)\n\n        api.Chart.AddControl(dockPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.DockPanel.#ctor","kind":"constructor","name":"DockPanel","type":"T:cAlgo.API.DockPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public DockPanel()","python":"DockPanel()","summary":"Initializes a new instance of the DockPanel class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dockPanel = new DockPanel { Width = 300, Height = 100, BackgroundColor = Color.DarkSlateGray };\ndockPanel.AddChild(new TextBlock { Text = \"Order panel\", Dock = Dock.Top, Margin = 5 });\ndockPanel.AddChild(new Button { Text = \"Submit\", Dock = Dock.Right, Margin = 5 });\ndockPanel.AddChild(new TextBox { Text = \"0.01\", Margin = 5 });\nChart.AddControl(dockPanel);","python":"dockPanel = DockPanel()\ndockPanel.Width = 300\ndockPanel.Height = 100\ndockPanel.BackgroundColor = Color.DarkSlateGray\nheader = TextBlock()\nheader.Text = \"Order panel\"\nheader.Dock = Dock.Top\nsubmit = Button()\nsubmit.Text = \"Submit\"\nsubmit.Dock = Dock.Right\nvolume = TextBox()\nvolume.Text = \"0.01\"\ndockPanel.AddChild(header)\ndockPanel.AddChild(submit)\ndockPanel.AddChild(volume)\napi.Chart.AddControl(dockPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DockPanel.LastChildFill","kind":"property","name":"LastChildFill","type":"T:cAlgo.API.DockPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public bool LastChildFill {get; set;}","python":"dockPanel.LastChildFill: bool","summary":"Indicates whether the last child element within a DockPanel stretches to fill the remaining available space.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dockPanel = new DockPanel { Width = 300, Height = 60, LastChildFill = false };\ndockPanel.AddChild(new Button { Text = \"Buy\", Dock = Dock.Left });\ndockPanel.AddChild(new Button { Text = \"Sell\", Dock = Dock.Left });\nChart.AddControl(dockPanel);\nPrint(\"Last child fills: {0}\", dockPanel.LastChildFill);","python":"dockPanel = DockPanel()\ndockPanel.Width = 300\ndockPanel.Height = 60\ndockPanel.LastChildFill = False\nfor text in [\"Buy\", \"Sell\"]:\n    button = Button()\n    button.Text = text\n    button.Dock = Dock.Left\n    dockPanel.AddChild(button)\napi.Chart.AddControl(dockPanel)\napi.Print(f\"Last child fills: {dockPanel.LastChildFill}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/LastChildFill/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/DockPanel/LastChildFill/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.DonchianChannel","kind":"interface","name":"DonchianChannel","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface DonchianChannel","python":"DonchianChannel","summary":"The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.","remarks":"The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate DonchianChannel donchian;\n//...\nprotected override void OnStart()\n{\n    donchian = Indicators.DonchianChannel(20);\n}\nprotected override void OnBar()\n{\n    Print(\"Top Value = {0}\", donchian.Top.LastValue);\n    Print(\"Middle Value = {0}\", donchian.Middle.LastValue);\n    Print(\"Bottom Value = {0}\", donchian.Bottom.LastValue);\n    //...\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.donchian = api.Indicators.DonchianChannel(20)\n\n    def on_bar(self):\n        api.Print(f\"Top Value = {self.donchian.Top.LastValue}\")\n        api.Print(f\"Middle Value = {self.donchian.Middle.LastValue}\")\n        api.Print(f\"Bottom Value = {self.donchian.Bottom.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Donchian Channel indicator\n    public partial class DonchianChannelSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private DonchianChannel _donchianChannel;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _donchianChannel = Indicators.DonchianChannel(20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.LowPrices.Last(1) <= _donchianChannel.Bottom.Last(1) && Bars.LowPrices.Last(2) > _donchianChannel.Bottom.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label);\n            }\n            else if (Bars.HighPrices.Last(1) >= _donchianChannel.Top.Last(1) && Bars.HighPrices.Last(2) < _donchianChannel.Top.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass DonchianChannelSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.donchianChannel = api.Indicators.DonchianChannel(20)\n\n    def on_bar_closed(self):\n        if api.Bars.LowPrices.Last(0) <= self.donchianChannel.Bottom.Last(0) and api.Bars.LowPrices.Last(1) > self.donchianChannel.Bottom.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif api.Bars.HighPrices.Last(0) >= self.donchianChannel.Top.Last(0) and api.Bars.HighPrices.Last(1) < self.donchianChannel.Top.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    },\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DonchianChannel.Bottom","kind":"property","name":"Bottom","type":"T:cAlgo.API.Indicators.DonchianChannel","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Bottom {get; set;}","python":"donchianChannel.Bottom: IndicatorDataSeries","summary":"Gets or sets the lowest low of the period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var donchian = Indicators.DonchianChannel(20);\nif (Bars.ClosePrices.Last(1) < donchian.Bottom.Last(2))\n    Print(\"Breakout below the channel Bottom: {0}\", donchian.Bottom.Last(2));","python":"donchian = api.Indicators.DonchianChannel(20)\nif api.Bars.ClosePrices.Last(1) < donchian.Bottom.Last(2):\n    api.Print(f\"Breakout below the channel Bottom: {donchian.Bottom.Last(2)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Bottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Bottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DonchianChannel.Middle","kind":"property","name":"Middle","type":"T:cAlgo.API.Indicators.DonchianChannel","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Middle {get; set;}","python":"donchianChannel.Middle: IndicatorDataSeries","summary":"Gets or sets the middle of the highest high and the lowest low of the period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var donchian = Indicators.DonchianChannel(20);\nPrint(\"Middle Value = {0}\", donchian.Middle.LastValue);","python":"donchian = api.Indicators.DonchianChannel(20)\napi.Print(f\"Middle Value = {donchian.Middle.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Middle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Middle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.DonchianChannel.Top","kind":"property","name":"Top","type":"T:cAlgo.API.Indicators.DonchianChannel","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Top {get; set;}","python":"donchianChannel.Top: IndicatorDataSeries","summary":"Gets or sets the highest high of the period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var donchian = Indicators.DonchianChannel(20);\nif (Bars.ClosePrices.Last(1) > donchian.Top.Last(2))\n    Print(\"Breakout above the channel Top: {0}\", donchian.Top.Last(2));","python":"donchian = api.Indicators.DonchianChannel(20)\nif api.Bars.ClosePrices.Last(1) > donchian.Top.Last(2):\n    api.Print(f\"Breakout above the channel Top: {donchian.Top.Last(2)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DonchianChannel/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.DoubleExponentialMovingAverage","kind":"interface","name":"DoubleExponentialMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface DoubleExponentialMovingAverage","python":"DoubleExponentialMovingAverage","summary":"The Double Exponential Moving Average (DEMA) is a combination of smoothed exponential moving averages (EMA) and a basic EMA","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private DoubleExponentialMovingAverage _dema;\n\nprotected override void OnStart()\n{\n    _dema = Indicators.DoubleExponentialMovingAverage(Bars.ClosePrices, 21);\n}\n\nprotected override void OnBar()\n{\n    if (Bars.ClosePrices.Last(1) > _dema.Result.Last(1))\n        Print(\"Close is above DEMA: {0}\", _dema.Result.Last(1));\n}","python":"def on_start(self):\n    self.dema = api.Indicators.DoubleExponentialMovingAverage(api.Bars.ClosePrices, 21)\n\ndef on_bar(self):\n    if api.Bars.ClosePrices.Last(1) > self.dema.Result.Last(1):\n        api.Print(f\"Close is above DEMA: {self.dema.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/DoubleExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/DoubleExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DrawingColorChangedEventArgs","kind":"class","name":"DrawingColorChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class DrawingColorChangedEventArgs","python":"DrawingColorChangedEventArgs","summary":"Provides data for the drawing color changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.DrawingColorChanged += OnDrawingColorChanged;\n}\n\nprivate void OnDrawingColorChanged(DrawingColorChangedEventArgs args)\n{\n    Print(\"Drawing color changed to {0}\", args.DrawingColor);\n}","python":"def on_start(self):\n    api.Application.DrawingColorChanged += self.on_drawing_color_changed\n\ndef on_drawing_color_changed(self, args):\n    api.Print(f\"Drawing color changed to {args.DrawingColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DrawingColorChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DrawingColorChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.DrawingColorChangedEventArgs.DrawingColor","kind":"property","name":"DrawingColor","type":"T:cAlgo.API.DrawingColorChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Color DrawingColor {get;}","python":"drawingColorChangedEventArgs.DrawingColor: Color","summary":"Gets the drawing color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.DrawingColorChanged += OnDrawingColorChanged;\n}\n\nprivate void OnDrawingColorChanged(DrawingColorChangedEventArgs args)\n{\n    Chart.DrawHorizontalLine(\"bid\", Symbol.Bid, args.DrawingColor);\n}","python":"def on_start(self):\n    api.Application.DrawingColorChanged += self.on_drawing_color_changed\n\ndef on_drawing_color_changed(self, args):\n    api.Chart.DrawHorizontalLine(\"bid\", api.Symbol.Bid, args.DrawingColor)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DrawingColorChangedEventArgs/DrawingColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DrawingColorChangedEventArgs/DrawingColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.DropZone","kind":"class","name":"DropZone","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class DropZone : ControlBase","python":"DropZone","summary":"Represents the DropZone control that can be used as a file(s) input.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var dropZone = new DropZone\n        {\n            Child = new TextBlock\n            {\n                Text = \"Drop / Select Files and Directories\",\n                BackgroundColor = Color.Blue,\n                Height = 200,\n                Width = 350,\n            },\n            IsDirectoryDropAllowed = true,\n            // Only these extensions will be accepted\n            FilterExtensions = new[] { \"txt\", \"algo\", \"cs\" },\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n        };\n\n        dropZone.Dropped += args =>\n        {\n            // Here you can access the dropped files and directories, open, read, etc...\n            foreach (var path in args.FilePaths)\n            {\n                Print($\"File or directory '{path}' dropped\");\n            }\n        };\n\n        Chart.AddControl(dropZone);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        dropZone = DropZone()\n\n        dropZoneChild = TextBlock()\n        dropZoneChild.Text = \"Drop / Select Files and Directories\"\n        dropZoneChild.BackgroundColor = Color.Blue\n        dropZoneChild.Height = 200\n        dropZoneChild.Width = 350\n\n        dropZone.Child = dropZoneChild\n        dropZone.IsDirectoryDropAllowed = True\n        # Only these extensions will be accepted\n        dropZone.FilterExtensions = [\"txt\", \"algo\", \"cs\"]\n        dropZone.HorizontalAlignment = HorizontalAlignment.Center\n        dropZone.VerticalAlignment = VerticalAlignment.Center\n\n        dropZone.Dropped += self.on_dropped\n\n        api.Chart.AddControl(dropZone)\n\n    def on_dropped(self, args):\n        # Here you can access the dropped files and directories, open, read, etc...\n        for path in args.FilePaths:\n            api.Print(f\"File or directory '{path}' dropped\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.DropZone.#ctor","kind":"constructor","name":"DropZone","type":"T:cAlgo.API.DropZone","namespace":"cAlgo.API","group":"Controls","csharp":"public DropZone()","python":"DropZone()","summary":"Initializes a new instance of the DropZone class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop a CSV file here\" } };\ndropZone.Dropped += args => Print(\"Dropped {0} file(s)\", args.FilePaths.Count);\nChart.AddControl(dropZone);","python":"dropZone = DropZone()\nchild = TextBlock()\nchild.Text = \"Drop a CSV file here\"\ndropZone.Child = child\ndropZone.Dropped += lambda args: api.Print(f\"Dropped {args.FilePaths.Count} file(s)\")\napi.Chart.AddControl(dropZone)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DropZone.Child","kind":"property","name":"Child","type":"T:cAlgo.API.DropZone","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Child {get; set;}","python":"dropZone.Child: ControlBase","summary":"Gets or sets the drop zone child object.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var border = new Border { BorderColor = Color.Gray, BorderThickness = 1, Width = 250, Height = 80 };\nborder.Child = new TextBlock { Text = \"Drop files here\", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };\nvar dropZone = new DropZone { Child = border };\nChart.AddControl(dropZone);","python":"border = Border()\nborder.BorderColor = Color.Gray\nborder.BorderThickness = Thickness(1)\nborder.Width = 250\nborder.Height = 80\ntext = TextBlock()\ntext.Text = \"Drop files here\"\nborder.Child = text\ndropZone = DropZone()\ndropZone.Child = border\napi.Chart.AddControl(dropZone)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DropZone.FilterExtensions","kind":"property","name":"FilterExtensions","type":"T:cAlgo.API.DropZone","namespace":"cAlgo.API","group":"Controls","csharp":"public string[] FilterExtensions {get; set;}","python":"dropZone.FilterExtensions: list[str]","summary":"Gets or sets the file extensions filter.","remarks":null,"parameters":[],"returns":{"csharpType":"string[]","pythonType":"list[str]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop CSV or TXT files\" }, FilterExtensions = new[] { \"csv\", \"txt\" } };\nChart.AddControl(dropZone);\nPrint(\"Accepted extensions: {0}\", string.Join(\", \", dropZone.FilterExtensions));","python":"dropZone = DropZone()\nchild = TextBlock()\nchild.Text = \"Drop CSV or TXT files\"\ndropZone.Child = child\ndropZone.FilterExtensions = [\"csv\", \"txt\"]\napi.Chart.AddControl(dropZone)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/FilterExtensions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/FilterExtensions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.DropZone.IsDirectoryDropAllowed","kind":"property","name":"IsDirectoryDropAllowed","type":"T:cAlgo.API.DropZone","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsDirectoryDropAllowed {get; set;}","python":"dropZone.IsDirectoryDropAllowed: bool","summary":"Gets or sets whether user can drop directories or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop a folder\" }, IsDirectoryDropAllowed = true };\nChart.AddControl(dropZone);\nPrint(\"Directories allowed: {0}\", dropZone.IsDirectoryDropAllowed);","python":"dropZone = DropZone()\nchild = TextBlock()\nchild.Text = \"Drop a folder\"\ndropZone.Child = child\ndropZone.IsDirectoryDropAllowed = True\napi.Chart.AddControl(dropZone)\napi.Print(f\"Directories allowed: {dropZone.IsDirectoryDropAllowed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/IsDirectoryDropAllowed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/IsDirectoryDropAllowed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.DropZone.Dropped","kind":"event","name":"Dropped","type":"T:cAlgo.API.DropZone","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<DroppedEventArgs> Dropped;","python":"dropZone.Dropped += handler  # handler(obj: DroppedEventArgs)","summary":"Occurs when files are dropped.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<DroppedEventArgs>","pythonType":"Callable[[DroppedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop files\" }, FilterExtensions = new[] { \"csv\" } };\ndropZone.Dropped += args =>\n{\n    foreach (var filePath in args.FilePaths)\n        Print(\"Dropped: {0}\", filePath);\n};\nChart.AddControl(dropZone);","python":"def on_start(self):\n    dropZone = DropZone()\n    child = TextBlock()\n    child.Text = \"Drop files\"\n    dropZone.Child = child\n    dropZone.Dropped += self.on_dropped\n    api.Chart.AddControl(dropZone)\n\ndef on_dropped(self, args):\n    for filePath in args.FilePaths:\n        api.Print(f\"Dropped: {filePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Dropped/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/Dropped/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.DroppedEventArgs","kind":"class","name":"DroppedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class DroppedEventArgs","python":"DroppedEventArgs","summary":"Provides data for the Dropzone Dropped event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop files here\" } };\n    dropZone.Dropped += OnDropZoneDropped;\n    Chart.AddControl(dropZone);\n}\n\nprivate void OnDropZoneDropped(DroppedEventArgs args)\n{\n    Print(\"{0} file(s) dropped\", args.FilePaths.Count);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Drop files here\"\n    dropZone = DropZone()\n    dropZone.Child = text_block\n    dropZone.Dropped += self.on_drop_zone_dropped\n    api.Chart.AddControl(dropZone)\n\ndef on_drop_zone_dropped(self, args):\n    api.Print(f\"{args.FilePaths.Count} file(s) dropped\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DropZone.Dropped)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DropZone.Dropped)."}]}
{"id":"P:cAlgo.API.DroppedEventArgs.DropZone","kind":"property","name":"DropZone","type":"T:cAlgo.API.DroppedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public DropZone DropZone {get;}","python":"droppedEventArgs.DropZone: DropZone","summary":"Gets the Dropzone control.","remarks":null,"parameters":[],"returns":{"csharpType":"DropZone","pythonType":"DropZone","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop files here\" } };\n    dropZone.Dropped += OnDropZoneDropped;\n    Chart.AddControl(dropZone);\n}\n\nprivate void OnDropZoneDropped(DroppedEventArgs args)\n{\n    Print(\"Files dropped, directories allowed: {0}\", args.DropZone.IsDirectoryDropAllowed);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Drop files here\"\n    dropZone = DropZone()\n    dropZone.Child = text_block\n    dropZone.Dropped += self.on_drop_zone_dropped\n    api.Chart.AddControl(dropZone)\n\ndef on_drop_zone_dropped(self, args):\n    api.Print(f\"Files dropped, directories allowed: {args.DropZone.IsDirectoryDropAllowed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/DropZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/DropZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DropZone.Dropped)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DropZone.Dropped)."}]}
{"id":"P:cAlgo.API.DroppedEventArgs.FilePaths","kind":"property","name":"FilePaths","type":"T:cAlgo.API.DroppedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public IReadonlyList<string> FilePaths {get;}","python":"droppedEventArgs.FilePaths: IReadonlyList[str]","summary":"Gets the dropped file paths.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<string>","pythonType":"IReadonlyList[str]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var dropZone = new DropZone { Child = new TextBlock { Text = \"Drop files here\" } };\n    dropZone.Dropped += OnDropZoneDropped;\n    Chart.AddControl(dropZone);\n}\n\nprivate void OnDropZoneDropped(DroppedEventArgs args)\n{\n    foreach (var filePath in args.FilePaths)\n        Print(\"Dropped file: {0}\", filePath);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Drop files here\"\n    dropZone = DropZone()\n    dropZone.Child = text_block\n    dropZone.Dropped += self.on_drop_zone_dropped\n    api.Chart.AddControl(dropZone)\n\ndef on_drop_zone_dropped(self, args):\n    for filePath in args.FilePaths:\n        api.Print(f\"Dropped file: {filePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/FilePaths/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/DroppedEventArgs/FilePaths/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (DropZone.Dropped)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (DropZone.Dropped)."}]}
{"id":"T:cAlgo.API.Indicators.EaseOfMovement","kind":"interface","name":"EaseOfMovement","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface EaseOfMovement","python":"EaseOfMovement","summary":"Ease of Movement is a volume based oscillator that measures the \"ease\" of price movement.","remarks":"It quantifies the price/volume relationship. When the oscillator is close to zero it signifies that prices will not move easy. Conversely, prices are advancing or declining with relative ease when the oscillator is positive or negative away from zero.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private EaseOfMovement _easeOfMovement;\n\nprotected override void Initialize()\n{\n   _easeOfMovement = Indicators.EaseOfMovement(Period, MAType);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _easeOfMovement.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.easeOfMovement = api.Indicators.EaseOfMovement(api.Period, api.MAType)\n\n    def calculate(self, index):\n        api.Result[index] = self.easeOfMovement.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    },\n    {\n      \"Name\": \"MAType\",\n      \"DisplayName\": \"MA Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Simple\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Ease Of Movement indicator\n    public partial class EaseOfMovementSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private EaseOfMovement _easeOfMovement;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _easeOfMovement = Indicators.EaseOfMovement(14, MovingAverageType.Simple);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_easeOfMovement.Result.Last(1) > (Symbol.TickSize * 0.05))\n            {\n                if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) < _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n                else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) > _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else\n            {\n                ClosePositions();\n            }\n        }\n\n        private void ClosePositions()\n        {\n            foreach (var position in BotPositions)\n            {\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass EaseOfMovementSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.easeOfMovement = api.Indicators.EaseOfMovement(14, MovingAverageType.Simple)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\n\n    def on_bar_closed(self):\n        if self.easeOfMovement.Result.Last(0) > (api.Symbol.TickSize * 0.05):\n            if api.Bars.ClosePrices.Last(0) > self.simpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) < self.simpleMovingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n            elif api.Bars.ClosePrices.Last(0) < self.simpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) > self.simpleMovingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        else:\n            self.close_positions()\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self):\n        for position in self.get_bot_positions():\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/EaseOfMovement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/EaseOfMovement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.EaseOfMovement.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.EaseOfMovement","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"easeOfMovement.Result: IndicatorDataSeries","summary":"The time series of the Ease Of Movement Indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private EaseOfMovement _easeOfMovement;\n\nprotected override void OnStart()\n{\n    _easeOfMovement = Indicators.EaseOfMovement(Period, MAType);\n}\nprotected override void OnBar()\n{\n    var currentValue = _easeOfMovement.Result.LastValue;\n    Print(\"Ease Of Movement: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.easeOfMovement = api.Indicators.EaseOfMovement(api.Period, api.MAType)\n\ndef on_bar(self):\n    currentValue = self.easeOfMovement.Result.LastValue\n    api.Print(f\"Ease Of Movement: {currentValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 21\n    },\n    {\n      \"Name\": \"MAType\",\n      \"DisplayName\": \"MA Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Simple\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/EaseOfMovement/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/EaseOfMovement/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ElderForceIndex","kind":"interface","name":"ElderForceIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ElderForceIndex","python":"ElderForceIndex","summary":"The calculation of the Elder's Force Index.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ElderForceIndex _elderForceIndex;\n\nprotected override void OnStart()\n{\n    _elderForceIndex = Indicators.ElderForceIndex(13, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Elder's Force Index: {0}\", _elderForceIndex.Result.Last(1));\n}","python":"def on_start(self):\n    self.elderForceIndex = api.Indicators.ElderForceIndex(13, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"Elder's Force Index: {self.elderForceIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderForceIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderForceIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ElderForceIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ElderForceIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"elderForceIndex.Result: IndicatorDataSeries","summary":"Alexander Elder's force index is a technical indicator that measures the amount of power used to move the price of an asset.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var elderForceIndex = Indicators.ElderForceIndex(13, MovingAverageType.Exponential);\nif (elderForceIndex.Result.Last(1) > 0 && elderForceIndex.Result.Last(2) <= 0)\n    Print(\"Force Index turned positive: {0}\", elderForceIndex.Result.Last(1));","python":"elderForceIndex = api.Indicators.ElderForceIndex(13, MovingAverageType.Exponential)\nif elderForceIndex.Result.Last(1) > 0 and elderForceIndex.Result.Last(2) <= 0:\n    api.Print(f\"Force Index turned positive: {elderForceIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderForceIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderForceIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ElderRayIndex","kind":"interface","name":"ElderRayIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ElderRayIndex","python":"ElderRayIndex","summary":"The calculation of the Elder Ray Index.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ElderRayIndex _elderRayIndex;\n\nprotected override void OnStart()\n{\n    _elderRayIndex = Indicators.ElderRayIndex(13, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Bulls Power: {0}, Bears Power: {1}\", _elderRayIndex.BullsPower.Last(1), _elderRayIndex.BearsPower.Last(1));\n}","python":"def on_start(self):\n    self.elderRayIndex = api.Indicators.ElderRayIndex(13, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"Bulls Power: {self.elderRayIndex.BullsPower.Last(1)}, Bears Power: {self.elderRayIndex.BearsPower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ElderRayIndex.BearsPower","kind":"property","name":"BearsPower","type":"T:cAlgo.API.Indicators.ElderRayIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries BearsPower {get;}","python":"elderRayIndex.BearsPower: IndicatorDataSeries","summary":"The histogram (bar graph). It shows the maximum bearish strength during the time period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var elderRayIndex = Indicators.ElderRayIndex(13, MovingAverageType.Exponential);\nPrint(\"Bears Power: {0}\", elderRayIndex.BearsPower.Last(1));","python":"elderRayIndex = api.Indicators.ElderRayIndex(13, MovingAverageType.Exponential)\napi.Print(f\"Bears Power: {elderRayIndex.BearsPower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/BearsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/BearsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ElderRayIndex.BullsPower","kind":"property","name":"BullsPower","type":"T:cAlgo.API.Indicators.ElderRayIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries BullsPower {get;}","python":"elderRayIndex.BullsPower: IndicatorDataSeries","summary":"The histogram (bar graph). It shows the maximum bullish strength during the time period.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var elderRayIndex = Indicators.ElderRayIndex(13, MovingAverageType.Exponential);\nPrint(\"Bulls Power: {0}\", elderRayIndex.BullsPower.Last(1));","python":"elderRayIndex = api.Indicators.ElderRayIndex(13, MovingAverageType.Exponential)\napi.Print(f\"Bulls Power: {elderRayIndex.BullsPower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/BullsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ElderRayIndex/BullsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Ellipse","kind":"class","name":"Ellipse","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Ellipse : Shape","python":"Ellipse","summary":"Represents the ellipse shape.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to draw an ellipse shape on your chart\n    public partial class EllipseShapeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var ellipse = new Ellipse\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Margin = 5,\n                Width = 100,\n                Height = 200,\n                StrokeColor = Color.Black,\n                FillColor = Color.Aqua,\n                StrokeThickness = 2,\n                StrokeStartLineCap = PenLineCap.Square,\n                Left = 100,\n                Top = 50\n            };\n\n            var canvas = new Canvas\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.5\n            };\n\n            canvas.AddChild(ellipse);\n\n            Chart.AddControl(canvas);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        ellipse = Ellipse()\n        ellipse.HorizontalAlignment = HorizontalAlignment.Center\n        ellipse.VerticalAlignment = VerticalAlignment.Center\n        ellipse.Margin = Thickness(5)\n        ellipse.Width = 100\n        ellipse.Height = 200\n        ellipse.StrokeColor = Color.Black\n        ellipse.FillColor = Color.Aqua\n        ellipse.StrokeThickness = 2\n        ellipse.StrokeStartLineCap = PenLineCap.Square\n        ellipse.Left = 100\n        ellipse.Top = 50\n\n        canvas = Canvas()\n        canvas.BackgroundColor = Color.Gold\n        canvas.Opacity = 0.5\n\n        canvas.AddChild(ellipse)\n\n        api.Chart.AddControl(canvas)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Ellipse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Ellipse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Ellipse.#ctor","kind":"constructor","name":"Ellipse","type":"T:cAlgo.API.Ellipse","namespace":"cAlgo.API","group":"Shapes","csharp":"public Ellipse()","python":"Ellipse()","summary":"Initializes a new instance of the Ellipse class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = new Ellipse { Width = 40, Height = 40, FillColor = Color.LimeGreen, StrokeColor = Color.White };\nellipse.HorizontalAlignment = HorizontalAlignment.Right;\nellipse.VerticalAlignment = VerticalAlignment.Top;\nChart.AddControl(ellipse);","python":"ellipse = Ellipse()\nellipse.Width = 40\nellipse.Height = 40\nellipse.FillColor = Color.LimeGreen\nellipse.StrokeColor = Color.White\nellipse.HorizontalAlignment = HorizontalAlignment.Right\nellipse.VerticalAlignment = VerticalAlignment.Top\napi.Chart.AddControl(ellipse)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Ellipse/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Ellipse/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.EncodingType","kind":"enum","name":"EncodingType","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public enum EncodingType","python":"EncodingType","summary":"Represents different character encoding types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.WriteAllText(\"Symbol,Price\", EncodingType.Utf8);\n    Print(DataFile.ReadAllText(EncodingType.Utf8));\n}","python":"api.DataFile.WriteAllText(\"Symbol,Price\", EncodingType.Utf8)\napi.Print(api.DataFile.ReadAllText(EncodingType.Utf8))","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.Ascii","kind":"enum value","name":"Ascii","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.Ascii;","python":"EncodingType.Ascii","summary":"ASCII character set encoding.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.BigEndianUnicode","kind":"enum value","name":"BigEndianUnicode","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.BigEndianUnicode;","python":"EncodingType.BigEndianUnicode","summary":"Unicode character set encoding in big endian byte order.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.Latin1","kind":"enum value","name":"Latin1","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.Latin1;","python":"EncodingType.Latin1","summary":"Latin1 character set (ISO-8859-1) encoding.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.Unicode","kind":"enum value","name":"Unicode","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.Unicode;","python":"EncodingType.Unicode","summary":"Unicode character set encoding in little endian byte order.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.Utf8","kind":"enum value","name":"Utf8","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.Utf8;","python":"EncodingType.Utf8","summary":"UTF-8 format character set encoding.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EncodingType.Utf32","kind":"enum value","name":"Utf32","type":"T:cAlgo.API.EncodingType","namespace":"cAlgo.API","group":"Utility","csharp":"EncodingType.Utf32;","python":"EncodingType.Utf32","summary":"UTF-32 format character set encoding.","remarks":null,"parameters":[],"returns":{"csharpType":"EncodingType","pythonType":"EncodingType","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/EncodingType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.Envelopes","kind":"interface","name":"Envelopes","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Envelopes","python":"Envelopes","summary":"The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Envelopes _envelopes;\n\nprotected override void OnStart()\n{\n    _envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Upper: {0}, Main: {1}, Lower: {2}\", _envelopes.Upper.Last(1), _envelopes.Main.Last(1), _envelopes.Lower.Last(1));\n}","python":"def on_start(self):\n    self.envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)\n\ndef on_bar(self):\n    api.Print(f\"Upper: {self.envelopes.Upper.Last(1)}, Main: {self.envelopes.Main.Last(1)}, Lower: {self.envelopes.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Envelopes.Lower","kind":"property","name":"Lower","type":"T:cAlgo.API.Indicators.Envelopes","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Lower {get;}","python":"envelopes.Lower: IndicatorDataSeries","summary":"The lower line of the Envelopes.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);\nif (Bars.LowPrices.Last(1) <= envelopes.Lower.Last(1))\n    Print(\"Price reached the lower envelope: {0}\", envelopes.Lower.Last(1));","python":"envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)\nif api.Bars.LowPrices.Last(1) <= envelopes.Lower.Last(1):\n    api.Print(f\"Price reached the lower envelope: {envelopes.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Lower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Lower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Envelopes.Main","kind":"property","name":"Main","type":"T:cAlgo.API.Indicators.Envelopes","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Main {get;}","python":"envelopes.Main: IndicatorDataSeries","summary":"The main line of the Envelopes.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);\nPrint(\"Envelopes main line: {0}\", envelopes.Main.Last(1));","python":"envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)\napi.Print(f\"Envelopes main line: {envelopes.Main.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Main/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Main/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Envelopes.Upper","kind":"property","name":"Upper","type":"T:cAlgo.API.Indicators.Envelopes","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Upper {get;}","python":"envelopes.Upper: IndicatorDataSeries","summary":"The upper line of the Envelopes.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);\nif (Bars.HighPrices.Last(1) >= envelopes.Upper.Last(1))\n    Print(\"Price reached the upper envelope: {0}\", envelopes.Upper.Last(1));","python":"envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)\nif api.Bars.HighPrices.Last(1) >= envelopes.Upper.Last(1):\n    api.Print(f\"Price reached the upper envelope: {envelopes.Upper.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Upper/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Upper/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.EnvironmentType","kind":"enum","name":"EnvironmentType","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public enum EnvironmentType","python":"EnvironmentType","summary":"Represents the different environments where an algo can run.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Current EnvironmentType is: {0}\", Application.EnvironmentType);\n\nif (Application.EnvironmentType == EnvironmentType.Desktop)\n    Chart.DrawStaticText(\"environment\", \"Running on cTrader Desktop\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray);","python":"api.Print(f\"Current EnvironmentType is: {api.Application.EnvironmentType}\")\n\nif api.Application.EnvironmentType == EnvironmentType.Desktop:\n    api.Chart.DrawStaticText(\"environment\", \"Running on cTrader Desktop\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EnvironmentType.Desktop","kind":"enum value","name":"Desktop","type":"T:cAlgo.API.EnvironmentType","namespace":"cAlgo.API","group":"Application","csharp":"EnvironmentType.Desktop;","python":"EnvironmentType.Desktop","summary":"Represents the Desktop environment.","remarks":null,"parameters":[],"returns":{"csharpType":"EnvironmentType","pythonType":"EnvironmentType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EnvironmentType.Cloud","kind":"enum value","name":"Cloud","type":"T:cAlgo.API.EnvironmentType","namespace":"cAlgo.API","group":"Application","csharp":"EnvironmentType.Cloud;","python":"EnvironmentType.Cloud","summary":"Represents the Cloud environment where algos can run.","remarks":null,"parameters":[],"returns":{"csharpType":"EnvironmentType","pythonType":"EnvironmentType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.EnvironmentType.CLI","kind":"enum value","name":"CLI","type":"T:cAlgo.API.EnvironmentType","namespace":"cAlgo.API","group":"Application","csharp":"EnvironmentType.CLI;","python":"EnvironmentType.CLI","summary":"Represents the Command Line Interface (CLI) environment.","remarks":null,"parameters":[],"returns":{"csharpType":"EnvironmentType","pythonType":"EnvironmentType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/EnvironmentType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Error","kind":"interface","name":"Error","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public interface Error","python":"Error","summary":"Encapsulates an error code.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    Print(\"Trade error {0}, result: {1}\", error.Code, error.TradeResult);\n}","python":"def on_error(self, error):\n    api.Print(f\"Trade error {error.Code}, result: {error.TradeResult}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Error.Code","kind":"property","name":"Code","type":"T:cAlgo.API.Error","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode Code {get;}","python":"error.Code: ErrorCode","summary":"The encapsulated error code.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.BadVolume)\n    {\n        Print(\"Invalid volume, stopping the cBot\");\n        Stop();\n    }\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.BadVolume:\n        api.Print(\"Invalid volume, stopping the cBot\")\n        api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/Code/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/Code/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Error.TradeResult","kind":"property","name":"TradeResult","type":"T:cAlgo.API.Error","namespace":"cAlgo.API","group":"Trading","csharp":"TradeResult TradeResult {get;}","python":"error.TradeResult: TradeResult","summary":"The result of the trade that produced the error","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    var result = error.TradeResult;\n    if (result != null)\n        Print(\"Trade result: successful={0}, error={1}\", result.IsSuccessful, result.Error);\n}","python":"def on_error(self, error):\n    result = error.TradeResult\n    if result is not None:\n        api.Print(f\"Trade result: successful={result.IsSuccessful}, error={result.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/TradeResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Error/TradeResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ErrorCode","kind":"enum","name":"ErrorCode","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public enum ErrorCode","python":"ErrorCode","summary":"Enumeration of standard error codes.","remarks":"Error codes are readable descriptions of the responses returned by the server.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40);\nif (!result.IsSuccessful)\n{\n    switch (result.Error)\n    {\n        case ErrorCode.NoMoney:\n            Print(\"Not enough money to open the position\");\n            break;\n        case ErrorCode.MarketClosed:\n            Print(\"The market is closed\");\n            break;\n        default:\n            Print(\"Order failed: {0}\", result.Error);\n            break;\n    }\n}","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40)\nif not result.IsSuccessful:\n    if result.Error == ErrorCode.NoMoney:\n        api.Print(\"Not enough money to open the position\")\n    elif result.Error == ErrorCode.MarketClosed:\n        api.Print(\"The market is closed\")\n    else:\n        api.Print(f\"Order failed: {result.Error}\")"},{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.BadVolume)\n        Print(\"Bad volume\");\n    else if (error.Code == ErrorCode.Disconnected)\n        Print(\"Disconnected\");\n    else\n        Print(\"Error: {0}\", error.Code);\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.BadVolume:\n        api.Print(\"Bad volume\")\n    elif error.Code == ErrorCode.Disconnected:\n        api.Print(\"Disconnected\")\n    else:\n        api.Print(f\"Error: {error.Code}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.TechnicalError","kind":"enum value","name":"TechnicalError","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.TechnicalError;","python":"ErrorCode.TechnicalError","summary":"A generic technical error with a trade request.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.TechnicalError)\n        Print(\"Error. Confirm that the trade command parameters are valid\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.TechnicalError:\n        api.Print(\"Error. Confirm that the trade command parameters are valid\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.BadVolume","kind":"enum value","name":"BadVolume","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.BadVolume;","python":"ErrorCode.BadVolume","summary":"The volume value is not valid","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.BadVolume)\n        Print(\"Invalid volume amount, minimum is {0}\", Symbol.VolumeInUnitsMin);\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.BadVolume:\n        api.Print(f\"Invalid volume amount, minimum is {api.Symbol.VolumeInUnitsMin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.NoMoney","kind":"enum value","name":"NoMoney","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.NoMoney;","python":"ErrorCode.NoMoney","summary":"There are not enough money in the account to trade with.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.NoMoney)\n        Print(\"Not enough money to trade, free margin: {0}\", Account.FreeMargin);\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.NoMoney:\n        api.Print(f\"Not enough money to trade, free margin: {api.Account.FreeMargin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.MarketClosed","kind":"enum value","name":"MarketClosed","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.MarketClosed;","python":"ErrorCode.MarketClosed","summary":"The market is closed.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.MarketClosed)\n        Print(\"The market is closed.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.MarketClosed:\n        api.Print(\"The market is closed.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.Disconnected","kind":"enum value","name":"Disconnected","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.Disconnected;","python":"ErrorCode.Disconnected","summary":"The server is disconnected.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.Disconnected)\n        Print(\"The server is disconnected.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.Disconnected:\n        api.Print(\"The server is disconnected.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.EntityNotFound","kind":"enum value","name":"EntityNotFound","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.EntityNotFound;","python":"ErrorCode.EntityNotFound","summary":"Position does not exist.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.EntityNotFound)\n        Print(\"Position not found\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.EntityNotFound:\n        api.Print(\"Position not found\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.Timeout","kind":"enum value","name":"Timeout","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.Timeout;","python":"ErrorCode.Timeout","summary":"Operation timed out.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.Timeout)\n        Print(\"Operation timed out\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.Timeout:\n        api.Print(\"Operation timed out\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.UnknownSymbol","kind":"enum value","name":"UnknownSymbol","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.UnknownSymbol;","python":"ErrorCode.UnknownSymbol","summary":"Unknown symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.UnknownSymbol)\n        Print(\"Unknown symbol.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.UnknownSymbol:\n        api.Print(\"Unknown symbol.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.InvalidStopLossTakeProfit","kind":"enum value","name":"InvalidStopLossTakeProfit","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.InvalidStopLossTakeProfit;","python":"ErrorCode.InvalidStopLossTakeProfit","summary":"The invalid Stop Loss or Take Profit.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.InvalidStopLossTakeProfit)\n        Print(\"The invalid Stop Loss or Take Profit.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.InvalidStopLossTakeProfit:\n        api.Print(\"The invalid Stop Loss or Take Profit.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.InvalidRequest","kind":"enum value","name":"InvalidRequest","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.InvalidRequest;","python":"ErrorCode.InvalidRequest","summary":"The invalid request.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.InvalidRequest)\n        Print(\"The invalid request.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.InvalidRequest:\n        api.Print(\"The invalid request.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ErrorCode.NoTradingPermission","kind":"enum value","name":"NoTradingPermission","type":"T:cAlgo.API.ErrorCode","namespace":"cAlgo.API","group":"Trading","csharp":"ErrorCode.NoTradingPermission;","python":"ErrorCode.NoTradingPermission","summary":"Occurs when accessing trading API without trading permission.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode","pythonType":"ErrorCode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    if (error.Code == ErrorCode.NoTradingPermission)\n        Print(\"The account has no trading permission.\");\n}","python":"def on_error(self, error):\n    if error.Code == ErrorCode.NoTradingPermission:\n        api.Print(\"The account has no trading permission.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ErrorCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ExecuteScriptResult","kind":"class","name":"ExecuteScriptResult","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class ExecuteScriptResult","python":"ExecuteScriptResult","summary":"The result of JavaScript execution on a WebView control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView();\nwebView.Loaded += args => webView.NavigateToStringAsync(\"<html><body>Hello</body></html>\");\nwebView.NavigationCompleted += args =>\n{\n    var result = webView.ExecuteScript(\"document.body.innerText\");\n    Print(\"Successful: {0}, JSON: {1}\", result.IsSuccessful, result.Json);\n};\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Loaded += lambda args: webView.NavigateToStringAsync(\"<html><body>Hello</body></html>\")\nwebView.NavigationCompleted += lambda args: api.Print(webView.ExecuteScript(\"document.body.innerText\").Json)\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ExecuteScriptResult.#ctor(System.Boolean,System.String)","kind":"constructor","name":"ExecuteScriptResult","type":"T:cAlgo.API.ExecuteScriptResult","namespace":"cAlgo.API","group":"Controls","csharp":"public ExecuteScriptResult(bool isSuccessful, string json)","python":"ExecuteScriptResult(isSuccessful: bool, json: str)","summary":"Initializes a new instance of ExecuteScriptResult","remarks":null,"parameters":[{"name":"isSuccessful","csharpType":"bool","pythonType":"bool","summary":"IsSuccessful"},{"name":"json","csharpType":"string","pythonType":"str","summary":"JSON content"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = new ExecuteScriptResult(true, \"{\\\"symbol\\\":\\\"EURUSD\\\"}\");\nPrint(\"Successful: {0}, JSON: {1}\", result.IsSuccessful, result.Json);","python":"result = ExecuteScriptResult(True, '{\"symbol\":\"EURUSD\"}')\napi.Print(f\"Successful: {result.IsSuccessful}, JSON: {result.Json}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ExecuteScriptResult.IsSuccessful","kind":"property","name":"IsSuccessful","type":"T:cAlgo.API.ExecuteScriptResult","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsSuccessful {get;}","python":"executeScriptResult.IsSuccessful: bool","summary":"True if JavaScript execution was successful otherwise false","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\");\nwebView.NavigationCompleted += args =>\n{\n    var result = webView.ExecuteScript(\"document.body.innerText\");\n    Print(result != null && result.IsSuccessful ? \"Script executed\" : \"Script failed\");\n};\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\")\nwebView.NavigationCompleted += lambda args: webView.ExecuteScriptAsync(\"document.body.innerText\", lambda result: api.Print(f\"Successful: {result.IsSuccessful}\"))\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/IsSuccessful/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/IsSuccessful/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ExecuteScriptResult.Json","kind":"property","name":"Json","type":"T:cAlgo.API.ExecuteScriptResult","namespace":"cAlgo.API","group":"Controls","csharp":"public string Json {get;}","python":"executeScriptResult.Json: str","summary":"Returned JSON result of execution.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\");\nwebView.NavigationCompleted += args => webView.ExecuteScriptAsync(\"JSON.stringify({ bid: 1.085 })\", result =>\n{\n    if (result.IsSuccessful)\n        Print(\"JSON result: {0}\", result.Json);\n});\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\")\nwebView.NavigationCompleted += lambda args: webView.ExecuteScriptAsync(\"JSON.stringify({ bid: 1.085 })\", lambda result: api.Print(f\"JSON result: {result.Json}\"))\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/Json/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ExecuteScriptResult/Json/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.ExponentialMovingAverage","kind":"interface","name":"ExponentialMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ExponentialMovingAverage","python":"ExponentialMovingAverage","summary":"The exponential moving average of the price data source over a period of time.","remarks":"The exponential moving average is similar to the simple moving average, but applies more weight to more recent data. The weighting for each older price data decreases exponentially. Therefore the exponential moving average reacts faster to latest price changes than the simple moving average.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class EmaExample : Indicator\n{\n    private ExponentialMovingAverage _emaFast;\n    private ExponentialMovingAverage _emaSlow;\n\n    protected override void Initialize()\n    {\n        // initialize new instances of ExponentialMovingAverage Indicator class\n        _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);\n        // _emaSlow is the exponential moving average of the emaFast\n        _emaSlow = Indicators.ExponentialMovingAverage(_emaFast.Result, SlowPeriods);\n    }\n\n    public override void Calculate(int index)\n    {\n        // If the index is less than SlowPeriods don't calculate\n        if(index <= SlowPeriods)\n        {\n            return;\n        }\n\n        if(_emaFast.Result.HasCrossedAbove(_emaSlow.Result,0))\n        {\n            // Print the index at which the fast ema crossed the slow ema\n            Print(\"Fast EMA Has Crossed Above at index = {0}\", index);\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.emaFast = api.Indicators.ExponentialMovingAverage(api.Price, api.FastPeriods)\n        # emaSlow is the exponential moving average of the emaFast\n        self.emaSlow = api.Indicators.ExponentialMovingAverage(self.emaFast.Result, api.SlowPeriods)\n\n    def calculate(self, index):\n        # If the index is less than SlowPeriods don't calculate\n        if index <= api.SlowPeriods:\n            return\n\n        if Functions.HasCrossedAbove(self.emaFast.Result, self.emaSlow.Result, 0):\n            # Print the index at which the fast ema crossed the slow ema\n            api.Print(f\"Fast EMA Has Crossed Above at index = {index}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Price\",\n      \"DisplayName\": \"Data Source\",\n      \"Type\": \"DataSeries\"\n    },\n    {\n      \"Name\": \"SlowPeriods\",\n      \"DisplayName\": \"Slow Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"FastPeriods\",\n      \"DisplayName\": \"Fast Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 5\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Exponential Moving Average indicator\n    public partial class ExponentialMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private ExponentialMovingAverage _fastExponentialMovingAverage;\n\n        private ExponentialMovingAverage _slowExponentialMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastExponentialMovingAverage = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 9);\n\n            _slowExponentialMovingAverage = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastExponentialMovingAverage.Result.Last(1) > _slowExponentialMovingAverage.Result.Last(1) && _fastExponentialMovingAverage.Result.Last(2) < _slowExponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastExponentialMovingAverage.Result.Last(1) < _slowExponentialMovingAverage.Result.Last(1) && _fastExponentialMovingAverage.Result.Last(2) > _slowExponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass ExponentialMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastExponentialMovingAverage = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 9)\n        self.slowExponentialMovingAverage = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if self.fastExponentialMovingAverage.Result.Last(0) > self.slowExponentialMovingAverage.Result.Last(0) and self.fastExponentialMovingAverage.Result.Last(1) < self.slowExponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif self.fastExponentialMovingAverage.Result.Last(0) < self.slowExponentialMovingAverage.Result.Last(0) and self.fastExponentialMovingAverage.Result.Last(1) > self.slowExponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.FavoriteTimeFrames","kind":"interface","name":"FavoriteTimeFrames","type":null,"namespace":"cAlgo.API","group":"TimeFrame","csharp":"public interface FavoriteTimeFrames","python":"FavoriteTimeFrames","summary":"Provides access to favorite TimeFrames API for plugins.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        TimeFrameManager.Favorite.Added += args => Print($\"Favorite TimeFrames added: {string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name))}\");\n        TimeFrameManager.Favorite.Removed += args => Print($\"Favorite TimeFrames removed: {string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name))}\");\n\n        TimeFrameManager.Favorite.Add(TimeFrame.Daily);\n        TimeFrameManager.Favorite.Add(TimeFrame.Range1);\n        TimeFrameManager.Favorite.Add(TimeFrame.Range100);\n\n        Print($\"Is Range100 on Favorite TimeFrames: {TimeFrameManager.Favorite.Contains(TimeFrame.Range100)}\");\n\n        TimeFrameManager.Favorite.Remove(TimeFrame.Range100);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        api.TimeFrameManager.Favorite.Added += lambda args: print(f\"Favorite TimeFrames added: {', '.join([t.Name for t in args.TimeFrames])}\")\n        api.TimeFrameManager.Favorite.Removed += lambda args: print(f\"Favorite TimeFrames removed: {', '.join([t.Name for t in args.TimeFrames])}\")\n\n        api.TimeFrameManager.Favorite.Add(TimeFrame.Daily)\n        api.TimeFrameManager.Favorite.Add(TimeFrame.Range1)\n        api.TimeFrameManager.Favorite.Add(TimeFrame.Range100)\n\n        print(f\"Is Range100 on Favorite TimeFrames: {api.TimeFrameManager.Favorite.Contains(TimeFrame.Range100)}\")\n\n        api.TimeFrameManager.Favorite.Remove(TimeFrame.Range100)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FavoriteTimeFrames.Add(cAlgo.API.TimeFrame)","kind":"method","name":"Add","type":"T:cAlgo.API.FavoriteTimeFrames","namespace":"cAlgo.API","group":"TimeFrame","csharp":"void Add(TimeFrame timeFrame)","python":"favoriteTimeFrames.Add(timeFrame: TimeFrame) -> None","summary":"Adds a time frame to favorite TimeFrames.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"TimeFrame"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"TimeFrameManager.Favorite.Add(TimeFrame.Hour4);\nPrint(\"Hour4 is favorite: {0}\", TimeFrameManager.Favorite.Contains(TimeFrame.Hour4));","python":"api.TimeFrameManager.Favorite.Add(TimeFrame.Hour4)\napi.Print(f\"Hour4 is favorite: {api.TimeFrameManager.Favorite.Contains(TimeFrame.Hour4)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FavoriteTimeFrames.Contains(cAlgo.API.TimeFrame)","kind":"method","name":"Contains","type":"T:cAlgo.API.FavoriteTimeFrames","namespace":"cAlgo.API","group":"TimeFrame","csharp":"bool Contains(TimeFrame timeFrame)","python":"favoriteTimeFrames.Contains(timeFrame: TimeFrame) -> bool","summary":"Returns True if passed TimeFrame is in favorite TimeFrames otherwise False.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"TimeFrame"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"if (!TimeFrameManager.Favorite.Contains(TimeFrame.Daily))\n    TimeFrameManager.Favorite.Add(TimeFrame.Daily);","python":"if not api.TimeFrameManager.Favorite.Contains(TimeFrame.Daily):\n    api.TimeFrameManager.Favorite.Add(TimeFrame.Daily)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Contains/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Contains/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FavoriteTimeFrames.Remove(cAlgo.API.TimeFrame)","kind":"method","name":"Remove","type":"T:cAlgo.API.FavoriteTimeFrames","namespace":"cAlgo.API","group":"TimeFrame","csharp":"bool Remove(TimeFrame timeFrame)","python":"favoriteTimeFrames.Remove(timeFrame: TimeFrame) -> bool","summary":"Removes a time frame from favorite TimeFrames.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"TimeFrame"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise False.","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var isRemoved = TimeFrameManager.Favorite.Remove(TimeFrame.Hour4);\nPrint(\"Hour4 removed from favorites: {0}\", isRemoved);","python":"isRemoved = api.TimeFrameManager.Favorite.Remove(TimeFrame.Hour4)\napi.Print(f\"Hour4 removed from favorites: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.FavoriteTimeFrames.Added","kind":"event","name":"Added","type":"T:cAlgo.API.FavoriteTimeFrames","namespace":"cAlgo.API","group":"TimeFrame","csharp":"event Action<FavoriteTimeFramesAddedEventArgs> Added;","python":"favoriteTimeFrames.Added += handler  # handler(obj: FavoriteTimeFramesAddedEventArgs)","summary":"Occurs when new TimeFrames are added to favorite TimeFrames.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FavoriteTimeFramesAddedEventArgs>","pythonType":"Callable[[FavoriteTimeFramesAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Added += OnFavoriteTimeFramesAdded;\n}\n\nprivate void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"Added to favorites: {0}\", timeFrame.Name);\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Added += self.on_favorite_time_frames_added\n\ndef on_favorite_time_frames_added(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"Added to favorites: {timeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.FavoriteTimeFrames.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.FavoriteTimeFrames","namespace":"cAlgo.API","group":"TimeFrame","csharp":"event Action<FavoriteTimeFramesRemovedEventArgs> Removed;","python":"favoriteTimeFrames.Removed += handler  # handler(obj: FavoriteTimeFramesRemovedEventArgs)","summary":"Occurs when TimeFrames are removed from favorite TimeFrames.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FavoriteTimeFramesRemovedEventArgs>","pythonType":"Callable[[FavoriteTimeFramesRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Removed += OnFavoriteTimeFramesRemoved;\n}\n\nprivate void OnFavoriteTimeFramesRemoved(FavoriteTimeFramesRemovedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"Removed from favorites: {0}\", timeFrame.Name);\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Removed += self.on_favorite_time_frames_removed\n\ndef on_favorite_time_frames_removed(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"Removed from favorites: {timeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FavoriteTimeFramesAddedEventArgs","kind":"class","name":"FavoriteTimeFramesAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FavoriteTimeFramesAddedEventArgs","python":"FavoriteTimeFramesAddedEventArgs","summary":"Provides data for the Favorite TimeFrames Added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Added += OnFavoriteTimeFramesAdded;\n}\n\nprivate void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)\n{\n    Print(\"Added to favorites: {0}\", string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name)));\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Added += self.on_favorite_time_frames_added\n\ndef on_favorite_time_frames_added(self, args):\n    api.Print(\"Added to favorites: \" + \", \".join([str(timeFrame) for timeFrame in args.TimeFrames]))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FavoriteTimeFramesAddedEventArgs.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.FavoriteTimeFramesAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TimeFrame[] TimeFrames {get;}","python":"favoriteTimeFramesAddedEventArgs.TimeFrames: list[TimeFrame]","summary":"Gets the added time frames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame[]","pythonType":"list[TimeFrame]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Added += OnFavoriteTimeFramesAdded;\n}\n\nprivate void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"{0} is now a favorite time frame\", timeFrame);\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Added += self.on_favorite_time_frames_added\n\ndef on_favorite_time_frames_added(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"{timeFrame} is now a favorite time frame\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FavoriteTimeFramesRemovedEventArgs","kind":"class","name":"FavoriteTimeFramesRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FavoriteTimeFramesRemovedEventArgs","python":"FavoriteTimeFramesRemovedEventArgs","summary":"Provides data for the Favorite TimeFrames Removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Removed += OnFavoriteTimeFramesRemoved;\n}\n\nprivate void OnFavoriteTimeFramesRemoved(FavoriteTimeFramesRemovedEventArgs args)\n{\n    Print(\"Removed from favorites: {0}\", string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name)));\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Removed += self.on_favorite_time_frames_removed\n\ndef on_favorite_time_frames_removed(self, args):\n    api.Print(\"Removed from favorites: \" + \", \".join([str(timeFrame) for timeFrame in args.TimeFrames]))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FavoriteTimeFramesRemovedEventArgs.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.FavoriteTimeFramesRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TimeFrame[] TimeFrames {get;}","python":"favoriteTimeFramesRemovedEventArgs.TimeFrames: list[TimeFrame]","summary":"Gets the removed time frames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame[]","pythonType":"list[TimeFrame]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrameManager.Favorite.Removed += OnFavoriteTimeFramesRemoved;\n}\n\nprivate void OnFavoriteTimeFramesRemoved(FavoriteTimeFramesRemovedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"{0} is no longer a favorite time frame\", timeFrame);\n}","python":"def on_start(self):\n    api.TimeFrameManager.Favorite.Removed += self.on_favorite_time_frames_removed\n\ndef on_favorite_time_frames_removed(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"{timeFrame} is no longer a favorite time frame\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesRemovedEventArgs/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesRemovedEventArgs/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FibonacciLevel","kind":"interface","name":"FibonacciLevel","type":null,"namespace":"cAlgo.API","group":"Fibonacci","csharp":"public interface FibonacciLevel","python":"FibonacciLevel","summary":"Represents the Fibonacci Level.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use a chart Fibonacci Retracement levels property to modify the fibonacci levels\n    public partial class FibonacciLevelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;\n\n            var max = Bars.HighPrices.Maximum(period);\n            var min = Bars.LowPrices.Minimum(period);\n\n            var fibonacciRetracement = Chart.DrawFibonacciRetracement(\"FibonacciRetracement\", Chart.FirstVisibleBarIndex, max, Chart.LastVisibleBarIndex, min, Color.Red);\n\n            foreach (var level in fibonacciRetracement.FibonacciLevels)\n            {\n                Print(level.Percent);\n\n                if (level.Percent > 62) level.IsVisible = false;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        period = api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex\n\n        maxValue = Functions.Maximum(api.Bars.HighPrices, period)\n        minValue = Functions.Minimum(api.Bars.LowPrices, period)\n\n        fibonacciRetracement = api.Chart.DrawFibonacciRetracement(\"FibonacciRetracement\", api.Chart.FirstVisibleBarIndex, maxValue, api.Chart.LastVisibleBarIndex, minValue, Color.Red)\n\n        for level in fibonacciRetracement.FibonacciLevels:\n            print(level.Percent)\n            if level.Percent > 62:\n                level.IsVisible = False","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FibonacciLevel.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.FibonacciLevel","namespace":"cAlgo.API","group":"Fibonacci","csharp":"bool IsVisible {get; set;}","python":"fibonacciLevel.IsVisible: bool","summary":"Defines if the level is visible.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nforeach (var level in retracement.FibonacciLevels)\n    level.IsVisible = level.Percent == 38.2 || level.Percent == 61.8;\nPrint(\"Only the 38.2% and 61.8% levels are visible\");","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nfor level in retracement.FibonacciLevels:\n    level.IsVisible = level.Percent == 38.2 or level.Percent == 61.8\napi.Print(\"Only the 38.2% and 61.8% levels are visible\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FibonacciLevel.Percent","kind":"property","name":"Percent","type":"T:cAlgo.API.FibonacciLevel","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double Percent {get; set;}","python":"fibonacciLevel.Percent: float","summary":"Gets or sets the level percent.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nvar firstLevel = retracement.FibonacciLevels[0];\nfirstLevel.Percent = 78.6;\nPrint(\"First level percent: {0}\", firstLevel.Percent);","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nfirstLevel = retracement.FibonacciLevels[0]\nfirstLevel.Percent = 78.6\napi.Print(f\"First level percent: {firstLevel.Percent}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Percent/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Percent/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FibonacciLevel.Price","kind":"property","name":"Price","type":"T:cAlgo.API.FibonacciLevel","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double? Price {get; set;}","python":"fibonacciLevel.Price: float | None","summary":"Gets or sets the level price.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var retracement = Chart.DrawFibonacciRetracement(\"retracement\", Bars.OpenTimes.Last(50), Bars.HighPrices.Last(50), Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Red);\nforeach (var level in retracement.FibonacciLevels)\n{\n    if (level.Price.HasValue)\n        Print(\"Level {0}% price: {1}\", level.Percent, level.Price.Value);\n}","python":"retracement = api.Chart.DrawFibonacciRetracement(\"retracement\", api.Bars.OpenTimes.Last(50), api.Bars.HighPrices.Last(50), api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Red)\nfor level in retracement.FibonacciLevels:\n    if level.Price is not None:\n        api.Print(f\"Level {level.Percent}% price: {level.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FibonacciLevel.Time","kind":"property","name":"Time","type":"T:cAlgo.API.FibonacciLevel","namespace":"cAlgo.API","group":"Fibonacci","csharp":"DateTime? Time {get; set;}","python":"fibonacciLevel.Time: DateTime | None","summary":"Gets or sets the level time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var timezones = Chart.DrawFibonacciTimezones(\"timezones\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.Last(25), Bars.HighPrices.Last(25), Color.Red);\nforeach (var level in timezones.FibonacciLevels)\n    Print(\"Level {0} time: {1}\", level.Percent, level.Time.HasValue ? level.Time.Value.ToString() : \"n/a\");","python":"timezones = api.Chart.DrawFibonacciTimezones(\"timezones\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.Last(25), api.Bars.HighPrices.Last(25), Color.Red)\nfor level in timezones.FibonacciLevels:\n    api.Print(f\"Level {level.Percent} time: {level.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FibonacciLevel.PercentLevel","kind":"property","name":"PercentLevel","type":"T:cAlgo.API.FibonacciLevel","namespace":"cAlgo.API","group":"Fibonacci","csharp":"double PercentLevel {get; set;}","python":"fibonacciLevel.PercentLevel: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Percent instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Fibonacci/FibonacciLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.File","kind":"interface","name":"File","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public interface File","python":"File","summary":"Represents a file.","remarks":"You can use this as a parameter type to get direct read and write access to a file.","parameters":[],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"public partial class FileSample : Robot\n{\n    protected override void OnStart()\n    {\n        if (!TradesLog.Exists())\n            TradesLog.WriteAllText(\"Time,Symbol,Side\" + Environment.NewLine);\n\n        Positions.Opened += args => TradesLog.AppendAllText($\"{Server.Time:O},{args.Position.SymbolName},{args.Position.TradeType}{Environment.NewLine}\");\n        Print(\"Logging trades to {0} ({1} bytes)\", TradesLog.Name, TradesLog.Size);\n    }\n}","python":"def on_start(self):\n    if not api.TradesLog.Exists():\n        api.TradesLog.WriteAllText(\"Time,Symbol,Side\\n\")\n    api.Positions.Opened += self.on_position_opened\n    api.Print(f\"Logging trades to {api.TradesLog.Name} ({api.TradesLog.Size} bytes)\")\n\ndef on_position_opened(self, args):\n    position = args.Position\n    api.TradesLog.AppendAllText(f\"{api.Server.Time},{position.SymbolName},{position.TradeType}\\n\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"TradesLog\",\n      \"DisplayName\": \"Trades Log\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.AppendAllLines(System.String[])","kind":"method","name":"AppendAllLines","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void AppendAllLines(string[] contents)","python":"file.AppendAllLines(contents: list[str]) -> None","summary":"Appends lines to file.","remarks":null,"parameters":[{"name":"contents","csharpType":"string[]","pythonType":"list[str]","summary":"The string lines to append to the file."}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var lines = Positions.Select(position => $\"{position.SymbolName},{position.TradeType},{position.NetProfit}\").ToArray();\n    DataFile.AppendAllLines(lines);\n}","python":"from System import Array, String\n\nlines = [f\"{position.SymbolName},{position.TradeType},{position.NetProfit}\" for position in api.Positions]\napi.DataFile.AppendAllLines(Array[String](lines))","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.AppendAllLines(System.String[],cAlgo.API.EncodingType)","kind":"method","name":"AppendAllLines","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void AppendAllLines(string[] contents, EncodingType encodingType)","python":"file.AppendAllLines(contents: list[str], encodingType: EncodingType) -> None","summary":"Appends lines to file that has a specified encoding.","remarks":null,"parameters":[{"name":"contents","csharpType":"string[]","pythonType":"list[str]","summary":"The string lines to append to the file."},{"name":"encodingType","csharpType":"EncodingType","pythonType":"EncodingType","summary":"Encoding type"}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.AppendAllLines(new[] { SymbolName, Symbol.Bid.ToString() }, EncodingType.Utf32);\n}","python":"from System import Array, String\n\napi.DataFile.AppendAllLines(Array[String]([api.SymbolName, str(api.Symbol.Bid)]), EncodingType.Utf32)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.AppendAllText(System.String)","kind":"method","name":"AppendAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void AppendAllText(string contents)","python":"file.AppendAllText(contents: str) -> None","summary":"Append text to file.","remarks":null,"parameters":[{"name":"contents","csharpType":"string","pythonType":"str","summary":"The string to append to the file."}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnBar()\n{\n    DataFile.AppendAllText($\"{Bars.LastBar.OpenTime:O},{Bars.LastBar.Close}{Environment.NewLine}\");\n}","python":"def on_bar(self):\n    lastBar = api.Bars.LastBar\n    api.DataFile.AppendAllText(f\"{lastBar.OpenTime},{lastBar.Close}\\n\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.AppendAllText(System.String,cAlgo.API.EncodingType)","kind":"method","name":"AppendAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void AppendAllText(string contents, EncodingType encodingType)","python":"file.AppendAllText(contents: str, encodingType: EncodingType) -> None","summary":"Appends text to file that has a specified encoding.","remarks":null,"parameters":[{"name":"contents","csharpType":"string","pythonType":"str","summary":"The string to append to the file."},{"name":"encodingType","csharpType":"EncodingType","pythonType":"EncodingType","summary":"Encoding type"}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.AppendAllText($\"{Server.Time:O},{Symbol.Bid}{Environment.NewLine}\", EncodingType.Utf8);\n}","python":"api.DataFile.AppendAllText(f\"{api.Server.Time},{api.Symbol.Bid}\\n\", EncodingType.Utf8)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/AppendAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.Exists","kind":"method","name":"Exists","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"bool Exists()","python":"file.Exists() -> bool","summary":"Returns True if File exists otherwise False.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (!DataFile.Exists())\n        DataFile.WriteAllText(\"Symbol,Price\");\n}","python":"if not api.DataFile.Exists():\n    api.DataFile.WriteAllText(\"Symbol,Price\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Exists/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Exists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadAllBytes","kind":"method","name":"ReadAllBytes","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"byte[] ReadAllBytes()","python":"file.ReadAllBytes() -> list[int]","summary":"Reads the contents of the file into a byte array.","remarks":null,"parameters":[],"returns":{"csharpType":"byte[]","pythonType":"list[int]","summary":"byte[]","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var bytes = DataFile.ReadAllBytes();\n    Print(\"Read {0} bytes from {1}\", bytes.Length, DataFile.Name);\n}","python":"data = api.DataFile.ReadAllBytes()\napi.Print(f\"Read {data.Length} bytes from {api.DataFile.Name}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllBytes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllBytes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadAllText","kind":"method","name":"ReadAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string ReadAllText()","python":"file.ReadAllText() -> str","summary":"Reads all the text in the file.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"string","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var text = DataFile.ReadAllText();\n    Print(\"File content: {0}\", text);\n}","python":"text = api.DataFile.ReadAllText()\napi.Print(f\"File content: {text}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadAllText(cAlgo.API.EncodingType)","kind":"method","name":"ReadAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string ReadAllText(EncodingType encodingType)","python":"file.ReadAllText(encodingType: EncodingType) -> str","summary":"Reads all the text in the file that has a specified encoding.","remarks":null,"parameters":[{"name":"encodingType","csharpType":"EncodingType","pythonType":"EncodingType","summary":"Encoding type"}],"returns":{"csharpType":"string","pythonType":"str","summary":"string","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var text = DataFile.ReadAllText(EncodingType.Latin1);\n    Print(\"File content: {0}\", text);\n}","python":"text = api.DataFile.ReadAllText(EncodingType.Latin1)\napi.Print(f\"File content: {text}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadBytes(System.Int32,System.Int32)","kind":"method","name":"ReadBytes","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"byte[] ReadBytes(int offset, int count)","python":"file.ReadBytes(offset: int, count: int) -> list[int]","summary":"Reads a sequence of bytes from the file.","remarks":null,"parameters":[{"name":"offset","csharpType":"int","pythonType":"int","summary":"File byte offset"},{"name":"count","csharpType":"int","pythonType":"int","summary":"Count of bytes to read"}],"returns":{"csharpType":"byte[]","pythonType":"list[int]","summary":"byte[]","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var header = DataFile.ReadBytes(0, 16);\n    Print(\"File header: {0}\", Encoding.UTF8.GetString(header));\n}","python":"from System.Text import Encoding\n\nheader = api.DataFile.ReadBytes(0, 16)\napi.Print(f\"File header: {Encoding.UTF8.GetString(header)}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadBytes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadBytes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadLines","kind":"method","name":"ReadLines","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string[] ReadLines()","python":"file.ReadLines() -> list[str]","summary":"Reads the lines of file.","remarks":null,"parameters":[],"returns":{"csharpType":"string[]","pythonType":"list[str]","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    foreach (var line in DataFile.ReadLines())\n        Print(line);\n}","python":"for line in api.DataFile.ReadLines():\n    api.Print(line)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.ReadLines(cAlgo.API.EncodingType)","kind":"method","name":"ReadLines","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string[] ReadLines(EncodingType encodingType)","python":"file.ReadLines(encodingType: EncodingType) -> list[str]","summary":"Reads the lines of file that has a specified encoding.","remarks":null,"parameters":[{"name":"encodingType","csharpType":"EncodingType","pythonType":"EncodingType","summary":"Encoding type"}],"returns":{"csharpType":"string[]","pythonType":"list[str]","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var lines = DataFile.ReadLines(EncodingType.Unicode);\n    Print(\"{0} has {1} lines\", DataFile.Name, lines.Length);\n}","python":"lines = api.DataFile.ReadLines(EncodingType.Unicode)\napi.Print(f\"{api.DataFile.Name} has {len(lines)} lines\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/ReadLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.WriteAllBytes(System.Byte[])","kind":"method","name":"WriteAllBytes","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void WriteAllBytes(byte[] bytes)","python":"file.WriteAllBytes(bytes: list[int]) -> None","summary":"Overwrites file content with passed bytes.","remarks":null,"parameters":[{"name":"bytes","csharpType":"byte[]","pythonType":"list[int]","summary":"Bytes to write"}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.WriteAllBytes(Encoding.UTF8.GetBytes(SymbolName + \",\" + Symbol.Bid));\n}","python":"from System.Text import Encoding\n\napi.DataFile.WriteAllBytes(Encoding.UTF8.GetBytes(f\"{api.SymbolName},{api.Symbol.Bid}\"))","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllBytes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllBytes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.WriteAllText(System.String)","kind":"method","name":"WriteAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void WriteAllText(string contents)","python":"file.WriteAllText(contents: str) -> None","summary":"Overwrites file content with passed text content.","remarks":null,"parameters":[{"name":"contents","csharpType":"string","pythonType":"str","summary":"The string to write to the file."}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.WriteAllText($\"{SymbolName},{Symbol.Bid},{Symbol.Ask}\");\n}","python":"api.DataFile.WriteAllText(f\"{api.SymbolName},{api.Symbol.Bid},{api.Symbol.Ask}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.WriteAllText(System.String,cAlgo.API.EncodingType)","kind":"method","name":"WriteAllText","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void WriteAllText(string contents, EncodingType encodingType)","python":"file.WriteAllText(contents: str, encodingType: EncodingType) -> None","summary":"Overwrites file content with passed text content that has a specified encoding.","remarks":null,"parameters":[{"name":"contents","csharpType":"string","pythonType":"str","summary":"The string to write to the file."},{"name":"encodingType","csharpType":"EncodingType","pythonType":"EncodingType","summary":"Encoding type"}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    DataFile.WriteAllText($\"{SymbolName},{Symbol.Bid}\", EncodingType.Utf8);\n}","python":"api.DataFile.WriteAllText(f\"{api.SymbolName},{api.Symbol.Bid}\", EncodingType.Utf8)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllText/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteAllText/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"M:cAlgo.API.File.WriteBytes(System.Byte[],System.Int32,System.Int32)","kind":"method","name":"WriteBytes","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"void WriteBytes(byte[] bytes, int offset, int count)","python":"file.WriteBytes(bytes: list[int], offset: int, count: int) -> None","summary":"Writes a chunk of data to file specific position.","remarks":null,"parameters":[{"name":"bytes","csharpType":"byte[]","pythonType":"list[int]","summary":"Bytes to write"},{"name":"offset","csharpType":"int","pythonType":"int","summary":"File byte offset"},{"name":"count","csharpType":"int","pythonType":"int","summary":"Count of bytes to write"}],"returns":null,"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var bytes = Encoding.UTF8.GetBytes(SymbolName);\n    DataFile.WriteBytes(bytes, 0, bytes.Length);\n}","python":"from System.Text import Encoding\n\ndata = Encoding.UTF8.GetBytes(api.SymbolName)\napi.DataFile.WriteBytes(data, 0, data.Length)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteBytes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/WriteBytes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Exists returns false; reads return empty string/array; writes and appends silently do nothing. No exception."}]}
{"id":"P:cAlgo.API.File.CreationTime","kind":"property","name":"CreationTime","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"DateTime CreationTime {get;}","python":"file.CreationTime: DateTime","summary":"Gets the creation time of the file.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"{0} created at {1}\", DataFile.Name, DataFile.CreationTime);\n}","python":"api.Print(f\"{api.DataFile.Name} created at {api.DataFile.CreationTime}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/CreationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/CreationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Throws InvalidOperationException 'Getting file info is not supported in cloud environment.'"}]}
{"id":"P:cAlgo.API.File.Extension","kind":"property","name":"Extension","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string Extension {get;}","python":"file.Extension: str","summary":"Gets the extension part of the file name, including the leading dot '.' even if it is the entire file name, or an empty string if no extension is present.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (DataFile.Extension != \".csv\")\n        Print(\"Expected a CSV file but got {0}\", DataFile.Extension);\n}","python":"if api.DataFile.Extension != \".csv\":\n    api.Print(f\"Expected a CSV file but got {api.DataFile.Extension}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Extension/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Extension/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.File.LastAccessTime","kind":"property","name":"LastAccessTime","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"DateTime LastAccessTime {get;}","python":"file.LastAccessTime: DateTime","summary":"Gets the time the current file was last accessed.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"{0} last accessed at {1}\", DataFile.Name, DataFile.LastAccessTime);\n}","python":"api.Print(f\"{api.DataFile.Name} last accessed at {api.DataFile.LastAccessTime}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/LastAccessTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/LastAccessTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Throws InvalidOperationException 'Getting file info is not supported in cloud environment.'"}]}
{"id":"P:cAlgo.API.File.LastWriteTime","kind":"property","name":"LastWriteTime","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"DateTime LastWriteTime {get;}","python":"file.LastWriteTime: DateTime","summary":"Gets the time when the current file was last written to.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (DataFile.LastWriteTime < DateTime.Now.AddDays(-1))\n        Print(\"{0} has not been updated for more than a day\", DataFile.Name);\n}","python":"from System import DateTime\n\nif api.DataFile.LastWriteTime < DateTime.Now.AddDays(-1):\n    api.Print(f\"{api.DataFile.Name} has not been updated for more than a day\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/LastWriteTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/LastWriteTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Throws InvalidOperationException 'Getting file info is not supported in cloud environment.'"}]}
{"id":"P:cAlgo.API.File.Name","kind":"property","name":"Name","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"string Name {get;}","python":"file.Name: str","summary":"Gets file name without path.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"File name: {0}\", DataFile.Name);\n}","python":"api.Print(f\"File name: {api.DataFile.Name}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.File.Size","kind":"property","name":"Size","type":"T:cAlgo.API.File","namespace":"cAlgo.API","group":"Utility","csharp":"long Size {get;}","python":"file.Size: int","summary":"Gets file size in bytes.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"{0} size: {1} KB\", DataFile.Name, DataFile.Size / 1024.0);\n}","python":"api.Print(f\"{api.DataFile.Name} size: {api.DataFile.Size / 1024.0} KB\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"DataFile\",\n      \"DisplayName\": \"Data File\",\n      \"Type\": \"File\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Size/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/File/Size/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Throws InvalidOperationException 'Getting file info is not supported in cloud environment.'"}]}
{"id":"T:cAlgo.API.FileAssociations","kind":"interface","name":"FileAssociations","type":null,"namespace":"cAlgo.API","group":"FileAssociation","csharp":"public interface FileAssociations","python":"FileAssociations","summary":"Represents the collection of plugin file associations.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.IO;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    private const string FileSvgIcon = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\";\n\n    protected override void OnStart()\n    {\n        var addFileAssociationButton = new Button {Text = \"Add File Association for '.test' Extension\"};\n\n        addFileAssociationButton.Click += args =>\n        {\n            FileAssociations.Add(\".test\", new SvgIcon(FileSvgIcon));\n\n            MessageBox.Show(\"File Association added for '.test' file extension, create a new file with '.test' extension and open it\");\n        };\n\n        var removeFileAssociationButton = new Button {Text = \"Remove File Association for '.test' Extension\"};\n\n        removeFileAssociationButton.Click += args =>\n        {\n            FileAssociations.Remove(\".test\");\n        };\n\n        var panel = new StackPanel {Orientation = Orientation.Vertical};\n\n        panel.AddChild(addFileAssociationButton);\n        panel.AddChild(removeFileAssociationButton);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"File Association Test\");\n\n        aspBlock.Child = panel;\n\n        // Whenever a file that has association is opened\n        // this event will be triggered and you can use\n        // args to get the file path and read it.\n        FileAssociations.FileOpened += args =>\n        {\n            Print($\"File {args.FilePath} opened, Size: {new FileInfo(args.FilePath).Length}\");\n        };\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System.IO import FileInfo\n\nclass Test():\n    FileSvgIcon = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\"\n\n    def on_start(self):\n        addFileAssociationButton = Button()\n        addFileAssociationButton.Text = \"Add File Association for '.test' Extension\"\n        addFileAssociationButton.Click += self.on_add_file_association_button_click\n\n        removeFileAssociationButton = Button()\n        removeFileAssociationButton.Text = \"Remove File Association for '.test' Extension\"\n        removeFileAssociationButton.Click += lambda _: api.FileAssociations.Remove(\".test\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        panel.AddChild(addFileAssociationButton)\n        panel.AddChild(removeFileAssociationButton)\n\n        aspBlock = api.Asp.SymbolTab.AddBlock(\"File Association Test\")\n        aspBlock.Child = panel\n\n        # Whenever a file that has association is opened\n        # this event will be triggered and you can use\n        # args to get the file path and read it.\n        api.FileAssociations.FileOpened += lambda args: print(f\"File {args.FilePath} opened, Size: {FileInfo(args.FilePath).Length}\")\n\n    def on_add_file_association_button_click(self, args):\n        api.FileAssociations.Add(\".test\", SvgIcon(self.FileSvgIcon))\n        MessageBox.Show(\"File Association added for '.test' file extension, create a new file with '.test' extension and open it\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FileAssociations.Add(System.String,System.String)","kind":"method","name":"Add","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"void Add(string fileExtension, string iconFilePath)","python":"api.FileAssociations.Add(fileExtension: str, iconFilePath: str) -> None","summary":"Adds a file extension to the list of associations along with a specified icon file path.","remarks":"These file extensions aren't allowed: exe, dll, bat, cmd, msi, ps1, com, sys, inf, ini, iso, img, vmdk, vdi, ova, app, dmg, pkg, command, sh, bin, iso, xcappdata","parameters":[{"name":"fileExtension","csharpType":"string","pythonType":"str","summary":"File extension with dot, ex: .pdf"},{"name":"iconFilePath","csharpType":"string","pythonType":"str","summary":"Icon file path"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"FileAssociations.Add(\".mydata\", @\"C:\\Users\\Me\\Documents\\icons\\mydata.ico\");\nPrint(\"Associated: {0}\", FileAssociations.Contains(\".mydata\"));","python":"api.FileAssociations.Add(\".mydata\", r\"C:\\Users\\Me\\Documents\\icons\\mydata.ico\")\napi.Print(f\"Associated: {api.FileAssociations.Contains('.mydata')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FileAssociations.Add(System.String,cAlgo.API.SvgIcon)","kind":"method","name":"Add","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"void Add(string fileExtension, SvgIcon svgIcon)","python":"api.FileAssociations.Add(fileExtension: str, svgIcon: SvgIcon) -> None","summary":"Adds a file extension to the list of associations along with a specified icon file path.","remarks":"These file extensions aren't allowed: exe, dll, bat, cmd, msi, ps1, com, sys, inf, ini, iso, img, vmdk, vdi, ova, app, dmg, pkg, command, sh, bin, iso, xcappdata","parameters":[{"name":"fileExtension","csharpType":"string","pythonType":"str","summary":"File extension with dot, ex: .pdf"},{"name":"svgIcon","csharpType":"SvgIcon","pythonType":"SvgIcon","summary":"SVG Icon"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nFileAssociations.Add(\".mydata\", icon);\nPrint(\"Associated: {0}\", FileAssociations.Contains(\".mydata\"));","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\napi.FileAssociations.Add(\".mydata\", icon)\napi.Print(f\"Associated: {api.FileAssociations.Contains('.mydata')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FileAssociations.Add(System.String)","kind":"method","name":"Add","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"void Add(string fileExtension)","python":"api.FileAssociations.Add(fileExtension: str) -> None","summary":"Adds a file extension to the list of associations without specifying an icon.","remarks":"These file extensions aren't allowed: exe, dll, bat, cmd, msi, ps1, com, sys, inf, ini, iso, img, vmdk, vdi, ova, app, dmg, pkg, command, sh, bin, iso, xcappdata","parameters":[{"name":"fileExtension","csharpType":"string","pythonType":"str","summary":"File extension with dot, ex: .pdf"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"FileAssociations.Add(\".mydata\");\nforeach (var fileExtension in FileAssociations)\n    Print(\"Associated extension: {0}\", fileExtension);","python":"api.FileAssociations.Add(\".mydata\")\nfor fileExtension in api.FileAssociations:\n    api.Print(f\"Associated extension: {fileExtension}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FileAssociations.Contains(System.String)","kind":"method","name":"Contains","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"bool Contains(string fileExtension)","python":"api.FileAssociations.Contains(fileExtension: str) -> bool","summary":"Checks if the specified file extension is already associated.","remarks":null,"parameters":[{"name":"fileExtension","csharpType":"string","pythonType":"str","summary":"File extension with dot, ex: .pdf"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (!FileAssociations.Contains(\".mydata\"))\n    FileAssociations.Add(\".mydata\");","python":"if not api.FileAssociations.Contains(\".mydata\"):\n    api.FileAssociations.Add(\".mydata\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Contains/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Contains/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.FileAssociations.Remove(System.String)","kind":"method","name":"Remove","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"void Remove(string fileExtension)","python":"api.FileAssociations.Remove(fileExtension: str) -> None","summary":"Removes a file extension from the list of associations.","remarks":null,"parameters":[{"name":"fileExtension","csharpType":"string","pythonType":"str","summary":"File extension with dot, ex: .pdf"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"FileAssociations.Remove(\".mydata\");\nPrint(\"Still associated: {0}\", FileAssociations.Contains(\".mydata\"));","python":"api.FileAssociations.Remove(\".mydata\")\napi.Print(f\"Still associated: {api.FileAssociations.Contains('.mydata')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.FileAssociations.FileOpened","kind":"event","name":"FileOpened","type":"T:cAlgo.API.FileAssociations","namespace":"cAlgo.API","group":"FileAssociation","csharp":"event Action<FileAssociationsFileOpenedEventArgs> FileOpened;","python":"api.FileAssociations.FileOpened += handler  # handler(obj: FileAssociationsFileOpenedEventArgs)","summary":"Event triggered when a file associated with a registered extension is opened.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FileAssociationsFileOpenedEventArgs>","pythonType":"Callable[[FileAssociationsFileOpenedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    FileAssociations.Add(\".mydata\");\n    FileAssociations.FileOpened += OnFileOpened;\n}\n\nprivate void OnFileOpened(FileAssociationsFileOpenedEventArgs args)\n{\n    Print(\"User opened file: {0}\", args.FilePath);\n}","python":"def on_start(self):\n    api.FileAssociations.Add(\".mydata\")\n    api.FileAssociations.FileOpened += self.on_file_opened\n\ndef on_file_opened(self, args):\n    api.Print(f\"User opened file: {args.FilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/FileOpened/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/FileAssociation/FileAssociations/FileOpened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FileAssociationsFileOpenedEventArgs","kind":"class","name":"FileAssociationsFileOpenedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FileAssociationsFileOpenedEventArgs","python":"FileAssociationsFileOpenedEventArgs","summary":"Provides data for plugin file associations file opened event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    FileAssociations.Add(\"csv\");\n    FileAssociations.FileOpened += OnFileOpened;\n}\n\nprivate void OnFileOpened(FileAssociationsFileOpenedEventArgs args)\n{\n    Print(\"File opened: {0}\", args.FilePath);\n}","python":"def on_start(self):\n    api.FileAssociations.Add(\"csv\")\n    api.FileAssociations.FileOpened += self.on_file_opened\n\ndef on_file_opened(self, args):\n    api.Print(f\"File opened: {args.FilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FileAssociationsFileOpenedEventArgs.FilePath","kind":"property","name":"FilePath","type":"T:cAlgo.API.FileAssociationsFileOpenedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string FilePath {get;}","python":"fileAssociationsFileOpenedEventArgs.FilePath: str","summary":"Gets opened file path.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    FileAssociations.Add(\"csv\");\n    FileAssociations.FileOpened += OnFileOpened;\n}\n\nprivate void OnFileOpened(FileAssociationsFileOpenedEventArgs args)\n{\n    if (args.FilePath.EndsWith(\".csv\", StringComparison.OrdinalIgnoreCase))\n        Print(\"Importing {0}\", args.FilePath);\n}","python":"def on_start(self):\n    api.FileAssociations.Add(\"csv\")\n    api.FileAssociations.FileOpened += self.on_file_opened\n\ndef on_file_opened(self, args):\n    if args.FilePath.lower().endswith(\".csv\"):\n        api.Print(f\"Importing {args.FilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/FilePath/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FileAssociationsFileOpenedEventArgs/FilePath/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FileDialogResult","kind":"enum","name":"FileDialogResult","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public enum FileDialogResult","python":"FileDialogResult","summary":"An enumeration of the different file dialog results.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Title = \"Select a CSV file\", Filter = \"CSV files|*.csv\" };\nvar result = openFileDialog.ShowDialog();\n\nif (result == FileDialogResult.OK)\n    Print(\"Selected file: {0}\", openFileDialog.FileName);\nelse if (result == FileDialogResult.None)\n    Print(\"File dialogs are not supported in this environment\");\nelse\n    Print(\"No file selected: {0}\", result);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Title = \"Select a CSV file\"\nopenFileDialog.Filter = \"CSV files|*.csv\"\nresult = openFileDialog.ShowDialog()\n\nif result == FileDialogResult.OK:\n    api.Print(f\"Selected file: {openFileDialog.FileName}\")\nelif result == getattr(FileDialogResult, \"None\"):\n    api.Print(\"File dialogs are not supported in this environment\")\nelse:\n    api.Print(f\"No file selected: {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FileDialogResult.None","kind":"enum value","name":"None","type":"T:cAlgo.API.FileDialogResult","namespace":"cAlgo.API","group":"Dialogs","csharp":"FileDialogResult.None;","python":"FileDialogResult.None","summary":"File dialog is not supported in running environment.","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FileDialogResult.Cancel","kind":"enum value","name":"Cancel","type":"T:cAlgo.API.FileDialogResult","namespace":"cAlgo.API","group":"Dialogs","csharp":"FileDialogResult.Cancel;","python":"FileDialogResult.Cancel","summary":"User closed the dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FileDialogResult.OK","kind":"enum value","name":"OK","type":"T:cAlgo.API.FileDialogResult","namespace":"cAlgo.API","group":"Dialogs","csharp":"FileDialogResult.OK;","python":"FileDialogResult.OK","summary":"User pressed Ok in dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FileDialogResult.Error","kind":"enum value","name":"Error","type":"T:cAlgo.API.FileDialogResult","namespace":"cAlgo.API","group":"Dialogs","csharp":"FileDialogResult.Error;","python":"FileDialogResult.Error","summary":"There was an error in file dialog operation.","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/FileDialogResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.FillRule","kind":"enum","name":"FillRule","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public enum FillRule","python":"FillRule","summary":"Specifies how the intersecting areas of PathFigure objects contained in a Geometry are combined to form the area of the Geometry.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows the use of FillRule\n    public partial class FillRuleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanelNonzero = new StackPanel()\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n            };\n\n            stackPanelNonzero.AddChild(new TextBlock { Text = \"Nonzero\", ForegroundColor = Color.Black, HorizontalAlignment = HorizontalAlignment.Center, Margin = 10 });\n\n            stackPanelNonzero.AddChild(new Polygon\n            {\n                FillColor = Color.Red,\n                Width = 200,\n                Height = 100,\n                FillRule = FillRule.Nonzero,\n                Margin = 10,\n                Points = new Point[]\n                {\n                    new Point(1, 200),\n                    new Point(50, 30),\n                    new Point(100, 1),\n                    new Point(150, 1),\n                    new Point(100, 10),\n                    new Point(50, 1),\n                    new Point(200, 70),\n                    new Point(300, 90),\n                }\n            });\n\n            stackPanelNonzero.AddChild(new TextBlock { Text = \"EvenOdd\", ForegroundColor = Color.Black, HorizontalAlignment = HorizontalAlignment.Center, Margin = 10 });\n\n            stackPanelNonzero.AddChild(new Polygon\n            {\n                FillColor = Color.Red,\n                Width = 200,\n                Height = 100,\n                FillRule = FillRule.EvenOdd,\n                Margin = 10,\n                Points = new Point[]\n                {\n                    new Point(1, 200),\n                    new Point(50, 30),\n                    new Point(100, 1),\n                    new Point(150, 1),\n                    new Point(100, 10),\n                    new Point(50, 1),\n                    new Point(200, 70),\n                    new Point(300, 90),\n                }\n            });\n\n            Chart.AddControl(stackPanelNonzero);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.6\n\n        nonZeroTextBlock = TextBlock()\n        nonZeroTextBlock.Text = \"Nonzero\"\n        nonZeroTextBlock.ForegroundColor = Color.Black\n        nonZeroTextBlock.HorizontalAlignment = HorizontalAlignment.Center\n        nonZeroTextBlock.Margin = Thickness(10)\n\n        stackPanel.AddChild(nonZeroTextBlock)\n\n        polygon = Polygon()\n        polygon.FillColor = Color.Red\n        polygon.Width = 200\n        polygon.Height = 100\n        polygon.FillRule = FillRule.Nonzero\n        polygon.Margin = Thickness(10)\n        polygon.Points = [Point(1, 200), Point(50, 30), Point(100, 1), Point(150, 1), Point(100, 10), Point(50, 1), Point(200, 70), Point(300, 90)]\n\n        stackPanel.AddChild(polygon)\n\n        evenOddTextBlock = TextBlock()\n        evenOddTextBlock.Text = \"EvenOdd\"\n        evenOddTextBlock.ForegroundColor = Color.Black\n        evenOddTextBlock.HorizontalAlignment = HorizontalAlignment.Center\n        evenOddTextBlock.Margin = Thickness(10)\n\n        stackPanel.AddChild(evenOddTextBlock)\n\n        polygon = Polygon()\n        polygon.FillColor = Color.Red\n        polygon.Width = 200\n        polygon.Height = 100\n        polygon.FillRule = FillRule.EvenOdd\n        polygon.Margin = Thickness(10)\n        polygon.Points = [Point(1, 200), Point(50, 30), Point(100, 1), Point(150, 1), Point(100, 10), Point(50, 1), Point(200, 70), Point(300, 90)]\n\n        stackPanel.AddChild(polygon)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FillRule.EvenOdd","kind":"enum value","name":"EvenOdd","type":"T:cAlgo.API.FillRule","namespace":"cAlgo.API","group":"Shapes","csharp":"FillRule.EvenOdd;","python":"FillRule.EvenOdd","summary":"Rule that determines whether a point is in the fill region by drawing a ray from that point to infinity in any direction and counting the number of path segments within the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.","remarks":null,"parameters":[],"returns":{"csharpType":"FillRule","pythonType":"FillRule","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FillRule.Nonzero","kind":"enum value","name":"Nonzero","type":"T:cAlgo.API.FillRule","namespace":"cAlgo.API","group":"Shapes","csharp":"FillRule.Nonzero;","python":"FillRule.Nonzero","summary":"Rule that determines whether a point is in the fill region of the path by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.","remarks":null,"parameters":[],"returns":{"csharpType":"FillRule","pythonType":"FillRule","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/FillRule/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.FontStyle","kind":"enum","name":"FontStyle","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public enum FontStyle","python":"FontStyle","summary":"Specifies style information applied to text.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use a chart control font properties to set font size, style, and family\n    public partial class FontSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6\n            };\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Thin Weight Size 10 FontStyle Normal Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Thin,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Thin Weight Size 10 FontStyle Italic Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Thin,\n                FontStyle = FontStyle.Italic,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Thin Weight Size 10 FontStyle Oblique Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Thin,\n                FontStyle = FontStyle.Oblique,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Black Weight Size 10 FontStyle Normal Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Black,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Bold Weight Size 10 FontStyle Normal Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Bold,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Heavy Weight Size 10 FontStyle Normal Font Default\",\n                FontSize = 10,\n                FontWeight = FontWeight.Heavy,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Bold Weight Size 12 FontStyle Normal Font Default\",\n                FontSize = 12,\n                FontWeight = FontWeight.Bold,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                Margin = 10\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = \"Thin Weight Size 12 FontStyle Normal Font Calibri Light Italic\",\n                FontSize = 12,\n                FontWeight = FontWeight.Thin,\n                FontStyle = FontStyle.Normal,\n                ForegroundColor = Color.Black,\n                FontFamily = \"Calibri Light Italic\",\n                Margin = 10\n            });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text, fontSize, fontWeight, fontStyle, fontFamily = None):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.FontSize = fontSize\n        textBlock.FontWeight = fontWeight\n        textBlock.FontStyle = fontStyle\n        textBlock.ForegroundColor = Color.Black\n        textBlock.Margin = Thickness(10)\n        if fontFamily is not None:\n            textBlock.FontFamily = fontFamily\n        return textBlock\n\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.6\n\n        stackPanel.AddChild(self.get_text_block(\"Thin Weight Size 10 FontStyle Normal Font Default\", 10, FontWeight.Thin, FontStyle.Normal))\n        stackPanel.AddChild(self.get_text_block(\"Thin Weight Size 10 FontStyle Italic Font Default\", 10, FontWeight.Thin, FontStyle.Italic))\n        stackPanel.AddChild(self.get_text_block(\"Thin Weight Size 10 FontStyle Oblique Font Default\", 10, FontWeight.Thin, FontStyle.Oblique))\n        stackPanel.AddChild(self.get_text_block(\"Black Weight Size 10 FontStyle Normal Font Default\", 10, FontWeight.Black, FontStyle.Normal))\n        stackPanel.AddChild(self.get_text_block(\"Bold Weight Size 10 FontStyle Normal Font Default\", 10, FontWeight.Bold, FontStyle.Normal))\n        stackPanel.AddChild(self.get_text_block(\"Heavy Weight Size 10 FontStyle Normal Font Default\", 10, FontWeight.Heavy, FontStyle.Normal))\n        stackPanel.AddChild(self.get_text_block(\"Bold Weight Size 12 FontStyle Normal Font Default\", 12, FontWeight.Bold, FontStyle.Normal))\n        stackPanel.AddChild(self.get_text_block(\"Thin Weight Size 12 FontStyle Normal Font Calibri Light Italic\", 12, FontWeight.Thin, FontStyle.Normal, \"Calibri Light Italic\"))\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontStyle.Normal","kind":"enum value","name":"Normal","type":"T:cAlgo.API.FontStyle","namespace":"cAlgo.API","group":"Styles","csharp":"FontStyle.Normal;","python":"FontStyle.Normal","summary":"Normal text.","remarks":null,"parameters":[],"returns":{"csharpType":"FontStyle","pythonType":"FontStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontStyle.Oblique","kind":"enum value","name":"Oblique","type":"T:cAlgo.API.FontStyle","namespace":"cAlgo.API","group":"Styles","csharp":"FontStyle.Oblique;","python":"FontStyle.Oblique","summary":"Oblique text.","remarks":null,"parameters":[],"returns":{"csharpType":"FontStyle","pythonType":"FontStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontStyle.Italic","kind":"enum value","name":"Italic","type":"T:cAlgo.API.FontStyle","namespace":"cAlgo.API","group":"Styles","csharp":"FontStyle.Italic;","python":"FontStyle.Italic","summary":"Italic text.","remarks":null,"parameters":[],"returns":{"csharpType":"FontStyle","pythonType":"FontStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.FontWeight","kind":"enum","name":"FontWeight","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public enum FontWeight","python":"FontWeight","summary":"Specifies the weight or thickness of the font.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top };\npanel.AddChild(new TextBlock { Text = \"EURUSD\", FontWeight = FontWeight.Bold });\npanel.AddChild(new TextBlock { Text = \"Bid / Ask\", FontWeight = FontWeight.Light });\nChart.AddControl(panel);","python":"panel = StackPanel()\npanel.HorizontalAlignment = HorizontalAlignment.Left\npanel.VerticalAlignment = VerticalAlignment.Top\ntitle = TextBlock()\ntitle.Text = \"EURUSD\"\ntitle.FontWeight = FontWeight.Bold\nsubtitle = TextBlock()\nsubtitle.Text = \"Bid / Ask\"\nsubtitle.FontWeight = FontWeight.Light\npanel.AddChild(title)\npanel.AddChild(subtitle)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Thin","kind":"enum value","name":"Thin","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Thin;","python":"FontWeight.Thin","summary":"The thin font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.ExtraLight","kind":"enum value","name":"ExtraLight","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.ExtraLight;","python":"FontWeight.ExtraLight","summary":"The extra light font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.UltraLight","kind":"enum value","name":"UltraLight","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.UltraLight;","python":"FontWeight.UltraLight","summary":"The ultra light font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Light","kind":"enum value","name":"Light","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Light;","python":"FontWeight.Light","summary":"The light font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Normal","kind":"enum value","name":"Normal","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Normal;","python":"FontWeight.Normal","summary":"The normal font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Regular","kind":"enum value","name":"Regular","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Regular;","python":"FontWeight.Regular","summary":"The regular font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Medium","kind":"enum value","name":"Medium","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Medium;","python":"FontWeight.Medium","summary":"The medium font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.DemiBold","kind":"enum value","name":"DemiBold","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.DemiBold;","python":"FontWeight.DemiBold","summary":"The demibold font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.SemiBold","kind":"enum value","name":"SemiBold","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.SemiBold;","python":"FontWeight.SemiBold","summary":"The semibold font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Bold","kind":"enum value","name":"Bold","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Bold;","python":"FontWeight.Bold","summary":"The bold font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.ExtraBold","kind":"enum value","name":"ExtraBold","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.ExtraBold;","python":"FontWeight.ExtraBold","summary":"The extra bold font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.UltraBold","kind":"enum value","name":"UltraBold","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.UltraBold;","python":"FontWeight.UltraBold","summary":"The ultra bold font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Black","kind":"enum value","name":"Black","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Black;","python":"FontWeight.Black","summary":"The black font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.Heavy","kind":"enum value","name":"Heavy","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.Heavy;","python":"FontWeight.Heavy","summary":"The Heavy font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.ExtraBlack","kind":"enum value","name":"ExtraBlack","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.ExtraBlack;","python":"FontWeight.ExtraBlack","summary":"The Extra black font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.FontWeight.UltraBlack","kind":"enum value","name":"UltraBlack","type":"T:cAlgo.API.FontWeight","namespace":"cAlgo.API","group":"Styles","csharp":"FontWeight.UltraBlack;","python":"FontWeight.UltraBlack","summary":"The ultra black font.","remarks":null,"parameters":[],"returns":{"csharpType":"FontWeight","pythonType":"FontWeight","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/FontWeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.FractalAdaptiveMovingAverage","kind":"interface","name":"FractalAdaptiveMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface FractalAdaptiveMovingAverage","python":"FractalAdaptiveMovingAverage","summary":"The FRAMA (Fractal Adaptive Moving Average) indicator is a type of moving average that adjusts its sensitivity to price movements based on market volatility","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private FractalAdaptiveMovingAverage _frama;\n\nprotected override void OnStart()\n{\n    _frama = Indicators.FractalAdaptiveMovingAverage(16);\n}\n\nprotected override void OnBar()\n{\n    if (Bars.ClosePrices.Last(1) > _frama.Result.Last(1))\n        Print(\"Close is above FRAMA: {0}\", _frama.Result.Last(1));\n}","python":"def on_start(self):\n    self.frama = api.Indicators.FractalAdaptiveMovingAverage(16)\n\ndef on_bar(self):\n    if api.Bars.ClosePrices.Last(1) > self.frama.Result.Last(1):\n        api.Print(f\"Close is above FRAMA: {self.frama.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.FractalChaosBands","kind":"interface","name":"FractalChaosBands","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface FractalChaosBands","python":"FractalChaosBands","summary":"The Fractal Chaos Bands indicator attempts to determine whether or not the market is trending.","remarks":"When the market is trending, the bands will have a slope, and if the market is not trending or choppy, the bands will flatten out. The flatter the bands, the stronger the signal that the market is choppy. The more steep the band slopes, the stronger the signal that the market trending or stable.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private FractalChaosBands _fractalChaosBands;\n\nprotected override void Initialize()\n{\n    _fractalChaosBands = Indicators.FractalChaosBands();\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.fractalChaosBands = api.Indicators.FractalChaosBands()"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Fractal Chaos Bands indicator\n    public partial class FractalChaosBandsSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private FractalChaosBands _fractalChaosBands;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fractalChaosBands = Indicators.FractalChaosBands();\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _fractalChaosBands.High.Last(1) && Bars.ClosePrices.Last(2) <= _fractalChaosBands.High.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _fractalChaosBands.Low.Last(1) && Bars.ClosePrices.Last(2) >= _fractalChaosBands.Low.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass FractalChaosBandsSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fractalChaosBands  = api.Indicators.FractalChaosBands()\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.fractalChaosBands.High.Last(0) and api.Bars.ClosePrices.Last(1) <= self.fractalChaosBands.High.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.fractalChaosBands.Low.Last(0) and api.Bars.ClosePrices.Last(1) >= self.fractalChaosBands.Low.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.FractalChaosBands.High","kind":"property","name":"High","type":"T:cAlgo.API.Indicators.FractalChaosBands","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries High {get;}","python":"fractalChaosBands.High: IndicatorDataSeries","summary":"The high limit of the chaos band.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractalChaosBands = Indicators.FractalChaosBands();\nif (Bars.ClosePrices.Last(1) > fractalChaosBands.High.Last(1))\n    Print(\"Close is above the Fractal Chaos Bands High: {0}\", fractalChaosBands.High.Last(1));","python":"fractalChaosBands = api.Indicators.FractalChaosBands()\nif api.Bars.ClosePrices.Last(1) > fractalChaosBands.High.Last(1):\n    api.Print(f\"Close is above the Fractal Chaos Bands High: {fractalChaosBands.High.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/High/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/High/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.FractalChaosBands.Low","kind":"property","name":"Low","type":"T:cAlgo.API.Indicators.FractalChaosBands","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Low {get;}","python":"fractalChaosBands.Low: IndicatorDataSeries","summary":"The low limit of the chaos band.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractalChaosBands = Indicators.FractalChaosBands();\nif (Bars.ClosePrices.Last(1) < fractalChaosBands.Low.Last(1))\n    Print(\"Close is below the Fractal Chaos Bands Low: {0}\", fractalChaosBands.Low.Last(1));","python":"fractalChaosBands = api.Indicators.FractalChaosBands()\nif api.Bars.ClosePrices.Last(1) < fractalChaosBands.Low.Last(1):\n    api.Print(f\"Close is below the Fractal Chaos Bands Low: {fractalChaosBands.Low.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/Low/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/FractalChaosBands/Low/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.Fractals","kind":"interface","name":"Fractals","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Fractals","python":"Fractals","summary":"The fractal indicator is a trading indicator used in technical analysis that is used to identify potential trend reversal points in a market.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractals = Indicators.Fractals(5);\nPrint(\"Up fractal: {0}, Down fractal: {1}\", fractals.UpFractal.Last(3), fractals.DownFractal.Last(3));","python":"fractals = api.Indicators.Fractals(5)\napi.Print(f\"Up fractal: {fractals.UpFractal.Last(3)}, Down fractal: {fractals.DownFractal.Last(3)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Fractals indicator\n    public partial class FractalsSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private Fractals _fractals;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fractals = Indicators.Fractals(5);\n        }\n\n        protected override void OnBar()\n        {\n            if (!double.IsNaN(_fractals.DownFractal.Last(1)))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (!double.IsNaN(_fractals.UpFractal.Last(1)))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\nimport math\n\nclass FractalsSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fractals = api.Indicators.Fractals(5)\n\n    def on_bar(self):\n        if not math.isnan(self.fractals.DownFractal.Last(1)):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif not math.isnan(self.fractals.UpFractal.Last(1)):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Fractals.DownFractal","kind":"property","name":"DownFractal","type":"T:cAlgo.API.Indicators.Fractals","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DownFractal {get; set;}","python":"fractals.DownFractal: IndicatorDataSeries","summary":"The down fractals plot/output","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractals = Indicators.Fractals(5);\nfor (var barsAgo = 1; barsAgo <= 20; barsAgo++)\n{\n    if (!double.IsNaN(fractals.DownFractal.Last(barsAgo)))\n    {\n        Print(\"Latest down fractal {0} bars ago at {1}\", barsAgo, fractals.DownFractal.Last(barsAgo));\n        break;\n    }\n}","python":"import math\n\nfractals = api.Indicators.Fractals(5)\nfor barsAgo in range(1, 21):\n    if not math.isnan(fractals.DownFractal.Last(barsAgo)):\n        api.Print(f\"Latest down fractal {barsAgo} bars ago at {fractals.DownFractal.Last(barsAgo)}\")\n        break"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/DownFractal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/DownFractal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Fractals.UpFractal","kind":"property","name":"UpFractal","type":"T:cAlgo.API.Indicators.Fractals","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries UpFractal {get; set;}","python":"fractals.UpFractal: IndicatorDataSeries","summary":"The up fractals plot/output","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractals = Indicators.Fractals(5);\nfor (var barsAgo = 1; barsAgo <= 20; barsAgo++)\n{\n    if (!double.IsNaN(fractals.UpFractal.Last(barsAgo)))\n    {\n        Print(\"Latest up fractal {0} bars ago at {1}\", barsAgo, fractals.UpFractal.Last(barsAgo));\n        break;\n    }\n}","python":"import math\n\nfractals = api.Indicators.Fractals(5)\nfor barsAgo in range(1, 21):\n    if not math.isnan(fractals.UpFractal.Last(barsAgo)):\n        api.Print(f\"Latest up fractal {barsAgo} bars ago at {fractals.UpFractal.Last(barsAgo)}\")\n        break"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/UpFractal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Fractals/UpFractal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Frame","kind":"interface","name":"Frame","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface Frame","python":"Frame","summary":"Base interface for chart frames.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var frame in ChartManager)\n{\n    if (frame is ChartFrame chartFrame)\n        Print(\"Chart frame {0}: {1} {2}\", frame.Id, chartFrame.Symbol.Name, chartFrame.TimeFrame);\n    else if (frame is CustomFrame)\n        Print(\"Custom frame {0}, size {1}x{2}\", frame.Id, frame.Width, frame.Height);\n}","python":"for frame in api.ChartManager:\n    if isinstance(frame.__implementation__, ChartFrame):\n        chartFrame = ChartFrame(frame)\n        api.Print(f\"Chart frame {frame.Id}: {chartFrame.Symbol.Name} {chartFrame.TimeFrame}\")\n    elif isinstance(frame.__implementation__, CustomFrame):\n        api.Print(f\"Custom frame {frame.Id}, size {frame.Width}x{frame.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Frame.Activate","kind":"method","name":"Activate","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"void Activate()","python":"frame.Activate() -> None","summary":"Brings the chart frame to the front.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour);\nchartFrame.Activate();","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\napi.ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour)\nchartFrame.Activate()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Activate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Activate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Frame.Attach","kind":"method","name":"Attach","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"bool Attach()","python":"frame.Attach() -> bool","summary":"Attaches frame to main chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Detach();\nPrint(\"Attached back to main container: {0}\", chartFrame.Attach());","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Detach()\napi.Print(f\"Attached back to main container: {chartFrame.Attach()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attach/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attach/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Frame.Attach(cAlgo.API.ChartContainer)","kind":"method","name":"Attach","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"bool Attach(ChartContainer targetContainer)","python":"frame.Attach(targetContainer: ChartContainer) -> bool","summary":"Attaches frame to passed chart container.","remarks":null,"parameters":[{"name":"targetContainer","csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"Target chart container"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var firstFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nfirstFrame.Detach();\nvar secondFrame = ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour);\nPrint(\"Moved to detached container: {0}\", secondFrame.Attach(firstFrame.ChartContainer));","python":"firstFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nfirstFrame.Detach()\nsecondFrame = api.ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour)\napi.Print(f\"Moved to detached container: {secondFrame.Attach(firstFrame.ChartContainer)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attach/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attach/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Frame.Detach","kind":"method","name":"Detach","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"bool Detach()","python":"frame.Detach() -> bool","summary":"Detaches frame from it is chart container.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if successful otherwise false","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nPrint(\"Detached: {0}, is attached now: {1}\", chartFrame.Detach(), chartFrame.IsAttached);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\napi.Print(f\"Detached: {chartFrame.Detach()}, is attached now: {chartFrame.IsAttached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Detach/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Detach/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.ChartContainer","kind":"property","name":"ChartContainer","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"ChartContainer ChartContainer {get;}","python":"frame.ChartContainer: ChartContainer","summary":"Returns frame container.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartContainer","pythonType":"ChartContainer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nPrint(\"Frame container: {0}, frames in it: {1}\", chartFrame.ChartContainer.Id, chartFrame.ChartContainer.Count);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\napi.Print(f\"Frame container: {chartFrame.ChartContainer.Id}, frames in it: {chartFrame.ChartContainer.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/ChartContainer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/ChartContainer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.Height","kind":"property","name":"Height","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"double Height {get;}","python":"frame.Height: float","summary":"Returns current height of frame.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"My Frame\");\nPrint(\"Frame height: {0}\", customFrame.Height);","python":"customFrame = api.ChartManager.AddCustomFrame(\"My Frame\")\napi.Print(f\"Frame height: {customFrame.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"string Id {get;}","python":"frame.Id: str","summary":"Returns frame Id.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"My Frame\");\nPrint(\"Frame ID: {0}\", customFrame.Id);","python":"customFrame = api.ChartManager.AddCustomFrame(\"My Frame\")\napi.Print(f\"Frame ID: {customFrame.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.Index","kind":"property","name":"Index","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"int Index {get; set;}","python":"frame.Index: int","summary":"Get / set frame index in container.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nchartFrame.Index = 0;\nPrint(\"Frame index: {0}\", chartFrame.Index);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nchartFrame.Index = 0\napi.Print(f\"Frame index: {chartFrame.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.IsAttached","kind":"property","name":"IsAttached","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"bool IsAttached {get;}","python":"frame.IsAttached: bool","summary":"Returns true if frame is attached otherwise false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nif (chartFrame.IsAttached)\n    chartFrame.Detach();","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\nif chartFrame.IsAttached:\n    chartFrame.Detach()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/IsAttached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/IsAttached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.Frame.Width","kind":"property","name":"Width","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"double Width {get;}","python":"frame.Width: float","summary":"Returns current width of frame.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var customFrame = ChartManager.AddCustomFrame(\"My Frame\");\nPrint(\"Frame width: {0}\", customFrame.Width);","python":"customFrame = api.ChartManager.AddCustomFrame(\"My Frame\")\napi.Print(f\"Frame width: {customFrame.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Frame.Attached","kind":"event","name":"Attached","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FrameAttachedEventArgs> Attached;","python":"frame.Attached += handler  # handler(obj: FrameAttachedEventArgs)","summary":"Occurs when frame is attached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FrameAttachedEventArgs>","pythonType":"Callable[[FrameAttachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.Attached += OnFrameAttached;\n}\n\nprivate void OnFrameAttached(FrameAttachedEventArgs args)\n{\n    Print(\"Frame {0} attached to container {1}\", args.Frame.Id, args.Frame.ChartContainer.Id);\n}","python":"def on_start(self):\n    chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chartFrame.Attached += self.on_frame_attached\n\ndef on_frame_attached(self, args):\n    api.Print(f\"Frame {args.Frame.Id} attached to container {args.Frame.ChartContainer.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Attached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Frame.ContainerChanged","kind":"event","name":"ContainerChanged","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FrameContainerChangedEventArgs> ContainerChanged;","python":"frame.ContainerChanged += handler  # handler(obj: FrameContainerChangedEventArgs)","summary":"Occurs when frame container is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FrameContainerChangedEventArgs>","pythonType":"Callable[[FrameContainerChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.ContainerChanged += OnFrameContainerChanged;\n}\n\nprivate void OnFrameContainerChanged(FrameContainerChangedEventArgs args)\n{\n    Print(\"Frame {0} moved to container {1}\", args.Frame.Id, args.Frame.ChartContainer.Id);\n}","python":"def on_start(self):\n    chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chartFrame.ContainerChanged += self.on_frame_container_changed\n\ndef on_frame_container_changed(self, args):\n    api.Print(f\"Frame {args.Frame.Id} moved to container {args.Frame.ChartContainer.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/ContainerChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/ContainerChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Frame.Detached","kind":"event","name":"Detached","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FrameDetachedEventArgs> Detached;","python":"frame.Detached += handler  # handler(obj: FrameDetachedEventArgs)","summary":"Occurs when frame is detached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FrameDetachedEventArgs>","pythonType":"Callable[[FrameDetachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    chartFrame.Detached += OnFrameDetached;\n}\n\nprivate void OnFrameDetached(FrameDetachedEventArgs args)\n{\n    Print(\"Frame {0} detached\", args.Frame.Id);\n}","python":"def on_start(self):\n    chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    chartFrame.Detached += self.on_frame_detached\n\ndef on_frame_detached(self, args):\n    api.Print(f\"Frame {args.Frame.Id} detached\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Detached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/Detached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Frame.SizeChanged","kind":"event","name":"SizeChanged","type":"T:cAlgo.API.Frame","namespace":"cAlgo.API","group":"Chart","csharp":"event Action<FrameSizeChangedEventArgs> SizeChanged;","python":"frame.SizeChanged += handler  # handler(obj: FrameSizeChangedEventArgs)","summary":"Occurs when frame size changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<FrameSizeChangedEventArgs>","pythonType":"Callable[[FrameSizeChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var customFrame = ChartManager.AddCustomFrame(\"My Frame\");\n    customFrame.SizeChanged += OnFrameSizeChanged;\n}\n\nprivate void OnFrameSizeChanged(FrameSizeChangedEventArgs args)\n{\n    Print(\"Frame {0} size: {1}x{2}\", args.Frame.Id, args.Frame.Width, args.Frame.Height);\n}","python":"def on_start(self):\n    customFrame = api.ChartManager.AddCustomFrame(\"My Frame\")\n    customFrame.SizeChanged += self.on_frame_size_changed\n\ndef on_frame_size_changed(self, args):\n    api.Print(f\"Frame {args.Frame.Id} size: {args.Frame.Width}x{args.Frame.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/SizeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/Frame/SizeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FrameAttachedEventArgs","kind":"class","name":"FrameAttachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FrameAttachedEventArgs","python":"FrameAttachedEventArgs","summary":"Provides data for the frame attached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.Attached += OnFrameAttached;\n}\n\nprivate void OnFrameAttached(FrameAttachedEventArgs args)\n{\n    Print(\"Frame {0} attached to container {1}\", args.Frame.Id, args.Frame.ChartContainer?.Id);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.Attached += self.on_frame_attached\n\ndef on_frame_attached(self, args):\n    api.Print(f\"Frame {args.Frame.Id} attached, is attached: {args.Frame.IsAttached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FrameAttachedEventArgs.Frame","kind":"property","name":"Frame","type":"T:cAlgo.API.FrameAttachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame Frame {get;}","python":"frameAttachedEventArgs.Frame: Frame","summary":"Returns the frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.Attached += OnFrameAttached;\n}\n\nprivate void OnFrameAttached(FrameAttachedEventArgs args)\n{\n    Print(\"Frame {0} attached: {1}, index: {2}\", args.Frame.Id, args.Frame.IsAttached, args.Frame.Index);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.Attached += self.on_frame_attached\n\ndef on_frame_attached(self, args):\n    api.Print(f\"Frame {args.Frame.Id} attached: {args.Frame.IsAttached}, index: {args.Frame.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/Frame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameAttachedEventArgs/Frame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FrameContainerChangedEventArgs","kind":"class","name":"FrameContainerChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FrameContainerChangedEventArgs","python":"FrameContainerChangedEventArgs","summary":"Provides data for the frame container changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.ContainerChanged += OnFrameContainerChanged;\n}\n\nprivate void OnFrameContainerChanged(FrameContainerChangedEventArgs args)\n{\n    Print(\"Frame {0} moved to container {1}\", args.Frame.Id, args.Frame.ChartContainer?.Id);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.ContainerChanged += self.on_frame_container_changed\n\ndef on_frame_container_changed(self, args):\n    container = args.Frame.ChartContainer\n    container_id = container.Id if container is not None else \"none\"\n    api.Print(f\"Frame {args.Frame.Id} moved to container {container_id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameContainerChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameContainerChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FrameContainerChangedEventArgs.Frame","kind":"property","name":"Frame","type":"T:cAlgo.API.FrameContainerChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame Frame {get;}","python":"frameContainerChangedEventArgs.Frame: Frame","summary":"Returns the frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.ContainerChanged += OnFrameContainerChanged;\n}\n\nprivate void OnFrameContainerChanged(FrameContainerChangedEventArgs args)\n{\n    var container = args.Frame.ChartContainer;\n    if (container != null)\n        Print(\"Container {0} now has {1} frames, mode: {2}\", container.Id, container.Count, container.Mode);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.ContainerChanged += self.on_frame_container_changed\n\ndef on_frame_container_changed(self, args):\n    container = args.Frame.ChartContainer\n    if container is not None:\n        api.Print(f\"Container {container.Id} now has {container.Count} frames, mode: {container.Mode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameContainerChangedEventArgs/Frame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameContainerChangedEventArgs/Frame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FrameDetachedEventArgs","kind":"class","name":"FrameDetachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FrameDetachedEventArgs","python":"FrameDetachedEventArgs","summary":"Provides data for the frame detached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.Detached += OnFrameDetached;\n}\n\nprivate void OnFrameDetached(FrameDetachedEventArgs args)\n{\n    Print(\"Frame {0} detached into its own window\", args.Frame.Id);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.Detached += self.on_frame_detached\n\ndef on_frame_detached(self, args):\n    api.Print(f\"Frame {args.Frame.Id} detached into its own window\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FrameDetachedEventArgs.Frame","kind":"property","name":"Frame","type":"T:cAlgo.API.FrameDetachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame Frame {get;}","python":"frameDetachedEventArgs.Frame: Frame","summary":"Returns the frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.Detached += OnFrameDetached;\n}\n\nprivate void OnFrameDetached(FrameDetachedEventArgs args)\n{\n    if (!args.Frame.IsAttached)\n        args.Frame.Attach();\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.Detached += self.on_frame_detached\n\ndef on_frame_detached(self, args):\n    if not args.Frame.IsAttached:\n        args.Frame.Attach()"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/Frame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/Frame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FrameSizeChangedEventArgs","kind":"class","name":"FrameSizeChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FrameSizeChangedEventArgs","python":"FrameSizeChangedEventArgs","summary":"Provides data for the frame size changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.SizeChanged += OnFrameSizeChanged;\n}\n\nprivate void OnFrameSizeChanged(FrameSizeChangedEventArgs args)\n{\n    Print(\"Frame {0} resized to {1} x {2}\", args.Frame.Id, args.Frame.Width, args.Frame.Height);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.SizeChanged += self.on_frame_size_changed\n\ndef on_frame_size_changed(self, args):\n    api.Print(f\"Frame {args.Frame.Id} resized to {args.Frame.Width} x {args.Frame.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameSizeChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameSizeChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FrameSizeChangedEventArgs.Frame","kind":"property","name":"Frame","type":"T:cAlgo.API.FrameSizeChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame Frame {get;}","python":"frameSizeChangedEventArgs.Frame: Frame","summary":"Returns the frame.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame","pythonType":"Frame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var frame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\n    frame.SizeChanged += OnFrameSizeChanged;\n}\n\nprivate void OnFrameSizeChanged(FrameSizeChangedEventArgs args)\n{\n    if (args.Frame.Width < 400)\n        Print(\"Frame {0} is too narrow: {1}\", args.Frame.Id, args.Frame.Width);\n}","python":"def on_start(self):\n    frame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\n    frame.SizeChanged += self.on_frame_size_changed\n\ndef on_frame_size_changed(self, args):\n    if args.Frame.Width < 400:\n        api.Print(f\"Frame {args.Frame.Id} is too narrow: {args.Frame.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameSizeChangedEventArgs/Frame/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameSizeChangedEventArgs/Frame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FramesAddedEventArgs","kind":"class","name":"FramesAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FramesAddedEventArgs","python":"FramesAddedEventArgs","summary":"Provides data for the frames added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesAdded += OnFramesAdded;\n}\n\nprivate void OnFramesAdded(FramesAddedEventArgs args)\n{\n    Print(\"{0} frame(s) added, total frames: {1}\", args.AddedFrames.Length, ChartManager.Count);\n}","python":"def on_start(self):\n    api.ChartManager.FramesAdded += self.on_frames_added\n\ndef on_frames_added(self, args):\n    api.Print(f\"{len(args.AddedFrames)} frame(s) added, total frames: {api.ChartManager.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FramesAddedEventArgs.AddedFrames","kind":"property","name":"AddedFrames","type":"T:cAlgo.API.FramesAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame[] AddedFrames {get;}","python":"framesAddedEventArgs.AddedFrames: list[Frame]","summary":"Returns the added frames.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame[]","pythonType":"list[Frame]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesAdded += OnFramesAdded;\n}\n\nprivate void OnFramesAdded(FramesAddedEventArgs args)\n{\n    foreach (var frame in args.AddedFrames)\n        Print(\"Frame added: {0}, index: {1}\", frame.Id, frame.Index);\n}","python":"def on_start(self):\n    api.ChartManager.FramesAdded += self.on_frames_added\n\ndef on_frames_added(self, args):\n    for frame in args.AddedFrames:\n        api.Print(f\"Frame added: {frame.Id}, index: {frame.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesAddedEventArgs/AddedFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesAddedEventArgs/AddedFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.FramesRemovedEventArgs","kind":"class","name":"FramesRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class FramesRemovedEventArgs","python":"FramesRemovedEventArgs","summary":"Provides data for the frames removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesRemoved += OnFramesRemoved;\n}\n\nprivate void OnFramesRemoved(FramesRemovedEventArgs args)\n{\n    Print(\"{0} frame(s) removed, remaining frames: {1}\", args.RemovedFrames.Length, ChartManager.Count);\n}","python":"def on_start(self):\n    api.ChartManager.FramesRemoved += self.on_frames_removed\n\ndef on_frames_removed(self, args):\n    api.Print(f\"{len(args.RemovedFrames)} frame(s) removed, remaining frames: {api.ChartManager.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.FramesRemovedEventArgs.RemovedFrames","kind":"property","name":"RemovedFrames","type":"T:cAlgo.API.FramesRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Frame[] RemovedFrames {get;}","python":"framesRemovedEventArgs.RemovedFrames: list[Frame]","summary":"Returns the removed frames.","remarks":null,"parameters":[],"returns":{"csharpType":"Frame[]","pythonType":"list[Frame]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ChartManager.FramesRemoved += OnFramesRemoved;\n}\n\nprivate void OnFramesRemoved(FramesRemovedEventArgs args)\n{\n    foreach (var frame in args.RemovedFrames)\n        Print(\"Frame removed: {0}\", frame.Id);\n}","python":"def on_start(self):\n    api.ChartManager.FramesRemoved += self.on_frames_removed\n\ndef on_frames_removed(self, args):\n    for frame in args.RemovedFrames:\n        api.Print(f\"Frame removed: {frame.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesRemovedEventArgs/RemovedFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/FramesRemovedEventArgs/RemovedFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Functions","kind":"class","name":"Functions","type":null,"namespace":"cAlgo.API","group":"Data Series","csharp":"public static class Functions","python":"Functions","summary":"This class contains valuable functions that apply to DataSeries.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the data series functions\n    public partial class DataSeriesFunctionsSample : Indicator\n    {\n        private SimpleMovingAverage _smaFast, _smaSlow;\n\n        protected override void Initialize()\n        {\n            _smaFast = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\n            _smaSlow = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        public override void Calculate(int index)\n        {\n            if (!IsLastBar)\n                return;\n\n            if (_smaFast.Result.HasCrossedAbove(_smaSlow.Result, 1))\n                Print(\"Fast MA crossed above slow MA\");\n\n            if (_smaFast.Result.HasCrossedBelow(_smaSlow.Result, 1))\n                Print(\"Fast MA crossed below slow MA\");\n\n            if (_smaFast.Result.Maximum(10) > _smaSlow.Result.Maximum(10))\n                Print(\"Fast MA last 10 values maximum is larger than slow MA last 10 values\");\n\n            if (_smaFast.Result.Minimum(10) < _smaSlow.Result.Minimum(10))\n                Print(\"Fast MA last 10 values minimum is smaller than slow MA last 10 values\");\n\n            // IsFalling and IsRising compare the last two values of the data series\n            if (_smaFast.Result.IsFalling() && _smaSlow.Result.IsRising())\n                Print(\"Fast MA is falling and slow MA is rising\");\n\n            if (_smaFast.Result.Sum(10) > _smaSlow.Result.Sum(10))\n                Print(\"Fast MA last 10 values sum is larger than slow MA last 10 values sum\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass DataSeriesFunctionsSample():\n    def initialize(self):\n        self.fastSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\n        self.slowSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\n    def calculate(self, index):\n        if not api.IsLastBar:\n            return\n\n        if Functions.HasCrossedAbove(self.fastSma.Result, self.slowSma.Result, 1):\n            api.Print(\"Fast MA crossed above slow MA\")\n\n        if Functions.HasCrossedBelow(self.fastSma.Result, self.slowSma.Result, 1):\n            api.Print(\"Fast MA crossed below slow MA\")\n\n        if Functions.Maximum(self.fastSma.Result, 10) > Functions.Maximum(self.slowSma.Result, 10):\n            api.Print(\"Fast MA last 10 values maximum is larger than slow MA last 10 values\")\n\n        if Functions.Minimum(self.fastSma.Result, 10) < Functions.Minimum(self.slowSma.Result, 10):\n            api.Print(\"Fast MA last 10 values minimum is smaller than slow MA last 10 values\")\n\n        # IsFalling and IsRising compare the last two values of the data series\n        if Functions.IsFalling(self.fastSma.Result) and Functions.IsRising(self.slowSma.Result):\n            api.Print(\"Fast MA is falling and slow MA is rising\")\n\n        if Functions.Sum(self.fastSma.Result, 10) > Functions.Sum(self.slowSma.Result, 10):\n            api.Print(\"Fast MA last 10 values sum is larger than slow MA last 10 values sum\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.HasCrossedAbove(cAlgo.API.DataSeries,cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"HasCrossedAbove","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool HasCrossedAbove(DataSeries crossingSeries, DataSeries crossedSeries, int period)","python":"Functions.HasCrossedAbove(crossingSeries: DataSeries, crossedSeries: DataSeries, period: int) -> bool","summary":"Returns true, if crossingSeries has crossed above crossedSeries, over the specified Period.","remarks":"HasCrossedAbove will compare the crossing data series to the crossed data series starting from the current value of the series going back the specified period. If period is zero only the current bar values will be compared. If period is one the current bar values will be compared as well as the previous. e.g. Functions.HasCrossedAbove(sma.Result, Bars.ClosePrices, 0) will only compare the current values which are not completed until the close of the bar. It is not uncommon that the function will return true and by the end of the bar the two series will uncross.","parameters":[{"name":"crossingSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossing data series"},{"name":"crossedSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossed data series"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Period for which to check for crossing"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fastSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\nvar slowSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 21);\nif (fastSma.Result.HasCrossedAbove(slowSma.Result, 0))\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"SmaCross\");","python":"fastSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\nslowSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 21)\nif Functions.HasCrossedAbove(fastSma.Result, slowSma.Result, 0):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"SmaCross\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedAbove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedAbove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.HasCrossedAbove(cAlgo.API.DataSeries,System.Double,System.Int32)","kind":"method","name":"HasCrossedAbove","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool HasCrossedAbove(DataSeries crossingSeries, double value, int period)","python":"Functions.HasCrossedAbove(crossingSeries: DataSeries, value: float, period: int) -> bool","summary":"Checks if crossingSeries has crossed above value, sometime within the specified period.","remarks":"HasCrossedAbove will compare the crossing data series to the crossed data series starting from the current value of the series going back the specified period. If period is zero only the current bar values will be compared. If period is one the current bar values will be compared as well as the previous. e.g. Functions.HasCrossedAbove(sma.Result, value, 0) will only compare the current simple moving average series value which is not completed until the close of the bar. It is not uncommon that the function will return true and by the end of the bar the series will uncross.","parameters":[{"name":"crossingSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossing data series"},{"name":"value","csharpType":"double","pythonType":"float","summary":"Price value to check if crossed"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Period for which to check for crossing"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"true, if crossingSeries has crossed above value","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\nif (rsi.Result.HasCrossedAbove(30.0, 1))\n    Print(\"RSI crossed above 30, value: {0}\", rsi.Result.LastValue);","python":"rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\nif Functions.HasCrossedAbove(rsi.Result, 30.0, 1):\n    api.Print(f\"RSI crossed above 30, value: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedAbove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedAbove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.HasCrossedBelow(cAlgo.API.DataSeries,cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"HasCrossedBelow","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool HasCrossedBelow(DataSeries crossingSeries, DataSeries crossedSeries, int period)","python":"Functions.HasCrossedBelow(crossingSeries: DataSeries, crossedSeries: DataSeries, period: int) -> bool","summary":"Returns true, if crossingSeries has crossed below crossedSeries, over the specified Period.","remarks":"HasCrossedBelow will compare the crossing data series to the crossed data series starting from the current value of the series going back the specified period. If period is zero only the current bar values will be compared. If period is one the current bar values will be compared as well as the previous. e.g. Functions.HasCrossedBelow(sma.Result, Bars.ClosePrices, 0) will only compare the current values which are not completed until the close of the bar. It is not uncommon that the function will return true and by the end of the bar the two series will uncross.","parameters":[{"name":"crossingSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossing data series"},{"name":"crossedSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossed data series"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Period for which to check for crossing"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fastSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\nvar slowSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 21);\nif (fastSma.Result.HasCrossedBelow(slowSma.Result, 0))\n    ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"SmaCross\");","python":"fastSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\nslowSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 21)\nif Functions.HasCrossedBelow(fastSma.Result, slowSma.Result, 0):\n    api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"SmaCross\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedBelow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedBelow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.HasCrossedBelow(cAlgo.API.DataSeries,System.Double,System.Int32)","kind":"method","name":"HasCrossedBelow","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool HasCrossedBelow(DataSeries crossingSeries, double value, int period)","python":"Functions.HasCrossedBelow(crossingSeries: DataSeries, value: float, period: int) -> bool","summary":"Checks if crossingSeries has crossed below the value, sometime within the specified period.","remarks":"HasCrossedBelow compares the crossing data series to the value starting from the current value of the series going back the specified period. If period is zero, only the current bar value will be examined. If period is one, the current and previous bar value will be examined. e.g. Functions.HasCrossedAbove(sma.Result, value, 0) will only compare the current simple moving average series value which is not completed until the close of the bar. It is not uncommon that the function will return true and by the end of the bar the series will uncross.","parameters":[{"name":"crossingSeries","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Crossing data series"},{"name":"value","csharpType":"double","pythonType":"float","summary":"Price value to check if crossed"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Period for which to check for crossing"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if crossingSeries has crossed below value, false otherwise","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\nif (rsi.Result.HasCrossedBelow(70.0, 1))\n    Print(\"RSI crossed below 70, value: {0}\", rsi.Result.LastValue);","python":"rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\nif Functions.HasCrossedBelow(rsi.Result, 70.0, 1):\n    api.Print(f\"RSI crossed below 70, value: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedBelow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/HasCrossedBelow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.IsFalling(cAlgo.API.DataSeries)","kind":"method","name":"IsFalling","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool IsFalling(DataSeries series)","python":"Functions.IsFalling(series: DataSeries) -> bool","summary":"Checks if the last value in a data series is less than the previous","remarks":null,"parameters":[{"name":"series","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Input data series"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if the last value in a data series is less than the previous, false otherwise","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\nif (sma.Result.IsFalling())\n    Print(\"SMA is falling, last value: {0}\", sma.Result.LastValue);","python":"sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\nif Functions.IsFalling(sma.Result):\n    api.Print(f\"SMA is falling, last value: {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/IsFalling/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/IsFalling/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.IsRising(cAlgo.API.DataSeries)","kind":"method","name":"IsRising","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static bool IsRising(DataSeries series)","python":"Functions.IsRising(series: DataSeries) -> bool","summary":"Checks if the last value in a data series is greater than the previous.","remarks":null,"parameters":[{"name":"series","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Input data series"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if the last value of a data series is greater than the previous, false otherwise","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\nif (sma.Result.IsRising())\n    Print(\"SMA is rising, last value: {0}\", sma.Result.LastValue);","python":"sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\nif Functions.IsRising(sma.Result):\n    api.Print(f\"SMA is rising, last value: {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/IsRising/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/IsRising/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.Maximum(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"Maximum","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static double Maximum(DataSeries series, int period)","python":"Functions.Maximum(series: DataSeries, period: int) -> float","summary":"Finds the maximum value in a data series for a given period.","remarks":null,"parameters":[{"name":"series","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Input data series"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Input period"}],"returns":{"csharpType":"double","pythonType":"float","summary":"The maximum value in the data series in this period","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var highestHigh = Bars.HighPrices.Maximum(20);\nPrint(\"Highest high of the last 20 bars: {0}\", highestHigh);","python":"highestHigh = Functions.Maximum(api.Bars.HighPrices, 20)\napi.Print(f\"Highest high of the last 20 bars: {highestHigh}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Maximum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Maximum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.Minimum(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"Minimum","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static double Minimum(DataSeries series, int period)","python":"Functions.Minimum(series: DataSeries, period: int) -> float","summary":"Finds the minimum of a data series for a given period.","remarks":null,"parameters":[{"name":"series","csharpType":"DataSeries","pythonType":"DataSeries","summary":"Input data series"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Input period"}],"returns":{"csharpType":"double","pythonType":"float","summary":"The minimum value in the data series in this period","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lowestLow = Bars.LowPrices.Minimum(20);\nPrint(\"Lowest low of the last 20 bars: {0}\", lowestLow);","python":"lowestLow = Functions.Minimum(api.Bars.LowPrices, 20)\napi.Print(f\"Lowest low of the last 20 bars: {lowestLow}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Minimum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Minimum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Functions.Sum(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"Sum","type":"T:cAlgo.API.Functions","namespace":"cAlgo.API","group":"Data Series","csharp":"public static double Sum(DataSeries series, int period)","python":"Functions.Sum(series: DataSeries, period: int) -> float","summary":"Calculates the sum of a data series, over the specified period.","remarks":null,"parameters":[{"name":"series","csharpType":"DataSeries","pythonType":"DataSeries","summary":"DataSeries of which values are summed"},{"name":"period","csharpType":"int","pythonType":"int","summary":"Period of values that are summed prior to current index"}],"returns":{"csharpType":"double","pythonType":"float","summary":"The sum of the series for the period","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeSum = Bars.TickVolumes.Sum(20);\nPrint(\"Tick volume of the last 20 bars: {0}\", volumeSum);","python":"volumeSum = Functions.Sum(api.Bars.TickVolumes, 20)\napi.Print(f\"Tick volume of the last 20 bars: {volumeSum}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Sum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/Functions/Sum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.FuturesSettings","kind":"interface","name":"FuturesSettings","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public interface FuturesSettings","python":"FuturesSettings","summary":"Represents a future contract symbol settings.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        if (Symbol.FuturesSettings is {} futureSettings)\n        {\n            Print($\"Symbol {SymbolName} futures settings, ExpirationTime: {futureSettings.ExpirationTime}, LastTradeTime: {futureSettings.LastTradeTime}, MaintenanceMargin: {futureSettings.MaintenanceMargin}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        if api.Symbol.FuturesSettings is not None:\n            futureSettings = api.Symbol.FuturesSettings\n            print(f\"Symbol {api.SymbolName} futures settings, ExpirationTime: {futureSettings.ExpirationTime}, LastTradeTime: {futureSettings.LastTradeTime}, MaintenanceMargin: {futureSettings.MaintenanceMargin}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FuturesSettings.ExpirationTime","kind":"property","name":"ExpirationTime","type":"T:cAlgo.API.FuturesSettings","namespace":"cAlgo.API","group":"Symbols","csharp":"DateTime ExpirationTime {get;}","python":"futuresSettings.ExpirationTime: DateTime","summary":"Gets the expiration time of future contract.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var futuresSettings = Symbol.FuturesSettings;\nif (futuresSettings != null)\n    Print(\"{0} expires on {1}\", SymbolName, futuresSettings.ExpirationTime);","python":"futuresSettings = api.Symbol.FuturesSettings\nif futuresSettings is not None:\n    api.Print(f\"{api.SymbolName} expires on {futuresSettings.ExpirationTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/ExpirationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/ExpirationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FuturesSettings.LastTradeTime","kind":"property","name":"LastTradeTime","type":"T:cAlgo.API.FuturesSettings","namespace":"cAlgo.API","group":"Symbols","csharp":"DateTime LastTradeTime {get;}","python":"futuresSettings.LastTradeTime: DateTime","summary":"Gets the last trade time of future contract.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var futuresSettings = Symbol.FuturesSettings;\nif (futuresSettings != null && Server.Time >= futuresSettings.LastTradeTime)\n    Print(\"Trading for {0} has ended\", SymbolName);","python":"futuresSettings = api.Symbol.FuturesSettings\nif futuresSettings is not None and api.Server.Time >= futuresSettings.LastTradeTime:\n    api.Print(f\"Trading for {api.SymbolName} has ended\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/LastTradeTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/LastTradeTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.FuturesSettings.MaintenanceMargin","kind":"property","name":"MaintenanceMargin","type":"T:cAlgo.API.FuturesSettings","namespace":"cAlgo.API","group":"Symbols","csharp":"double? MaintenanceMargin {get;}","python":"futuresSettings.MaintenanceMargin: float | None","summary":"The amount of quote asset that will be taken as a margin per one traded lot.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var futuresSettings = Symbol.FuturesSettings;\nif (futuresSettings != null && futuresSettings.MaintenanceMargin.HasValue)\n    Print(\"Maintenance margin per lot: {0} {1}\", futuresSettings.MaintenanceMargin.Value, Symbol.QuoteAsset.Name);","python":"futuresSettings = api.Symbol.FuturesSettings\nif futuresSettings is not None and futuresSettings.MaintenanceMargin is not None:\n    api.Print(f\"Maintenance margin per lot: {futuresSettings.MaintenanceMargin} {api.Symbol.QuoteAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/MaintenanceMargin/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/FuturesSettings/MaintenanceMargin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.GannLevel","kind":"interface","name":"GannLevel","type":null,"namespace":"cAlgo.API","group":"Gann","csharp":"public interface GannLevel","python":"GannLevel","summary":"Represents a Gann Level.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use a chart Gann Fan levels property to modify the gann levels\n    public partial class GannLevelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var gannFan = Chart.DrawGannFan(\"GannFan\", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);\n\n            foreach (var level in gannFan.GannLevels)\n            {\n                Print(level.Ratio);\n\n                if (level.Ratio > 4) level.IsVisible = false;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"gannFan = api.Chart.DrawGannFan(\"GannFan\", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)\nfor level in gannFan.GannLevels:\n    api.Print(level.Ratio)\n    if level.Ratio > 4:\n        level.IsVisible = False","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GannLevel.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.GannLevel","namespace":"cAlgo.API","group":"Gann","csharp":"bool IsVisible {get; set;}","python":"gannLevel.IsVisible: bool","summary":"Defines if the level is visible.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nforeach (var level in gannFan.GannLevels)\n    level.IsVisible = level.Ratio == 1;\nPrint(\"Only the 1x1 Gann ray is visible now\");","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\nfor level in gannFan.GannLevels:\n    level.IsVisible = level.Ratio == 1\napi.Print(\"Only the 1x1 Gann ray is visible now\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GannLevel.Ratio","kind":"property","name":"Ratio","type":"T:cAlgo.API.GannLevel","namespace":"cAlgo.API","group":"Gann","csharp":"double Ratio {get; set;}","python":"gannLevel.Ratio: float","summary":"Gets or sets the level ratio (e.g., 1.0 for 1x1, 2.0 for 2x1, 0.5 for 1x2).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var gannFan = Chart.DrawGannFan(\"gannFan\", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);\nvar level = gannFan.GannLevels[0];\nlevel.Ratio = 3;\nPrint(\"First Gann level ratio: {0}\", level.Ratio);","python":"gannFan = api.Chart.DrawGannFan(\"gannFan\", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)\nlevel = gannFan.GannLevels[0]\nlevel.Ratio = 3\napi.Print(f\"First Gann level ratio: {level.Ratio}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/Ratio/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/Ratio/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.GatorOscillator","kind":"interface","name":"GatorOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface GatorOscillator","python":"GatorOscillator","summary":"The calculation of the Gator Oscillator.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private GatorOscillator _gatorOscillator;\n\nprotected override void OnStart()\n{\n    _gatorOscillator = Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Gator Upper: {0}, Lower: {1}\", _gatorOscillator.Upper.Last(1), _gatorOscillator.Lower.Last(1));\n}","python":"def on_start(self):\n    self.gatorOscillator = api.Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\n\ndef on_bar(self):\n    api.Print(f\"Gator Upper: {self.gatorOscillator.Upper.Last(1)}, Lower: {self.gatorOscillator.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.GatorOscillator.Lower","kind":"property","name":"Lower","type":"T:cAlgo.API.Indicators.GatorOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Lower {get;}","python":"gatorOscillator.Lower: IndicatorDataSeries","summary":"The histogram (bar graph). The difference between the Alligator's teeth and lips.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gatorOscillator = Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Teeth minus lips: {0}\", gatorOscillator.Lower.Last(1));","python":"gatorOscillator = api.Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Teeth minus lips: {gatorOscillator.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/Lower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/Lower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.GatorOscillator.Upper","kind":"property","name":"Upper","type":"T:cAlgo.API.Indicators.GatorOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Upper {get;}","python":"gatorOscillator.Upper: IndicatorDataSeries","summary":"The histogram (bar graph). The difference between the Alligator's jaws and teeth.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gatorOscillator = Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing);\nPrint(\"Jaws minus teeth: {0}\", gatorOscillator.Upper.Last(1));","python":"gatorOscillator = api.Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.WilderSmoothing)\napi.Print(f\"Jaws minus teeth: {gatorOscillator.Upper.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/Upper/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/GatorOscillator/Upper/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.GetFitnessArgs","kind":"interface","name":"GetFitnessArgs","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public interface GetFitnessArgs","python":"GetFitnessArgs","summary":"Represents the custom fitness calculation interface.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use the GetFitnessArgs to change the default fitness metric of optimizer\n    public partial class Test : Robot\n    {\n        protected override void OnStart()\n        {\n        }\n\n        protected override double GetFitness(GetFitnessArgs args)\n        {\n            // Here we are using the win rate as fitness\n            // You can use any other value by combining the values of GetFitnessArgs object properties\n            return args.TotalTrades == 0 ? 0 : args.WinningTrades / args.TotalTrades;\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass GetFitnessArgsSample():\n    def get_fitness(self, args):\n        # Here we are using the win rate as fitness\n        # You can use any other value by combining the values of GetFitnessArgs object properties\n        if args.TotalTrades == 0:\n            return 0\n        return args.WinningTrades / args.TotalTrades","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.AverageTrade","kind":"property","name":"AverageTrade","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double AverageTrade {get;}","python":"getFitnessArgs.AverageTrade: float","summary":"Gets the average profit for all trades in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.AverageTrade;\n}","python":"def get_fitness(self, args):\n    return args.AverageTrade"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/AverageTrade/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/AverageTrade/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.Commissions","kind":"property","name":"Commissions","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double Commissions {get;}","python":"getFitnessArgs.Commissions: float","summary":"Gets the commissions of all trades in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return Math.Abs(args.Commissions) > 500 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if abs(args.Commissions) > 500 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Commissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Commissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.Equity","kind":"property","name":"Equity","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double Equity {get;}","python":"getFitnessArgs.Equity: float","summary":"Gets the equity of the account (balance plus unrealized profit and loss).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.Equity;\n}","python":"def get_fitness(self, args):\n    return args.Equity"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Equity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Equity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.History","kind":"property","name":"History","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"History History {get;}","python":"getFitnessArgs.History: History","summary":"Gets all the historical trades.","remarks":null,"parameters":[],"returns":{"csharpType":"History","pythonType":"History","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.History.Where(trade => trade.NetProfit > 0).Sum(trade => trade.NetProfit);\n}","python":"def get_fitness(self, args):\n    return sum(trade.NetProfit for trade in args.History if trade.NetProfit > 0)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.LosingTrades","kind":"property","name":"LosingTrades","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double LosingTrades {get;}","python":"getFitnessArgs.LosingTrades: float","summary":"Gets total number of losing trades.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.TotalTrades == 0 ? 0 : 1 - args.LosingTrades / args.TotalTrades;\n}","python":"def get_fitness(self, args):\n    return 0 if args.TotalTrades == 0 else 1 - args.LosingTrades / args.TotalTrades"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/LosingTrades/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/LosingTrades/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.MaxBalanceDrawdown","kind":"property","name":"MaxBalanceDrawdown","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double MaxBalanceDrawdown {get;}","python":"getFitnessArgs.MaxBalanceDrawdown: float","summary":"Gets the maximum amount of balance drawdown in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.NetProfit / Math.Max(args.MaxBalanceDrawdown, 1);\n}","python":"def get_fitness(self, args):\n    return args.NetProfit / max(args.MaxBalanceDrawdown, 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxBalanceDrawdown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxBalanceDrawdown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.MaxBalanceDrawdownPercentages","kind":"property","name":"MaxBalanceDrawdownPercentages","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double MaxBalanceDrawdownPercentages {get;}","python":"getFitnessArgs.MaxBalanceDrawdownPercentages: float","summary":"Gets the maximum amount of balance drawdown in percentage (ex: 40%). It can return a positive value between 0-100.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.NetProfit / Math.Max(args.MaxBalanceDrawdownPercentages, 1);\n}","python":"def get_fitness(self, args):\n    return args.NetProfit / max(args.MaxBalanceDrawdownPercentages, 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxBalanceDrawdownPercentages/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxBalanceDrawdownPercentages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.MaxEquityDrawdown","kind":"property","name":"MaxEquityDrawdown","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double MaxEquityDrawdown {get;}","python":"getFitnessArgs.MaxEquityDrawdown: float","summary":"Gets the maximum amount of equity drawdown in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.NetProfit / Math.Max(args.MaxEquityDrawdown, 1);\n}","python":"def get_fitness(self, args):\n    return args.NetProfit / max(args.MaxEquityDrawdown, 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxEquityDrawdown/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxEquityDrawdown/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.MaxEquityDrawdownPercentages","kind":"property","name":"MaxEquityDrawdownPercentages","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double MaxEquityDrawdownPercentages {get;}","python":"getFitnessArgs.MaxEquityDrawdownPercentages: float","summary":"Gets the maximum amount of equity drawdown in percentage (ex: 40%). It can return a positive value between 0-100.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.MaxEquityDrawdownPercentages > 20 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if args.MaxEquityDrawdownPercentages > 20 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxEquityDrawdownPercentages/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/MaxEquityDrawdownPercentages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.NetProfit","kind":"property","name":"NetProfit","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double NetProfit {get;}","python":"getFitnessArgs.NetProfit: float","summary":"Gets the net profit of all trades in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/NetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/NetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.PendingOrders","kind":"property","name":"PendingOrders","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"PendingOrders PendingOrders {get;}","python":"getFitnessArgs.PendingOrders: PendingOrders","summary":"Gets all pending orders.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrders","pythonType":"PendingOrders","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.PendingOrders.Count > 0 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if args.PendingOrders.Count > 0 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/PendingOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/PendingOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"Positions Positions {get;}","python":"getFitnessArgs.Positions: Positions","summary":"Gets all open positions.","remarks":null,"parameters":[],"returns":{"csharpType":"Positions","pythonType":"Positions","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.Positions.Count > 0 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if args.Positions.Count > 0 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.ProfitFactor","kind":"property","name":"ProfitFactor","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double ProfitFactor {get;}","python":"getFitnessArgs.ProfitFactor: float","summary":"Gets the Profit Factor - the ratio of Total Net Profit divided by the Total Net Loss.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return double.IsNaN(args.ProfitFactor) ? 0 : args.ProfitFactor;\n}","python":"import math\n\ndef get_fitness(self, args):\n    return 0 if math.isnan(args.ProfitFactor) else args.ProfitFactor"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/ProfitFactor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/ProfitFactor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.Swaps","kind":"property","name":"Swaps","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double Swaps {get;}","python":"getFitnessArgs.Swaps: float","summary":"Gets the swaps of all trades in account deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return Math.Abs(args.Swaps) > 100 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if abs(args.Swaps) > 100 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Swaps/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/Swaps/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.TotalTrades","kind":"property","name":"TotalTrades","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double TotalTrades {get;}","python":"getFitnessArgs.TotalTrades: float","summary":"Gets the total number of trades taken.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.TotalTrades < 30 ? 0 : args.NetProfit;\n}","python":"def get_fitness(self, args):\n    return 0 if args.TotalTrades < 30 else args.NetProfit"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/TotalTrades/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/TotalTrades/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.WinningTrades","kind":"property","name":"WinningTrades","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double WinningTrades {get;}","python":"getFitnessArgs.WinningTrades: float","summary":"Gets the total number of winning trades.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    return args.TotalTrades == 0 ? 0 : args.WinningTrades / args.TotalTrades;\n}","python":"def get_fitness(self, args):\n    return 0 if args.TotalTrades == 0 else args.WinningTrades / args.TotalTrades"}],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/WinningTrades/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/WinningTrades/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.SharpeRatio","kind":"property","name":"SharpeRatio","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double SharpeRatio {get;}","python":"getFitnessArgs.SharpeRatio: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GetFitnessArgs.SortinoRatio","kind":"property","name":"SortinoRatio","type":"T:cAlgo.API.GetFitnessArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"double SortinoRatio {get;}","python":"getFitnessArgs.SortinoRatio: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Optimization/GetFitnessArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Grid","kind":"class","name":"Grid","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public class Grid : Panel","python":"Grid","summary":"Represents the Grid class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Grid panel control\n    public partial class GridSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var grid = new Grid(GridRowsNumber, GridColumnsNumber)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                ShowGridLines = true,\n            };\n\n            for (int iRow = 0; iRow < GridRowsNumber; iRow++)\n            {\n                var row = grid.Rows[iRow];\n\n                SetGridRowLength(row);\n\n                for (int iColumn = 0; iColumn < GridColumnsNumber; iColumn++)\n                {\n                    var column = grid.Columns[iColumn];\n\n                    SetGridColumnLength(column);\n\n                    grid.AddChild(new TextBlock\n                    {\n                        Text = string.Format(\"Row {0} and Column {1}\", iRow, iColumn),\n                        Margin = 5,\n                        ForegroundColor = Color.Black,\n                        FontWeight = FontWeight.ExtraBold\n                    }, iRow, iColumn);\n                }\n            }\n\n            Chart.AddControl(grid);\n        }\n\n        private void SetGridRowLength(GridRow row)\n        {\n            switch (GridRowLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    row.SetHeightToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    row.SetHeightInPixels(GridRowLength);\n                    break;\n\n                case GridUnitType.Star:\n                    row.SetHeightInStars(GridRowLength);\n                    break;\n            }\n        }\n\n        private void SetGridColumnLength(GridColumn column)\n        {\n            switch (GridColumnLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    column.SetWidthToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    column.SetWidthInPixels(GridColumnLength);\n                    break;\n\n                case GridUnitType.Star:\n                    column.SetWidthInStars(GridColumnLength);\n                    break;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        grid = Grid(api.GridRowsNumber, api.GridColumnsNumber)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n        grid.ShowGridLines = True\n\n        for iRow in range(api.GridRowsNumber):\n            row = grid.Rows[iRow]\n\n            self.set_grid_row_length(row)\n\n            for iColumn in range(api.GridColumnsNumber):\n                column = grid.Columns[iColumn]\n\n                self.set_grid_column_length(column)\n\n                textBlock = TextBlock()\n                textBlock.Text = f\"Row {iRow} and Column {iColumn}\"\n                textBlock.Margin = Thickness(5)\n                textBlock.ForegroundColor = Color.Black\n                textBlock.FontWeight = FontWeight.ExtraBold\n\n                grid.AddChild(textBlock, iRow, iColumn)\n\n        api.Chart.AddControl(grid)\n\n    def set_grid_row_length(self, row):\n        match api.GridRowLengthUnitType:\n            case GridUnitType.Auto:\n                row.SetHeightToAuto()\n            case GridUnitType.Pixel:\n                row.SetHeightInPixels(api.GridRowLength)\n            case GridUnitType.Star:\n                row.SetHeightInStars(api.GridRowLength)\n\n    def set_grid_column_length(self, column):\n        match api.GridColumnLengthUnitType:\n            case GridUnitType.Auto:\n                column.SetWidthToAuto()\n            case GridUnitType.Pixel:\n                column.SetWidthInPixels(api.GridColumnLength)\n            case GridUnitType.Star:\n                column.SetWidthInStars(api.GridColumnLength)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"GridRowsNumber\",\n      \"DisplayName\": \"Grid Rows #\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"GridColumnsNumber\",\n      \"DisplayName\": \"Grid Columns #\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridRowLength\",\n      \"DisplayName\": \"Grid Row Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridRowLengthUnitType\",\n      \"DisplayName\": \"Grid Row Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    },\n    {\n      \"Name\": \"GridColumnLength\",\n      \"DisplayName\": \"Grid Column Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridColumnLengthUnitType\",\n      \"DisplayName\": \"Grid Column Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.#ctor","kind":"constructor","name":"Grid","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public Grid()","python":"Grid()","summary":"Initializes a new grid on the chart.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid();\ngrid.AddRows(2);\ngrid.AddColumns(2);\ngrid.AddChild(new TextBlock { Text = \"Bid\" }, 0, 0);\ngrid.AddChild(new TextBlock { Text = Symbol.Bid.ToString() }, 0, 1);\nChart.AddControl(grid);","python":"grid = Grid()\ngrid.AddRows(2)\ngrid.AddColumns(2)\nlabel = TextBlock()\nlabel.Text = \"Bid\"\nvalue = TextBlock()\nvalue.Text = str(api.Symbol.Bid)\ngrid.AddChild(label, 0, 0)\ngrid.AddChild(value, 0, 1)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.#ctor(System.Int32,System.Int32)","kind":"constructor","name":"Grid","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public Grid(int rowsCount, int columnsCount)","python":"Grid(rowsCount: int, columnsCount: int)","summary":"Initializes a new grid on the chart.","remarks":null,"parameters":[{"name":"rowsCount","csharpType":"int","pythonType":"int","summary":"The rows count."},{"name":"columnsCount","csharpType":"int","pythonType":"int","summary":"The columns count."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 2) { BackgroundColor = Color.FromArgb(80, Color.Black), ShowGridLines = true };\ngrid.AddChild(new TextBlock { Text = \"Bid\" }, 0, 0);\ngrid.AddChild(new TextBlock { Text = Symbol.Bid.ToString() }, 0, 1);\ngrid.AddChild(new TextBlock { Text = \"Ask\" }, 1, 0);\ngrid.AddChild(new TextBlock { Text = Symbol.Ask.ToString() }, 1, 1);\nChart.AddControl(grid);","python":"grid = Grid(2, 2)\ngrid.BackgroundColor = Color.FromArgb(80, Color.Black)\ngrid.ShowGridLines = True\nfor row, (label, price) in enumerate([(\"Bid\", api.Symbol.Bid), (\"Ask\", api.Symbol.Ask)]):\n    labelText = TextBlock()\n    labelText.Text = label\n    priceText = TextBlock()\n    priceText.Text = str(price)\n    grid.AddChild(labelText, row, 0)\n    grid.AddChild(priceText, row, 1)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddChild(cAlgo.API.ControlBase,System.Int32,System.Int32)","kind":"method","name":"AddChild","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void AddChild(ControlBase child, int row, int column)","python":"grid.AddChild(child: ControlBase, row: int, column: int) -> None","summary":"Adds a child element.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The child."},{"name":"row","csharpType":"int","pythonType":"int","summary":"The row."},{"name":"column","csharpType":"int","pythonType":"int","summary":"The column."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.AddChild(new Button { Text = \"Buy\" }, 0, 0);\ngrid.AddChild(new Button { Text = \"Sell\" }, 0, 1);\nChart.AddControl(grid);","python":"grid = Grid(1, 2)\nbuyButton = Button()\nbuyButton.Text = \"Buy\"\nsellButton = Button()\nsellButton.Text = \"Sell\"\ngrid.AddChild(buyButton, 0, 0)\ngrid.AddChild(sellButton, 0, 1)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddChild(cAlgo.API.ControlBase,System.Int32,System.Int32,System.Int32,System.Int32)","kind":"method","name":"AddChild","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void AddChild(ControlBase child, int row, int column, int rowSpan, int columnSpan)","python":"grid.AddChild(child: ControlBase, row: int, column: int, rowSpan: int, columnSpan: int) -> None","summary":"Adds the child.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The child."},{"name":"row","csharpType":"int","pythonType":"int","summary":"The row."},{"name":"column","csharpType":"int","pythonType":"int","summary":"The column."},{"name":"rowSpan","csharpType":"int","pythonType":"int","summary":"The row span."},{"name":"columnSpan","csharpType":"int","pythonType":"int","summary":"The column span."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 2);\ngrid.AddChild(new TextBlock { Text = \"EURUSD\", HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\ngrid.AddChild(new Button { Text = \"Buy\" }, 1, 0);\ngrid.AddChild(new Button { Text = \"Sell\" }, 1, 1);\nChart.AddControl(grid);","python":"grid = Grid(2, 2)\nheader = TextBlock()\nheader.Text = \"EURUSD\"\nheader.HorizontalAlignment = HorizontalAlignment.Center\ngrid.AddChild(header, 0, 0, 1, 2)\nbuyButton = Button()\nbuyButton.Text = \"Buy\"\ngrid.AddChild(buyButton, 1, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddColumn","kind":"method","name":"AddColumn","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public GridColumn AddColumn()","python":"grid.AddColumn() -> GridColumn","summary":"Adds a column.","remarks":null,"parameters":[],"returns":{"csharpType":"GridColumn","pythonType":"GridColumn","summary":"GridColumn.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 0);\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n{\n    var column = grid.AddColumn();\n    grid.AddChild(new Button { Text = symbolName }, 0, column.Index);\n}\nChart.AddControl(grid);","python":"grid = Grid(1, 0)\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n    column = grid.AddColumn()\n    button = Button()\n    button.Text = symbolName\n    grid.AddChild(button, 0, column.Index)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddColumn/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddColumn/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddColumns(System.Int32)","kind":"method","name":"AddColumns","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void AddColumns(int count)","python":"grid.AddColumns(count: int) -> None","summary":"Adds columns.","remarks":null,"parameters":[{"name":"count","csharpType":"int","pythonType":"int","summary":"The count."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbolNames = new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" };\nvar grid = new Grid(1, 0);\ngrid.AddColumns(symbolNames.Length);\nfor (var i = 0; i < symbolNames.Length; i++)\n    grid.AddChild(new TextBlock { Text = symbolNames[i], Margin = 5 }, 0, i);\nChart.AddControl(grid);","python":"symbolNames = [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]\ngrid = Grid(1, 0)\ngrid.AddColumns(len(symbolNames))\nfor i, symbolName in enumerate(symbolNames):\n    textBlock = TextBlock()\n    textBlock.Text = symbolName\n    grid.AddChild(textBlock, 0, i)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddColumns/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddColumns/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddRow","kind":"method","name":"AddRow","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public GridRow AddRow()","python":"grid.AddRow() -> GridRow","summary":"Adds a row.","remarks":null,"parameters":[],"returns":{"csharpType":"GridRow","pythonType":"GridRow","summary":"GridRow.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(0, 2);\nforeach (var position in Positions)\n{\n    var row = grid.AddRow();\n    grid.AddChild(new TextBlock { Text = position.SymbolName }, row.Index, 0);\n    grid.AddChild(new TextBlock { Text = position.NetProfit.ToString(\"F2\") }, row.Index, 1);\n}\nChart.AddControl(grid);","python":"grid = Grid(0, 2)\nfor position in api.Positions:\n    row = grid.AddRow()\n    symbolText = TextBlock()\n    symbolText.Text = position.SymbolName\n    profitText = TextBlock()\n    profitText.Text = f\"{position.NetProfit:.2f}\"\n    grid.AddChild(symbolText, row.Index, 0)\n    grid.AddChild(profitText, row.Index, 1)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddRow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddRow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.AddRows(System.Int32)","kind":"method","name":"AddRows","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void AddRows(int count)","python":"grid.AddRows(count: int) -> None","summary":"Adds a rows.","remarks":null,"parameters":[{"name":"count","csharpType":"int","pythonType":"int","summary":"The count."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(0, 1);\ngrid.AddRows(Positions.Count);\nfor (var i = 0; i < Positions.Count; i++)\n    grid.AddChild(new TextBlock { Text = Positions[i].Label ?? \"No label\" }, i, 0);\nChart.AddControl(grid);","python":"grid = Grid(0, 1)\ngrid.AddRows(api.Positions.Count)\nfor i in range(api.Positions.Count):\n    textBlock = TextBlock()\n    textBlock.Text = api.Positions[i].Label or \"No label\"\n    grid.AddChild(textBlock, i, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddRows/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/AddRows/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.GetChildPosition(cAlgo.API.ControlBase)","kind":"method","name":"GetChildPosition","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public GridChildPositionInfo? GetChildPosition(ControlBase child)","python":"grid.GetChildPosition(child: ControlBase) -> GridChildPositionInfo | None","summary":"Returns a child position info if exists otherwise null.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"Child control"}],"returns":{"csharpType":"GridChildPositionInfo?","pythonType":"GridChildPositionInfo | None","summary":"GridChildPositionInfo or Null","nullable":true},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 2);\nvar button = new Button { Text = \"Close\" };\ngrid.AddChild(button, 1, 1);\nChart.AddControl(grid);\nvar position = grid.GetChildPosition(button);\nif (position != null)\n    Print(\"Button is at row {0}, column {1}\", position.Value.Row, position.Value.Column);","python":"grid = Grid(2, 2)\nbutton = Button()\nbutton.Text = \"Close\"\ngrid.AddChild(button, 1, 1)\napi.Chart.AddControl(grid)\nposition = grid.GetChildPosition(button)\nif position is not None:\n    api.Print(f\"Button is at row {position.Row}, column {position.Column}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/GetChildPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/GetChildPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.RemoveColumnAt(System.Int32)","kind":"method","name":"RemoveColumnAt","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void RemoveColumnAt(int index)","python":"grid.RemoveColumnAt(index: int) -> None","summary":"Removes a column.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The index."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 3);\ngrid.RemoveColumnAt(0);\nChart.AddControl(grid);\nPrint(\"Columns left: {0}\", grid.Columns.Count);","python":"grid = Grid(1, 3)\ngrid.RemoveColumnAt(0)\napi.Chart.AddControl(grid)\napi.Print(f\"Columns left: {grid.Columns.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/RemoveColumnAt/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/RemoveColumnAt/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Grid.RemoveRowAt(System.Int32)","kind":"method","name":"RemoveRowAt","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public void RemoveRowAt(int index)","python":"grid.RemoveRowAt(index: int) -> None","summary":"Removes the row.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The index."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(3, 1);\ngrid.RemoveRowAt(grid.Rows.Count - 1);\nChart.AddControl(grid);\nPrint(\"Rows left: {0}\", grid.Rows.Count);","python":"grid = Grid(3, 1)\ngrid.RemoveRowAt(grid.Rows.Count - 1)\napi.Chart.AddControl(grid)\napi.Print(f\"Rows left: {grid.Rows.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/RemoveRowAt/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/RemoveRowAt/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Grid.Columns","kind":"property","name":"Columns","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public IReadonlyList<GridColumn> Columns {get;}","python":"grid.Columns: IReadonlyList[GridColumn]","summary":"Gets the read only list of the grid columns.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<GridColumn>","pythonType":"IReadonlyList[GridColumn]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(3, 2);\ngrid.Columns[0].SetWidthInPixels(80);\ngrid.Columns[1].SetWidthInStars(1);\nPrint(\"Columns: {0}\", grid.Columns.Count);\nChart.AddControl(grid);","python":"grid = Grid(3, 2)\ngrid.Columns[0].SetWidthInPixels(80)\ngrid.Columns[1].SetWidthInStars(1)\napi.Print(f\"Columns: {grid.Columns.Count}\")\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Columns/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Columns/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Grid.Rows","kind":"property","name":"Rows","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public IReadonlyList<GridRow> Rows {get;}","python":"grid.Rows: IReadonlyList[GridRow]","summary":"Gets the read only list of the grid rows.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<GridRow>","pythonType":"IReadonlyList[GridRow]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(3, 2);\ngrid.Rows[0].SetHeightInPixels(30);\nPrint(\"Rows: {0}\", grid.Rows.Count);\nChart.AddControl(grid);","python":"grid = Grid(3, 2)\ngrid.Rows[0].SetHeightInPixels(30)\napi.Print(f\"Rows: {grid.Rows.Count}\")\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Rows/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/Rows/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Grid.ShowGridLines","kind":"property","name":"ShowGridLines","type":"T:cAlgo.API.Grid","namespace":"cAlgo.API","group":"Grid","csharp":"public bool ShowGridLines {get; set;}","python":"grid.ShowGridLines: bool","summary":"Defines if the grid lines are visible.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 2) { ShowGridLines = true };\nChart.AddControl(grid);\nPrint(\"Grid lines visible: {0}\", grid.ShowGridLines);","python":"grid = Grid(2, 2)\ngrid.ShowGridLines = True\napi.Chart.AddControl(grid)\napi.Print(f\"Grid lines visible: {grid.ShowGridLines}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/ShowGridLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/Grid/ShowGridLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.GridChildPositionInfo","kind":"struct","name":"GridChildPositionInfo","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public sealed struct GridChildPositionInfo : ValueType","python":"GridChildPositionInfo","summary":"Represents a Grid panel child position info.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 2);\nvar header = new TextBlock { Text = \"EURUSD\" };\ngrid.AddChild(header, 0, 0, 1, 2);\nChart.AddControl(grid);\nvar position = grid.GetChildPosition(header);\nif (position.HasValue)\n    Print(\"Row {0}, column {1}, column span {2}\", position.Value.Row, position.Value.Column, position.Value.ColumnSpan);","python":"grid = Grid(2, 2)\nheader = TextBlock()\nheader.Text = \"EURUSD\"\ngrid.AddChild(header, 0, 0, 1, 2)\napi.Chart.AddControl(grid)\nposition = grid.GetChildPosition(header)\nif position is not None:\n    api.Print(f\"Row {position.Row}, column {position.Column}, column span {position.ColumnSpan}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridChildPositionInfo.Column","kind":"property","name":"Column","type":"T:cAlgo.API.GridChildPositionInfo","namespace":"cAlgo.API","group":"Grid","csharp":"public int Column {get;}","python":"gridChildPositionInfo.Column: int","summary":"Gets column number of child.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 3);\nvar label = new TextBlock { Text = \"Margin\" };\ngrid.AddChild(label, 0, 2);\nvar position = grid.GetChildPosition(label);\nif (position.HasValue)\n    Print(\"Column: {0}\", position.Value.Column);","python":"grid = Grid(1, 3)\nlabel = TextBlock()\nlabel.Text = \"Margin\"\ngrid.AddChild(label, 0, 2)\nposition = grid.GetChildPosition(label)\nif position is not None:\n    api.Print(f\"Column: {position.Column}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/Column/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/Column/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridChildPositionInfo.ColumnSpan","kind":"property","name":"ColumnSpan","type":"T:cAlgo.API.GridChildPositionInfo","namespace":"cAlgo.API","group":"Grid","csharp":"public int ColumnSpan {get;}","python":"gridChildPositionInfo.ColumnSpan: int","summary":"Gets column span of child.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 3);\nvar header = new TextBlock { Text = \"Positions\" };\ngrid.AddChild(header, 0, 0, 1, 3);\nvar position = grid.GetChildPosition(header);\nif (position.HasValue)\n    Print(\"Column span: {0}\", position.Value.ColumnSpan);","python":"grid = Grid(2, 3)\nheader = TextBlock()\nheader.Text = \"Positions\"\ngrid.AddChild(header, 0, 0, 1, 3)\nposition = grid.GetChildPosition(header)\nif position is not None:\n    api.Print(f\"Column span: {position.ColumnSpan}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/ColumnSpan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/ColumnSpan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridChildPositionInfo.Row","kind":"property","name":"Row","type":"T:cAlgo.API.GridChildPositionInfo","namespace":"cAlgo.API","group":"Grid","csharp":"public int Row {get;}","python":"gridChildPositionInfo.Row: int","summary":"Gets row number of child.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(3, 1);\nvar label = new TextBlock { Text = \"Equity\" };\ngrid.AddChild(label, 2, 0);\nvar position = grid.GetChildPosition(label);\nif (position.HasValue)\n    Print(\"Row: {0}\", position.Value.Row);","python":"grid = Grid(3, 1)\nlabel = TextBlock()\nlabel.Text = \"Equity\"\ngrid.AddChild(label, 2, 0)\nposition = grid.GetChildPosition(label)\nif position is not None:\n    api.Print(f\"Row: {position.Row}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/Row/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/Row/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridChildPositionInfo.RowSpan","kind":"property","name":"RowSpan","type":"T:cAlgo.API.GridChildPositionInfo","namespace":"cAlgo.API","group":"Grid","csharp":"public int RowSpan {get;}","python":"gridChildPositionInfo.RowSpan: int","summary":"Gets row span of child.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var grid = new Grid(3, 2);\nvar sideBar = new Border { BackgroundColor = Color.DarkSlateGray };\ngrid.AddChild(sideBar, 0, 0, 3, 1);\nvar position = grid.GetChildPosition(sideBar);\nif (position.HasValue)\n    Print(\"Row span: {0}\", position.Value.RowSpan);","python":"grid = Grid(3, 2)\nsideBar = Border()\nsideBar.BackgroundColor = Color.DarkSlateGray\ngrid.AddChild(sideBar, 0, 0, 3, 1)\nposition = grid.GetChildPosition(sideBar)\nif position is not None:\n    api.Print(f\"Row span: {position.RowSpan}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/RowSpan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridChildPositionInfo/RowSpan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.GridColumn","kind":"interface","name":"GridColumn","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public interface GridColumn","python":"GridColumn","summary":"Represents the column of the grid.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2) { ShowGridLines = true };\nGridColumn labelColumn = grid.Columns[0];\nlabelColumn.SetWidthInPixels(80);\ngrid.Columns[1].SetWidthInStars(1);\ngrid.AddChild(new TextBlock { Text = \"Symbol\" }, 0, 0);\ngrid.AddChild(new TextBlock { Text = SymbolName }, 0, 1);\nChart.AddControl(grid);","python":"grid = Grid(1, 2)\ngrid.ShowGridLines = True\nlabelColumn = grid.Columns[0]\nlabelColumn.SetWidthInPixels(80)\ngrid.Columns[1].SetWidthInStars(1)\nlabel = TextBlock()\nlabel.Text = \"Symbol\"\ngrid.AddChild(label, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"M:cAlgo.API.GridColumn.SetWidthInPixels(System.Double)","kind":"method","name":"SetWidthInPixels","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"void SetWidthInPixels(double value)","python":"gridColumn.SetWidthInPixels(value: float) -> None","summary":"Sets the grid column width in pixels.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.Columns[0].SetWidthInPixels(100);\ngrid.AddChild(new TextBlock { Text = \"Fixed 100 px\" }, 0, 0);\nChart.AddControl(grid);","python":"grid = Grid(1, 2)\ngrid.Columns[0].SetWidthInPixels(100)\ntextBlock = TextBlock()\ntextBlock.Text = \"Fixed 100 px\"\ngrid.AddChild(textBlock, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthInPixels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthInPixels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"M:cAlgo.API.GridColumn.SetWidthInStars(System.Double)","kind":"method","name":"SetWidthInStars","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"void SetWidthInStars(double stars)","python":"gridColumn.SetWidthInStars(stars: float) -> None","summary":"Sets the grid column width in stars.","remarks":null,"parameters":[{"name":"stars","csharpType":"double","pythonType":"float","summary":"The stars."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2) { Width = 300 };\ngrid.Columns[0].SetWidthInStars(1);\ngrid.Columns[1].SetWidthInStars(2);\nChart.AddControl(grid);","python":"grid = Grid(1, 2)\ngrid.Width = 300\ngrid.Columns[0].SetWidthInStars(1)\ngrid.Columns[1].SetWidthInStars(2)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthInStars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthInStars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"M:cAlgo.API.GridColumn.SetWidthToAuto","kind":"method","name":"SetWidthToAuto","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"void SetWidthToAuto()","python":"gridColumn.SetWidthToAuto() -> None","summary":"Sets the grid column width to automatic.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.Columns[0].SetWidthToAuto();\ngrid.AddChild(new TextBlock { Text = \"Sized to content\" }, 0, 0);\nChart.AddControl(grid);","python":"grid = Grid(1, 2)\ngrid.Columns[0].SetWidthToAuto()\ntextBlock = TextBlock()\ntextBlock.Text = \"Sized to content\"\ngrid.AddChild(textBlock, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthToAuto/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/SetWidthToAuto/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"P:cAlgo.API.GridColumn.Index","kind":"property","name":"Index","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"int Index {get;}","python":"gridColumn.Index: int","summary":"Gets the grid column index.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 0);\nvar column = grid.AddColumn();\ngrid.AddChild(new TextBlock { Text = \"EURUSD\" }, 0, column.Index);\nPrint(\"Column index: {0}\", column.Index);","python":"grid = Grid(1, 0)\ncolumn = grid.AddColumn()\ntextBlock = TextBlock()\ntextBlock.Text = \"EURUSD\"\ngrid.AddChild(textBlock, 0, column.Index)\napi.Print(f\"Column index: {column.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"P:cAlgo.API.GridColumn.MaxWidth","kind":"property","name":"MaxWidth","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"double MaxWidth {get; set;}","python":"gridColumn.MaxWidth: float","summary":"Defines the grid column maximum width.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.Columns[0].SetWidthToAuto();\ngrid.Columns[0].MaxWidth = 200;\nPrint(\"Maximum width: {0}\", grid.Columns[0].MaxWidth);","python":"grid = Grid(1, 2)\ngrid.Columns[0].SetWidthToAuto()\ngrid.Columns[0].MaxWidth = 200\napi.Print(f\"Maximum width: {grid.Columns[0].MaxWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/MaxWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/MaxWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"P:cAlgo.API.GridColumn.MinWidth","kind":"property","name":"MinWidth","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"double MinWidth {get; set;}","python":"gridColumn.MinWidth: float","summary":"Defines the grid column minimum width.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.Columns[1].SetWidthInStars(1);\ngrid.Columns[1].MinWidth = 60;\nPrint(\"Minimum width: {0}\", grid.Columns[1].MinWidth);","python":"grid = Grid(1, 2)\ngrid.Columns[1].SetWidthInStars(1)\ngrid.Columns[1].MinWidth = 60\napi.Print(f\"Minimum width: {grid.Columns[1].MinWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/MinWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/MinWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"P:cAlgo.API.GridColumn.Width","kind":"property","name":"Width","type":"T:cAlgo.API.GridColumn","namespace":"cAlgo.API","group":"Grid","csharp":"GridLength Width {get;}","python":"gridColumn.Width: GridLength","summary":"Gets the grid column width.","remarks":null,"parameters":[],"returns":{"csharpType":"GridLength","pythonType":"GridLength","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 1);\ngrid.Columns[0].SetWidthInPixels(150);\nPrint(\"Width: {0} {1}\", grid.Columns[0].Width.Value, grid.Columns[0].Width.UnitType);","python":"grid = Grid(1, 1)\ngrid.Columns[0].SetWidthInPixels(150)\napi.Print(f\"Width: {grid.Columns[0].Width.Value} {grid.Columns[0].Width.UnitType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridColumn/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddColumn, Grid.Columns)."}]}
{"id":"T:cAlgo.API.GridLength","kind":"class","name":"GridLength","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public class GridLength","python":"GridLength","summary":"Represents the length of the grid.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use GridLength\n    public partial class GridLengthSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var grid = new Grid(2, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                ShowGridLines = true,\n            };\n            for (int iRow = 0; iRow < 2; iRow++)\n            {\n                var row = grid.Rows[iRow];\n                SetGridRowLength(row);\n                for (int iColumn = 0; iColumn < 2; iColumn++)\n                {\n                    var column = grid.Columns[iColumn];\n                    SetGridColumnLength(column);\n                    grid.AddChild(new TextBlock\n                    {\n                        Text = string.Format(\"Row {0} and Column {1}\", iRow, iColumn),\n                        Margin = 5,\n                        ForegroundColor = Color.Black,\n                        FontWeight = FontWeight.ExtraBold\n                    }, iRow, iColumn);\n                }\n            }\n            Chart.AddControl(grid);\n        }\n\n        private void SetGridRowLength(GridRow row)\n        {\n            switch (GridRowLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    row.SetHeightToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    row.SetHeightInPixels(GridRowLength);\n                    break;\n\n                case GridUnitType.Star:\n                    row.SetHeightInStars(GridRowLength);\n                    break;\n            }\n        }\n\n        private void SetGridColumnLength(GridColumn column)\n        {\n            switch (GridColumnLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    column.SetWidthToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    column.SetWidthInPixels(GridColumnLength);\n                    break;\n\n                case GridUnitType.Star:\n                    column.SetWidthInStars(GridColumnLength);\n                    break;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        grid = Grid(2, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n        grid.ShowGridLines = True\n\n        for iRow in range(2):\n            row = grid.Rows[iRow]\n\n            self.set_grid_row_length(row)\n\n            for iColumn in range(2):\n                column = grid.Columns[iColumn]\n\n                self.set_grid_column_length(column)\n\n                textBlock = TextBlock()\n                textBlock.Text = f\"Row {iRow} and Column {iColumn}\"\n                textBlock.Margin = Thickness(5)\n                textBlock.ForegroundColor = Color.Black\n                textBlock.FontWeight = FontWeight.ExtraBold\n\n                grid.AddChild(textBlock, iRow, iColumn)\n\n        api.Chart.AddControl(grid)\n\n    def set_grid_row_length(self, row):\n        match api.GridRowLengthUnitType:\n            case GridUnitType.Auto:\n                row.SetHeightToAuto()\n            case GridUnitType.Pixel:\n                row.SetHeightInPixels(api.GridRowLength)\n            case GridUnitType.Star:\n                row.SetHeightInStars(api.GridRowLength)\n\n    def set_grid_column_length(self, column):\n        match api.GridColumnLengthUnitType:\n            case GridUnitType.Auto:\n                column.SetWidthToAuto()\n            case GridUnitType.Pixel:\n                column.SetWidthInPixels(api.GridColumnLength)\n            case GridUnitType.Star:\n                column.SetWidthInStars(api.GridColumnLength)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"GridRowLength\",\n      \"DisplayName\": \"Grid Row Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridRowLengthUnitType\",\n      \"DisplayName\": \"Grid Row Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    },\n    {\n      \"Name\": \"GridColumnLength\",\n      \"DisplayName\": \"Grid Column Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridColumnLengthUnitType\",\n      \"DisplayName\": \"Grid Column Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridLength.UnitType","kind":"property","name":"UnitType","type":"T:cAlgo.API.GridLength","namespace":"cAlgo.API","group":"Grid","csharp":"public GridUnitType UnitType {get;}","python":"gridLength.UnitType: GridUnitType","summary":"Gets or sets the type of the unit.","remarks":null,"parameters":[],"returns":{"csharpType":"GridUnitType","pythonType":"GridUnitType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1);\ngrid.Rows[0].SetHeightInStars(2);\nvar height = grid.Rows[0].Height;\nif (height.UnitType == GridUnitType.Star)\n    Print(\"Row takes {0} stars\", height.Value);","python":"grid = Grid(2, 1)\ngrid.Rows[0].SetHeightInStars(2)\nheight = grid.Rows[0].Height\nif height.UnitType == GridUnitType.Star:\n    api.Print(f\"Row takes {height.Value} stars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/UnitType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/UnitType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.GridLength.Value","kind":"property","name":"Value","type":"T:cAlgo.API.GridLength","namespace":"cAlgo.API","group":"Grid","csharp":"public double Value {get;}","python":"gridLength.Value: float","summary":"Gets or sets the value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 2);\ngrid.Columns[0].SetWidthInPixels(120);\nvar width = grid.Columns[0].Width;\nPrint(\"Column width: {0} {1}\", width.Value, width.UnitType);","python":"grid = Grid(1, 2)\ngrid.Columns[0].SetWidthInPixels(120)\nwidth = grid.Columns[0].Width\napi.Print(f\"Column width: {width.Value} {width.UnitType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridLength/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.GridRow","kind":"interface","name":"GridRow","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public interface GridRow","python":"GridRow","summary":"Represents the row of the grid.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1) { ShowGridLines = true, Height = 120 };\nGridRow headerRow = grid.Rows[0];\nheaderRow.SetHeightInPixels(30);\ngrid.Rows[1].SetHeightInStars(1);\ngrid.AddChild(new TextBlock { Text = \"Header\" }, 0, 0);\nChart.AddControl(grid);","python":"grid = Grid(2, 1)\ngrid.ShowGridLines = True\ngrid.Height = 120\nheaderRow = grid.Rows[0]\nheaderRow.SetHeightInPixels(30)\ngrid.Rows[1].SetHeightInStars(1)\nheader = TextBlock()\nheader.Text = \"Header\"\ngrid.AddChild(header, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"M:cAlgo.API.GridRow.SetHeightInPixels(System.Double)","kind":"method","name":"SetHeightInPixels","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"void SetHeightInPixels(double value)","python":"gridRow.SetHeightInPixels(value: float) -> None","summary":"Sets the height of the grid row in pixels.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1);\ngrid.Rows[0].SetHeightInPixels(30);\ngrid.AddChild(new TextBlock { Text = \"Fixed 30 px row\" }, 0, 0);\nChart.AddControl(grid);","python":"grid = Grid(2, 1)\ngrid.Rows[0].SetHeightInPixels(30)\ntextBlock = TextBlock()\ntextBlock.Text = \"Fixed 30 px row\"\ngrid.AddChild(textBlock, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInPixels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInPixels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"M:cAlgo.API.GridRow.SetHeightInStars(System.Double)","kind":"method","name":"SetHeightInStars","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"void SetHeightInStars(double stars)","python":"gridRow.SetHeightInStars(stars: float) -> None","summary":"Sets the height of the grid row in stars.","remarks":null,"parameters":[{"name":"stars","csharpType":"double","pythonType":"float","summary":"The stars."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1) { Height = 150 };\ngrid.Rows[0].SetHeightInStars(1);\ngrid.Rows[1].SetHeightInStars(2);\nChart.AddControl(grid);","python":"grid = Grid(2, 1)\ngrid.Height = 150\ngrid.Rows[0].SetHeightInStars(1)\ngrid.Rows[1].SetHeightInStars(2)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInStars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightInStars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"M:cAlgo.API.GridRow.SetHeightToAuto","kind":"method","name":"SetHeightToAuto","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"void SetHeightToAuto()","python":"gridRow.SetHeightToAuto() -> None","summary":"Sets the height of the grid row to automatic.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1);\ngrid.Rows[0].SetHeightToAuto();\ngrid.AddChild(new TextBlock { Text = \"Sized to content\" }, 0, 0);\nChart.AddControl(grid);","python":"grid = Grid(2, 1)\ngrid.Rows[0].SetHeightToAuto()\ntextBlock = TextBlock()\ntextBlock.Text = \"Sized to content\"\ngrid.AddChild(textBlock, 0, 0)\napi.Chart.AddControl(grid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightToAuto/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/SetHeightToAuto/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"P:cAlgo.API.GridRow.Height","kind":"property","name":"Height","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"GridLength Height {get;}","python":"gridRow.Height: GridLength","summary":"Gets the height of the grid row.","remarks":null,"parameters":[],"returns":{"csharpType":"GridLength","pythonType":"GridLength","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(1, 1);\ngrid.Rows[0].SetHeightInPixels(40);\nPrint(\"Height: {0} {1}\", grid.Rows[0].Height.Value, grid.Rows[0].Height.UnitType);","python":"grid = Grid(1, 1)\ngrid.Rows[0].SetHeightInPixels(40)\napi.Print(f\"Height: {grid.Rows[0].Height.Value} {grid.Rows[0].Height.UnitType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"P:cAlgo.API.GridRow.Index","kind":"property","name":"Index","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"int Index {get;}","python":"gridRow.Index: int","summary":"Gets the grid row index.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(0, 1);\nvar row = grid.AddRow();\ngrid.AddChild(new TextBlock { Text = \"New row\" }, row.Index, 0);\nPrint(\"Row index: {0}\", row.Index);","python":"grid = Grid(0, 1)\nrow = grid.AddRow()\ntextBlock = TextBlock()\ntextBlock.Text = \"New row\"\ngrid.AddChild(textBlock, row.Index, 0)\napi.Print(f\"Row index: {row.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"P:cAlgo.API.GridRow.MaxHeight","kind":"property","name":"MaxHeight","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"double MaxHeight {get; set;}","python":"gridRow.MaxHeight: float","summary":"Gets or sets the maximum height of the grid row.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1);\ngrid.Rows[0].SetHeightToAuto();\ngrid.Rows[0].MaxHeight = 50;\nPrint(\"Maximum height: {0}\", grid.Rows[0].MaxHeight);","python":"grid = Grid(2, 1)\ngrid.Rows[0].SetHeightToAuto()\ngrid.Rows[0].MaxHeight = 50\napi.Print(f\"Maximum height: {grid.Rows[0].MaxHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MaxHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MaxHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"P:cAlgo.API.GridRow.MinHeight","kind":"property","name":"MinHeight","type":"T:cAlgo.API.GridRow","namespace":"cAlgo.API","group":"Grid","csharp":"double MinHeight {get; set;}","python":"gridRow.MinHeight: float","summary":"Gets or sets the minimum height of the grid row.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(2, 1);\ngrid.Rows[1].SetHeightInStars(1);\ngrid.Rows[1].MinHeight = 25;\nPrint(\"Minimum height: {0}\", grid.Rows[1].MinHeight);","python":"grid = Grid(2, 1)\ngrid.Rows[1].SetHeightInStars(1)\ngrid.Rows[1].MinHeight = 25\napi.Print(f\"Minimum height: {grid.Rows[1].MinHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MinHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridRow/MinHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never available in the CLI: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Grid.AddRow, Grid.Rows)."}]}
{"id":"T:cAlgo.API.GridUnitType","kind":"enum","name":"GridUnitType","type":null,"namespace":"cAlgo.API","group":"Grid","csharp":"public enum GridUnitType","python":"GridUnitType","summary":"Represents the type of the grid unit.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use GridUnitType\n    public partial class GridUnitTypeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var grid = new Grid(2, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                ShowGridLines = true,\n            };\n            for (int iRow = 0; iRow < 2; iRow++)\n            {\n                var row = grid.Rows[iRow];\n                SetGridRowLength(row);\n                for (int iColumn = 0; iColumn < 2; iColumn++)\n                {\n                    var column = grid.Columns[iColumn];\n                    SetGridColumnLength(column);\n                    grid.AddChild(new TextBlock\n                    {\n                        Text = string.Format(\"Row {0} and Column {1}\", iRow, iColumn),\n                        Margin = 5,\n                        ForegroundColor = Color.Black,\n                        FontWeight = FontWeight.ExtraBold\n                    }, iRow, iColumn);\n                }\n            }\n            Chart.AddControl(grid);\n        }\n\n        private void SetGridRowLength(GridRow row)\n        {\n            switch (GridRowLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    row.SetHeightToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    row.SetHeightInPixels(GridRowLength);\n                    break;\n\n                case GridUnitType.Star:\n                    row.SetHeightInStars(GridRowLength);\n                    break;\n            }\n        }\n\n        private void SetGridColumnLength(GridColumn column)\n        {\n            switch (GridColumnLengthUnitType)\n            {\n                case GridUnitType.Auto:\n                    column.SetWidthToAuto();\n                    break;\n\n                case GridUnitType.Pixel:\n                    column.SetWidthInPixels(GridColumnLength);\n                    break;\n\n                case GridUnitType.Star:\n                    column.SetWidthInStars(GridColumnLength);\n                    break;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        grid = Grid(2, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n        grid.ShowGridLines = True\n\n        for iRow in range(2):\n            row = grid.Rows[iRow]\n\n            self.set_grid_row_length(row)\n\n            for iColumn in range(2):\n                column = grid.Columns[iColumn]\n\n                self.set_grid_column_length(column)\n\n                textBlock = TextBlock()\n                textBlock.Text = f\"Row {iRow} and Column {iColumn}\"\n                textBlock.Margin = Thickness(5)\n                textBlock.ForegroundColor = Color.Black\n                textBlock.FontWeight = FontWeight.ExtraBold\n\n                grid.AddChild(textBlock, iRow, iColumn)\n\n        api.Chart.AddControl(grid)\n\n    def set_grid_row_length(self, row):\n        match api.GridRowLengthUnitType:\n            case GridUnitType.Auto:\n                row.SetHeightToAuto()\n            case GridUnitType.Pixel:\n                row.SetHeightInPixels(api.GridRowLength)\n            case GridUnitType.Star:\n                row.SetHeightInStars(api.GridRowLength)\n\n    def set_grid_column_length(self, column):\n        match api.GridColumnLengthUnitType:\n            case GridUnitType.Auto:\n                column.SetWidthToAuto()\n            case GridUnitType.Pixel:\n                column.SetWidthInPixels(api.GridColumnLength)\n            case GridUnitType.Star:\n                column.SetWidthInStars(api.GridColumnLength)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"GridRowLength\",\n      \"DisplayName\": \"Grid Row Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridRowLengthUnitType\",\n      \"DisplayName\": \"Grid Row Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    },\n    {\n      \"Name\": \"GridColumnLength\",\n      \"DisplayName\": \"Grid Column Length\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 2\n    },\n    {\n      \"Name\": \"GridColumnLengthUnitType\",\n      \"DisplayName\": \"Grid Column Length Unit Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.GridUnitType\",\n      \"DefaultValue\": \"Auto\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.GridUnitType.Auto","kind":"enum value","name":"Auto","type":"T:cAlgo.API.GridUnitType","namespace":"cAlgo.API","group":"Grid","csharp":"GridUnitType.Auto;","python":"GridUnitType.Auto","summary":"The automatic definition of units for the grid.","remarks":null,"parameters":[],"returns":{"csharpType":"GridUnitType","pythonType":"GridUnitType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.GridUnitType.Pixel","kind":"enum value","name":"Pixel","type":"T:cAlgo.API.GridUnitType","namespace":"cAlgo.API","group":"Grid","csharp":"GridUnitType.Pixel;","python":"GridUnitType.Pixel","summary":"Calculate grid size in pixels.","remarks":null,"parameters":[],"returns":{"csharpType":"GridUnitType","pythonType":"GridUnitType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.GridUnitType.Star","kind":"enum value","name":"Star","type":"T:cAlgo.API.GridUnitType","namespace":"cAlgo.API","group":"Grid","csharp":"GridUnitType.Star;","python":"GridUnitType.Star","summary":"Calculate grid size in stars.","remarks":null,"parameters":[],"returns":{"csharpType":"GridUnitType","pythonType":"GridUnitType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Grid/GridUnitType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.HighMinusLow","kind":"interface","name":"HighMinusLow","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface HighMinusLow","python":"HighMinusLow","summary":"Difference between Bars.HighPrices and Bars.LowPrices calculation for each index","remarks":"This volatility indicator works by calculating the difference between the high and the low of each trendbar. The larger the difference between high and low, the more volatile the market during that period.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Indicators\n{\n    public partial class Example : Indicator\n    {\n        private HighMinusLow _highMinusLow;\n\n        protected override void Initialize()\n        {\n            _highMinusLow = Indicators.HighMinusLow();\n        }\n\n        public override void Calculate(int index)\n        {\n            // same as Bars.HighPrices[index] - Bars.LowPrices[index];\n            Print(\"High minus Low result = {0}\", _highMinusLow.Result[index]);\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.highMinusLow = api.Indicators.HighMinusLow()\n\n    def calculate(self, index):\n        # same as api.Bars.HighPrices[index] - api.Bars.LowPrices[index]\n        api.Print(f\"High minus Low result = {self.highMinusLow.Result[index]}\")","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the High Minus Low indicator\n    public partial class HighMinusLowSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private HighMinusLow _highMinusLow;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _highMinusLow = Indicators.HighMinusLow();\n        }\n\n        protected override void OnBar()\n        {\n            if (_highMinusLow.Result.Last(1) < _highMinusLow.Result.Maximum(10)) return;\n\n            if (Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < Bars.OpenPrices.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass HighMinusLowSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.highMinusLow = api.Indicators.HighMinusLow()\n\n    def on_bar_closed(self):\n        if self.highMinusLow.Result.Last(0) < Functions.Maximum(self.highMinusLow.Result, 10):\n            return\n\n        if api.Bars.ClosePrices.Last(0) > api.Bars.OpenPrices.Last(0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < api.Bars.OpenPrices.Last(0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/HighMinusLow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/HighMinusLow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.HighMinusLow.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.HighMinusLow","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"highMinusLow.Result: IndicatorDataSeries","summary":"The resulting time series of the calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var highMinusLow = Indicators.HighMinusLow();\nPrint(\"High minus Low of the last closed bar = {0}\", highMinusLow.Result.Last(1));","python":"highMinusLow = api.Indicators.HighMinusLow()\napi.Print(f\"High minus Low of the last closed bar = {highMinusLow.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/HighMinusLow/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/HighMinusLow/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HistoricalOrder","kind":"interface","name":"HistoricalOrder","type":null,"namespace":"cAlgo.API","group":"Historical Orders","csharp":"public interface HistoricalOrder","python":"HistoricalOrder","summary":"Represents a historical order.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var historicalOrder = HistoricalOrders.FindLast(\"myLabel\");\nif (historicalOrder == null)\n{\n    Print(\"Order not found\");\n    return;\n}\n\nPrint(\"Id: {0} | OrderType: {1} | TradeType: {2} | Status: {3} | Submitted: {4}\", historicalOrder.Id, historicalOrder.OrderType, historicalOrder.TradeType, historicalOrder.Status, historicalOrder.SubmittedTime);","python":"historicalOrder = api.HistoricalOrders.FindLast(\"myLabel\")\nif historicalOrder is None:\n    api.Print(\"Order not found\")\nelse:\n    api.Print(f\"Id: {historicalOrder.Id} | OrderType: {historicalOrder.OrderType} | TradeType: {historicalOrder.TradeType} | Status: {historicalOrder.Status} | Submitted: {historicalOrder.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Channel","kind":"property","name":"Channel","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"string Channel {get;}","python":"historicalOrder.Channel: str","summary":"Order channel.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order channel: {0}\", order.Channel);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order channel: {order.Channel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Channel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Channel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Orders the cBot sent carry channel 'cBot Console' instead of the desktop 'cBot cTrader'."},{"name":"Cloud","support":"Partial","behaviour":"Orders the cBot sent carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'."}]}
{"id":"P:cAlgo.API.HistoricalOrder.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"string Comment {get;}","python":"historicalOrder.Comment: str","summary":"Order comment.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order comment: {0}\", order.Comment);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order comment: {order.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.ExpirationTime","kind":"property","name":"ExpirationTime","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"DateTime? ExpirationTime {get;}","python":"historicalOrder.ExpirationTime: DateTime | None","summary":"Order expiration time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null && order.ExpirationTime.HasValue)\n    Print(\"Order expiration time: {0}\", order.ExpirationTime.Value);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None and order.ExpirationTime is not None:\n    api.Print(f\"Order expiration time: {order.ExpirationTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/ExpirationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/ExpirationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.FilledQuantity","kind":"property","name":"FilledQuantity","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? FilledQuantity {get;}","python":"historicalOrder.FilledQuantity: float | None","summary":"Order filled quantity (lots).","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null && order.FilledQuantity.HasValue)\n    Print(\"Filled {0} of {1} lots\", order.FilledQuantity.Value, order.Quantity);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None and order.FilledQuantity is not None:\n    api.Print(f\"Filled {order.FilledQuantity} of {order.Quantity} lots\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledQuantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledQuantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.FilledTime","kind":"property","name":"FilledTime","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"DateTime? FilledTime {get;}","python":"historicalOrder.FilledTime: DateTime | None","summary":"Order filled time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null && order.FilledTime.HasValue)\n    Print(\"Order filled after {0}\", order.FilledTime.Value - order.SubmittedTime);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None and order.FilledTime is not None:\n    api.Print(f\"Order filled after {order.FilledTime - order.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.FilledVolumeInUnits","kind":"property","name":"FilledVolumeInUnits","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? FilledVolumeInUnits {get;}","python":"historicalOrder.FilledVolumeInUnits: float | None","summary":"Order filled volume in units.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null && order.FilledVolumeInUnits.HasValue)\n    Print(\"Filled {0} of {1} units\", order.FilledVolumeInUnits.Value, order.VolumeInUnits);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None and order.FilledVolumeInUnits is not None:\n    api.Print(f\"Filled {order.FilledVolumeInUnits} of {order.VolumeInUnits} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledVolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/FilledVolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.HasTrailingStop","kind":"property","name":"HasTrailingStop","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"bool HasTrailingStop {get;}","python":"historicalOrder.HasTrailingStop: bool","summary":"Returns true if order has trailing stop loss.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trailingOrders = HistoricalOrders.Count(order => order.HasTrailingStop);\nPrint(\"Historical orders with trailing stop: {0}\", trailingOrders);","python":"trailingOrders = len([order for order in api.HistoricalOrders if order.HasTrailingStop])\napi.Print(f\"Historical orders with trailing stop: {trailingOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/HasTrailingStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/HasTrailingStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Id","kind":"property","name":"Id","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"long Id {get;}","python":"historicalOrder.Id: int","summary":"Unique order Id.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order Id: {0}\", order.Id);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order Id: {order.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Label","kind":"property","name":"Label","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"string Label {get;}","python":"historicalOrder.Label: str","summary":"Order label.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var labelledOrders = HistoricalOrders.Count(order => order.Label == \"myLabel\");\nPrint(\"Historical myLabel orders: {0}\", labelledOrders);","python":"labelledOrders = len([order for order in api.HistoricalOrders if order.Label == \"myLabel\"])\napi.Print(f\"Historical myLabel orders: {labelledOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Label/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Label/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.OrderType","kind":"property","name":"OrderType","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType OrderType {get;}","python":"historicalOrder.OrderType: HistoricalOrderType","summary":"Order type.","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var limitOrders = HistoricalOrders.Where(order => order.OrderType == HistoricalOrderType.Limit).ToArray();\nPrint(\"Historical limit orders: {0}\", limitOrders.Length);","python":"limitOrders = [order for order in api.HistoricalOrders if order.OrderType == HistoricalOrderType.Limit]\napi.Print(f\"Historical limit orders: {len(limitOrders)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.PositionId","kind":"property","name":"PositionId","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"int? PositionId {get;}","python":"historicalOrder.PositionId: int | None","summary":"Unique position Id.","remarks":null,"parameters":[],"returns":{"csharpType":"int?","pythonType":"int | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null && order.PositionId.HasValue)\n    Print(\"Order opened or modified position {0}\", order.PositionId.Value);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None and order.PositionId is not None:\n    api.Print(f\"Order opened or modified position {order.PositionId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/PositionId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/PositionId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Quantity","kind":"property","name":"Quantity","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double Quantity {get;}","python":"historicalOrder.Quantity: float","summary":"Order quantity (lots).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order quantity: {0} lots\", order.Quantity);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order quantity: {order.Quantity} lots\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Quantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Quantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Status","kind":"property","name":"Status","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus Status {get;}","python":"historicalOrder.Status: HistoricalOrderStatus","summary":"Order status.","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var cancelledOrders = HistoricalOrders.Count(order => order.Status == HistoricalOrderStatus.Cancelled);\nPrint(\"Cancelled orders: {0}\", cancelledOrders);","python":"cancelledOrders = len([order for order in api.HistoricalOrders if order.Status == HistoricalOrderStatus.Cancelled])\napi.Print(f\"Cancelled orders: {cancelledOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Status/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Status/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.StopLoss","kind":"property","name":"StopLoss","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? StopLoss {get;}","python":"historicalOrder.StopLoss: float | None","summary":"Order stop loss in Price.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order stop loss price: {0}\", order.StopLoss);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order stop loss price: {order.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLoss/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLoss/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.StopLossPips","kind":"property","name":"StopLossPips","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? StopLossPips {get;}","python":"historicalOrder.StopLossPips: float | None","summary":"Order stop loss in Pips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order stop loss pips: {0}\", order.StopLossPips);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order stop loss pips: {order.StopLossPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.StopLossTriggerMethod","kind":"property","name":"StopLossTriggerMethod","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"StopTriggerMethod? StopLossTriggerMethod {get;}","python":"historicalOrder.StopLossTriggerMethod: StopTriggerMethod | None","summary":"Trigger method for order's StopLoss","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Stop loss trigger method: {0}\", order.StopLossTriggerMethod);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Stop loss trigger method: {order.StopLossTriggerMethod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopLossTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.StopOrderTriggerMethod","kind":"property","name":"StopOrderTriggerMethod","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"StopTriggerMethod? StopOrderTriggerMethod {get;}","python":"historicalOrder.StopOrderTriggerMethod: StopTriggerMethod | None","summary":"StopOrder trigger method.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in HistoricalOrders.Where(historicalOrder => historicalOrder.OrderType == HistoricalOrderType.Stop))\n    Print(\"Stop order {0} trigger method: {1}\", order.Id, order.StopOrderTriggerMethod);","python":"for order in [historicalOrder for historicalOrder in api.HistoricalOrders if historicalOrder.OrderType == HistoricalOrderType.Stop]:\n    api.Print(f\"Stop order {order.Id} trigger method: {order.StopOrderTriggerMethod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopOrderTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/StopOrderTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.SubmittedTime","kind":"property","name":"SubmittedTime","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"DateTime SubmittedTime {get;}","python":"historicalOrder.SubmittedTime: DateTime","summary":"Order submitted time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order submitted at {0}\", order.SubmittedTime);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order submitted at {order.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SubmittedTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SubmittedTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"Symbol Symbol {get;}","python":"historicalOrder.Symbol: Symbol","summary":"Order symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order symbol {0}, digits {1}\", order.Symbol.Name, order.Symbol.Digits);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order symbol {order.Symbol.Name}, digits {order.Symbol.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"string SymbolName {get;}","python":"historicalOrder.SymbolName: str","summary":"Order symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var eurUsdOrders = HistoricalOrders.Count(order => order.SymbolName == \"EURUSD\");\nPrint(\"Historical EURUSD orders: {0}\", eurUsdOrders);","python":"eurUsdOrders = len([order for order in api.HistoricalOrders if order.SymbolName == \"EURUSD\"])\napi.Print(f\"Historical EURUSD orders: {eurUsdOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.TakeProfit","kind":"property","name":"TakeProfit","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? TakeProfit {get;}","python":"historicalOrder.TakeProfit: float | None","summary":"Order take profit in Price.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order take profit price: {0}\", order.TakeProfit);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order take profit price: {order.TakeProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.TakeProfitPips","kind":"property","name":"TakeProfitPips","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double? TakeProfitPips {get;}","python":"historicalOrder.TakeProfitPips: float | None","summary":"Order take profit in Pips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order take profit pips: {0}\", order.TakeProfitPips);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order take profit pips: {order.TakeProfitPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfitPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TakeProfitPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.TargetPrice","kind":"property","name":"TargetPrice","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double TargetPrice {get;}","python":"historicalOrder.TargetPrice: float","summary":"Order target price","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Order target price: {0}\", order.TargetPrice);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Order target price: {order.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TargetPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TargetPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"TradeType TradeType {get;}","python":"historicalOrder.TradeType: TradeType","summary":"Order Trade type (buy or sell)","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var buyOrders = HistoricalOrders.Count(order => order.TradeType == TradeType.Buy);\nPrint(\"Historical buy orders: {0}\", buyOrders);","python":"buyOrders = len([order for order in api.HistoricalOrders if order.TradeType == TradeType.Buy])\napi.Print(f\"Historical buy orders: {buyOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrder.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.HistoricalOrder","namespace":"cAlgo.API","group":"Historical Orders","csharp":"double VolumeInUnits {get;}","python":"historicalOrder.VolumeInUnits: float","summary":"Order volume in units.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Requested volume: {0} units\", order.VolumeInUnits);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Requested volume: {order.VolumeInUnits} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrder/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HistoricalOrderStatus","kind":"enum","name":"HistoricalOrderStatus","type":null,"namespace":"cAlgo.API","group":"Historical Orders","csharp":"public enum HistoricalOrderStatus","python":"HistoricalOrderStatus","summary":"Represents the status of HistoricalOrder.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in HistoricalOrders)\n{\n    if (order.Status == HistoricalOrderStatus.Filled)\n        Print(\"Order {0} filled at {1}\", order.Id, order.FilledTime);\n    else if (order.Status == HistoricalOrderStatus.Expired || order.Status == HistoricalOrderStatus.Cancelled)\n        Print(\"Order {0} did not fill: {1}\", order.Id, order.Status);\n}","python":"for order in api.HistoricalOrders:\n    if order.Status == HistoricalOrderStatus.Filled:\n        api.Print(f\"Order {order.Id} filled at {order.FilledTime}\")\n    elif order.Status == HistoricalOrderStatus.Expired or order.Status == HistoricalOrderStatus.Cancelled:\n        api.Print(f\"Order {order.Id} did not fill: {order.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Filled","kind":"enum value","name":"Filled","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Filled;","python":"HistoricalOrderStatus.Filled","summary":"Order filled","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Expired","kind":"enum value","name":"Expired","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Expired;","python":"HistoricalOrderStatus.Expired","summary":"Order expired","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Created","kind":"enum value","name":"Created","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Created;","python":"HistoricalOrderStatus.Created","summary":"Order created","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Accepted","kind":"enum value","name":"Accepted","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Accepted;","python":"HistoricalOrderStatus.Accepted","summary":"Order accepted","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Error","kind":"enum value","name":"Error","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Error;","python":"HistoricalOrderStatus.Error","summary":"Order error","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderStatus.Cancelled","kind":"enum value","name":"Cancelled","type":"T:cAlgo.API.HistoricalOrderStatus","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderStatus.Cancelled;","python":"HistoricalOrderStatus.Cancelled","summary":"Order cancelled","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderStatus","pythonType":"HistoricalOrderStatus","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HistoricalOrderType","kind":"enum","name":"HistoricalOrderType","type":null,"namespace":"cAlgo.API","group":"Historical Orders","csharp":"public enum HistoricalOrderType","python":"HistoricalOrderType","summary":"Represents the type of HistoricalOrder.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var stopOuts = HistoricalOrders.Count(order => order.OrderType == HistoricalOrderType.StopOut);\nvar protectionOrders = HistoricalOrders.Count(order => order.OrderType == HistoricalOrderType.StopLossTakeProfit);\nPrint(\"Stop out orders: {0}, stop loss / take profit orders: {1}\", stopOuts, protectionOrders);","python":"stopOuts = len([order for order in api.HistoricalOrders if order.OrderType == HistoricalOrderType.StopOut])\nprotectionOrders = len([order for order in api.HistoricalOrders if order.OrderType == HistoricalOrderType.StopLossTakeProfit])\napi.Print(f\"Stop out orders: {stopOuts}, stop loss / take profit orders: {protectionOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.Limit","kind":"enum value","name":"Limit","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.Limit;","python":"HistoricalOrderType.Limit","summary":"Limit order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.Market","kind":"enum value","name":"Market","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.Market;","python":"HistoricalOrderType.Market","summary":"Market order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.MarketRange","kind":"enum value","name":"MarketRange","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.MarketRange;","python":"HistoricalOrderType.MarketRange","summary":"Market Range order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.MarketOnOpen","kind":"enum value","name":"MarketOnOpen","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.MarketOnOpen;","python":"HistoricalOrderType.MarketOnOpen","summary":"Market on open order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.Stop","kind":"enum value","name":"Stop","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.Stop;","python":"HistoricalOrderType.Stop","summary":"Stop order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.StopOut","kind":"enum value","name":"StopOut","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.StopOut;","python":"HistoricalOrderType.StopOut","summary":"Stop out order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.StopLimit","kind":"enum value","name":"StopLimit","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.StopLimit;","python":"HistoricalOrderType.StopLimit","summary":"Stop limit order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HistoricalOrderType.StopLossTakeProfit","kind":"enum value","name":"StopLossTakeProfit","type":"T:cAlgo.API.HistoricalOrderType","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrderType.StopLossTakeProfit;","python":"HistoricalOrderType.StopLossTakeProfit","summary":"Stop Loss / Take Profit order","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrderType","pythonType":"HistoricalOrderType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HistoricalOrders","kind":"interface","name":"HistoricalOrders","type":null,"namespace":"cAlgo.API","group":"Historical Orders","csharp":"public interface HistoricalOrders","python":"HistoricalOrders","summary":"Provides access to methods of the Historical Orders collection","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"Print(\"Historical orders: {0}\", HistoricalOrders.Count);\nforeach (var historicalOrder in HistoricalOrders)\n    Print(\"Id: {0} | OrderType: {1} | TradeType: {2} | Status: {3}\", historicalOrder.Id, historicalOrder.OrderType, historicalOrder.TradeType, historicalOrder.Status);","python":"api.Print(f\"Historical orders: {api.HistoricalOrders.Count}\")\nfor historicalOrder in api.HistoricalOrders:\n    api.Print(f\"Id: {historicalOrder.Id} | OrderType: {historicalOrder.OrderType} | TradeType: {historicalOrder.TradeType} | Status: {historicalOrder.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindAll(System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder[] FindAll(string label)","python":"api.HistoricalOrders.FindAll(label: str) -> list[HistoricalOrder]","summary":"Finds historical orders by label.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"}],"returns":{"csharpType":"HistoricalOrder[]","pythonType":"list[HistoricalOrder]","summary":"Matching HistoricalOrder(s) or empty array.","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var orders = HistoricalOrders.FindAll(\"myLabel\");\nPrint(\"myLabel orders: {0}, filled: {1}\", orders.Length, orders.Count(order => order.Status == HistoricalOrderStatus.Filled));","python":"orders = api.HistoricalOrders.FindAll(\"myLabel\")\napi.Print(f\"myLabel orders: {len(orders)}, filled: {len([order for order in orders if order.Status == HistoricalOrderStatus.Filled])}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindAll(System.String,System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder[] FindAll(string label, string symbolName)","python":"api.HistoricalOrders.FindAll(label: str, symbolName: str) -> list[HistoricalOrder]","summary":"Finds historical orders by label and symbol name.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Historical order symbol name"}],"returns":{"csharpType":"HistoricalOrder[]","pythonType":"list[HistoricalOrder]","summary":"Matching HistoricalOrder(s) or empty array.","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in HistoricalOrders.FindAll(\"myLabel\", \"EURUSD\"))\n    Print(\"Order {0}: {1} {2}\", order.Id, order.OrderType, order.Status);","python":"for order in api.HistoricalOrders.FindAll(\"myLabel\", \"EURUSD\"):\n    api.Print(f\"Order {order.Id}: {order.OrderType} {order.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindAll(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"FindAll","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder[] FindAll(string label, string symbolName, TradeType tradeType)","python":"api.HistoricalOrders.FindAll(label: str, symbolName: str, tradeType: TradeType) -> list[HistoricalOrder]","summary":"Finds historical orders by label, symbol name, and trade type.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Historical order symbol name"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Historical order trade type"}],"returns":{"csharpType":"HistoricalOrder[]","pythonType":"list[HistoricalOrder]","summary":"Matching HistoricalOrder(s) or empty array.","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var buyOrders = HistoricalOrders.FindAll(\"myLabel\", \"EURUSD\", TradeType.Buy);\nPrint(\"EURUSD buy orders: {0}, total volume: {1}\", buyOrders.Length, buyOrders.Sum(order => order.VolumeInUnits));","python":"buyOrders = api.HistoricalOrders.FindAll(\"myLabel\", \"EURUSD\", TradeType.Buy)\napi.Print(f\"EURUSD buy orders: {len(buyOrders)}, total volume: {sum(order.VolumeInUnits for order in buyOrders)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindById(System.Int32)","kind":"method","name":"FindById","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder FindById(int id)","python":"api.HistoricalOrders.FindById(id: int) -> HistoricalOrder | None","summary":"Finds a historical order by Id.","remarks":null,"parameters":[{"name":"id","csharpType":"int","pythonType":"int","summary":"Historical order Id"}],"returns":{"csharpType":"HistoricalOrder","pythonType":"HistoricalOrder","summary":"HistoricalOrder or null","nullable":true},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"const int orderId = 123456;\nvar order = HistoricalOrders.FindById(orderId);\nif (order != null)\n    Print(\"Order {0} status: {1}\", orderId, order.Status);","python":"orderId = 123456\norder = api.HistoricalOrders.FindById(orderId)\nif order is not None:\n    api.Print(f\"Order {orderId} status: {order.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindById/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindById/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindLast(System.String)","kind":"method","name":"FindLast","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder FindLast(string label)","python":"api.HistoricalOrders.FindLast(label: str) -> HistoricalOrder | None","summary":"Finds last historical order by label.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"}],"returns":{"csharpType":"HistoricalOrder","pythonType":"HistoricalOrder","summary":"HistoricalOrder or null","nullable":true},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\");\nif (order != null)\n    Print(\"Last myLabel order {0} status: {1}\", order.Id, order.Status);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\")\nif order is not None:\n    api.Print(f\"Last myLabel order {order.Id} status: {order.Status}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindLast(System.String,System.String)","kind":"method","name":"FindLast","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder FindLast(string label, string symbolName)","python":"api.HistoricalOrders.FindLast(label: str, symbolName: str) -> HistoricalOrder | None","summary":"Finds last historical order by label and symbol name.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Historical order symbol name"}],"returns":{"csharpType":"HistoricalOrder","pythonType":"HistoricalOrder","summary":"HistoricalOrder or null","nullable":true},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\", \"EURUSD\");\nif (order != null)\n    Print(\"Last EURUSD order {0} submitted at {1}\", order.Id, order.SubmittedTime);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\", \"EURUSD\")\nif order is not None:\n    api.Print(f\"Last EURUSD order {order.Id} submitted at {order.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HistoricalOrders.FindLast(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"FindLast","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder FindLast(string label, string symbolName, TradeType tradeType)","python":"api.HistoricalOrders.FindLast(label: str, symbolName: str, tradeType: TradeType) -> HistoricalOrder | None","summary":"Finds last historical order by label, symbol name, and trade type.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Historical order label"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Historical order symbol name"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Historical order trade type"}],"returns":{"csharpType":"HistoricalOrder","pythonType":"HistoricalOrder","summary":"HistoricalOrder or null","nullable":true},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var order = HistoricalOrders.FindLast(\"myLabel\", \"EURUSD\", TradeType.Sell);\nif (order != null)\n    Print(\"Last EURUSD sell order {0} type: {1}\", order.Id, order.OrderType);","python":"order = api.HistoricalOrders.FindLast(\"myLabel\", \"EURUSD\", TradeType.Sell)\nif order is not None:\n    api.Print(f\"Last EURUSD sell order {order.Id} type: {order.OrderType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrders.Count","kind":"property","name":"Count","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"int Count {get;}","python":"api.HistoricalOrders.Count: int","summary":"Returns count of historical orders.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"Print(\"Historical orders: {0}\", HistoricalOrders.Count);","python":"api.Print(f\"Historical orders: {api.HistoricalOrders.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalOrders.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.HistoricalOrders","namespace":"cAlgo.API","group":"Historical Orders","csharp":"HistoricalOrder Item {get;}","python":"api.HistoricalOrders[index: int] -> HistoricalOrder","summary":"Access historical orders by their index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"HistoricalOrder","pythonType":"HistoricalOrder","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (HistoricalOrders.Count > 0)\n    Print(\"First historical order Id: {0}\", HistoricalOrders[0].Id);","python":"if api.HistoricalOrders.Count > 0:\n    api.Print(f\"First historical order Id: {api.HistoricalOrders[0].Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrders/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HistoricalTrade","kind":"interface","name":"HistoricalTrade","type":null,"namespace":"cAlgo.API","group":"History","csharp":"public interface HistoricalTrade","python":"HistoricalTrade","summary":"Represents the historical trade interface.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastTenTrades = History.OrderByDescending(trade => trade.ClosingTime).Take(10);\nforeach (var trade in lastTenTrades)\n    Print(\"{0} {1} {2} units, opened {3}, closed {4}, net profit {5}\", trade.SymbolName, trade.TradeType, trade.VolumeInUnits, trade.EntryTime, trade.ClosingTime, trade.NetProfit);","python":"lastTenTrades = sorted(api.History, key=lambda trade: trade.ClosingTime, reverse=True)[:10]\nfor trade in lastTenTrades:\n    api.Print(f\"{trade.SymbolName} {trade.TradeType} {trade.VolumeInUnits} units, opened {trade.EntryTime}, closed {trade.ClosingTime}, net profit {trade.NetProfit}\")"},{"csharp":"protected override void OnStart()\n{\n    Positions.Closed += OnPositionsClosed;\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    var trade = History.FindByPositionId(args.Position.Id).LastOrDefault();\n    if (trade != null)\n        Print(\"Trade closed at {0}, pips {1}, balance {2}\", trade.ClosingPrice, trade.Pips, trade.Balance);\n}","python":"def on_start(self):\n    api.Positions.Closed += self.on_positions_closed\n\ndef on_positions_closed(self, args):\n    trades = api.History.FindByPositionId(args.Position.Id)\n    if len(trades) > 0:\n        trade = trades[len(trades) - 1]\n        api.Print(f\"Trade closed at {trade.ClosingPrice}, pips {trade.Pips}, balance {trade.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Balance","kind":"property","name":"Balance","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double Balance {get;}","python":"historicalTrade.Balance: float","summary":"Account balance after the Deal was filled","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Balance after the trade: {0}\", trade.Balance);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Balance after the trade: {trade.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Balance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Balance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Channel","kind":"property","name":"Channel","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"string Channel {get;}","python":"historicalTrade.Channel: str","summary":"Gets the channel via which the trade was executed in a string format.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.LastOrDefault();\nif (trade != null)\n    Print(\"Last trade channel: {0}\", trade.Channel);","python":"if api.History.Count > 0:\n    api.Print(f\"Last trade channel: {api.History[api.History.Count - 1].Channel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Channel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Channel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Trades the cBot made carry channel 'cBot Console' instead of the desktop 'cBot cTrader'."},{"name":"Cloud","support":"Partial","behaviour":"Trades the cBot made carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'."}]}
{"id":"P:cAlgo.API.HistoricalTrade.ClosingDeal","kind":"property","name":"ClosingDeal","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"Deal ClosingDeal {get;}","python":"historicalTrade.ClosingDeal: Deal","summary":"Gets the closing deal.","remarks":null,"parameters":[],"returns":{"csharpType":"Deal","pythonType":"Deal","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal {0} executed at {1}\", trade.ClosingDeal.Id, trade.ClosingDeal.ExecutionPrice);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal {trade.ClosingDeal.Id} executed at {trade.ClosingDeal.ExecutionPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingDeal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingDeal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.ClosingDealId","kind":"property","name":"ClosingDealId","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"int ClosingDealId {get;}","python":"historicalTrade.ClosingDealId: int","summary":"Gets the unique closing deal identifier.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing deal Id: {0}\", trade.ClosingDealId);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing deal Id: {trade.ClosingDealId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingDealId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingDealId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.ClosingPrice","kind":"property","name":"ClosingPrice","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double ClosingPrice {get;}","python":"historicalTrade.ClosingPrice: float","summary":"The execution price of the Closing Deal.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closing price: {0}\", trade.ClosingPrice);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closing price: {trade.ClosingPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.ClosingTime","kind":"property","name":"ClosingTime","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"DateTime ClosingTime {get;}","python":"historicalTrade.ClosingTime: DateTime","summary":"Time of the Closing Deal.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var todayTrades = History.Where(trade => trade.ClosingTime.Date == Server.Time.Date).ToArray();\nPrint(\"Trades closed today: {0}\", todayTrades.Length);","python":"todayTrades = [trade for trade in api.History if trade.ClosingTime.Date == api.Server.Time.Date]\napi.Print(f\"Trades closed today: {len(todayTrades)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/ClosingTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"string Comment {get;}","python":"historicalTrade.Comment: str","summary":"The comment.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Trade comment: {0}\", trade.Comment);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Trade comment: {trade.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Commissions","kind":"property","name":"Commissions","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double Commissions {get;}","python":"historicalTrade.Commissions: float","summary":"Commission owed.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var totalCommissions = History.Sum(trade => trade.Commissions);\nPrint(\"Total commissions: {0}\", totalCommissions);","python":"totalCommissions = sum(trade.Commissions for trade in api.History)\napi.Print(f\"Total commissions: {totalCommissions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Commissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Commissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.EntryPrice","kind":"property","name":"EntryPrice","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double EntryPrice {get;}","python":"historicalTrade.EntryPrice: float","summary":"The VWAP (Volume Weighted Average Price) of the Opening Deals that are closed.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Entry price {0}, closing price {1}\", trade.EntryPrice, trade.ClosingPrice);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Entry price {trade.EntryPrice}, closing price {trade.ClosingPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/EntryPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/EntryPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.EntryTime","kind":"property","name":"EntryTime","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"DateTime EntryTime {get;}","python":"historicalTrade.EntryTime: DateTime","summary":"Time of the Opening Deal, or the time of the first Opening deal that was closed.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Trade duration: {0}\", trade.ClosingTime - trade.EntryTime);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Trade duration: {trade.ClosingTime - trade.EntryTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/EntryTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/EntryTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.GrossProfit","kind":"property","name":"GrossProfit","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double GrossProfit {get;}","python":"historicalTrade.GrossProfit: float","summary":"Profit and loss before swaps and commission","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grossProfit = History.Sum(trade => trade.GrossProfit);\nPrint(\"Total gross profit: {0}\", grossProfit);","python":"grossProfit = sum(trade.GrossProfit for trade in api.History)\napi.Print(f\"Total gross profit: {grossProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/GrossProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/GrossProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Label","kind":"property","name":"Label","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"string Label {get;}","python":"historicalTrade.Label: str","summary":"The label.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var labelProfit = History.Where(trade => trade.Label == \"myLabel\").Sum(trade => trade.NetProfit);\nPrint(\"Net profit of myLabel trades: {0}\", labelProfit);","python":"labelProfit = sum(trade.NetProfit for trade in api.History if trade.Label == \"myLabel\")\napi.Print(f\"Net profit of myLabel trades: {labelProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Label/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Label/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.NetProfit","kind":"property","name":"NetProfit","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double NetProfit {get;}","python":"historicalTrade.NetProfit: float","summary":"Profit and loss including swaps and commissions","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var winners = History.Count(trade => trade.NetProfit > 0);\nPrint(\"Winning trades: {0} of {1}\", winners, History.Count);","python":"winners = len([trade for trade in api.History if trade.NetProfit > 0])\napi.Print(f\"Winning trades: {winners} of {api.History.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/NetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/NetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Pips","kind":"property","name":"Pips","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double Pips {get;}","python":"historicalTrade.Pips: float","summary":"Represents the winning or loosing pips","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var totalPips = History.Sum(trade => trade.Pips);\nPrint(\"Total pips: {0}\", totalPips);","python":"totalPips = sum(trade.Pips for trade in api.History)\napi.Print(f\"Total pips: {totalPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Pips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Pips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.PositionId","kind":"property","name":"PositionId","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"int PositionId {get;}","python":"historicalTrade.PositionId: int","summary":"Gets the position unique identifier.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Trade belongs to position {0}\", trade.PositionId);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Trade belongs to position {trade.PositionId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/PositionId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/PositionId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Quantity","kind":"property","name":"Quantity","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double Quantity {get;}","python":"historicalTrade.Quantity: float","summary":"The Quantity (in lots) that was closed by the Closing Deal","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closed quantity: {0} lots\", trade.Quantity);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closed quantity: {trade.Quantity} lots\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Quantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Quantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Swap","kind":"property","name":"Swap","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double Swap {get;}","python":"historicalTrade.Swap: float","summary":"Swap is the overnight interest rate if any, accrued on the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var totalSwap = History.Sum(trade => trade.Swap);\nPrint(\"Total swap: {0}\", totalSwap);","python":"totalSwap = sum(trade.Swap for trade in api.History)\napi.Print(f\"Total swap: {totalSwap}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Swap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Swap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"Symbol Symbol {get;}","python":"historicalTrade.Symbol: Symbol","summary":"Gets the trade symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Trade symbol {0}, current bid {1}\", trade.Symbol.Name, trade.Symbol.Bid);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Trade symbol {trade.Symbol.Name}, current bid {trade.Symbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"string SymbolName {get;}","python":"historicalTrade.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var eurUsdTrades = History.Where(trade => trade.SymbolName == \"EURUSD\").ToArray();\nPrint(\"EURUSD trades: {0}\", eurUsdTrades.Length);","python":"eurUsdTrades = [trade for trade in api.History if trade.SymbolName == \"EURUSD\"]\napi.Print(f\"EURUSD trades: {len(eurUsdTrades)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"TradeType TradeType {get;}","python":"historicalTrade.TradeType: TradeType","summary":"The TradeType of the Opening Deal.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyTrades = History.Count(trade => trade.TradeType == TradeType.Buy);\nPrint(\"Closed buy trades: {0}\", buyTrades);","python":"buyTrades = len([trade for trade in api.History if trade.TradeType == TradeType.Buy])\napi.Print(f\"Closed buy trades: {buyTrades}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"double VolumeInUnits {get;}","python":"historicalTrade.VolumeInUnits: float","summary":"The Volume that was closed by the Closing Deal.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Closed volume: {0} units\", trade.VolumeInUnits);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Closed volume: {trade.VolumeInUnits} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.SymbolCode","kind":"property","name":"SymbolCode","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"string SymbolCode {get;}","python":"historicalTrade.SymbolCode: str","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use SymbolName instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HistoricalTrade.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.HistoricalTrade","namespace":"cAlgo.API","group":"History","csharp":"long Volume {get;}","python":"historicalTrade.Volume: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/HistoricalTrade/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.HistoricalVolatility","kind":"interface","name":"HistoricalVolatility","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface HistoricalVolatility","python":"HistoricalVolatility","summary":"The measured price fluctuation over a specified time period.","remarks":"The higher the values of the indicator, the more volatile an instrument is.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private HistoricalVolatility historicalVolatility;\n\nprivate const int BarHistory = 252;\n\nprotected override void Initialize()\n{\n    historicalVolatility = Indicators.HistoricalVolatility\n        (Bars.ClosePrices, Period, BarHistory);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.historicalVolatility = api.Indicators.HistoricalVolatility(api.Bars.ClosePrices, api.Period, 252)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Historical Volatility indicator\n    public partial class HistoricalVolatilitySample : Robot\n    {\n        private double _volumeInUnits;\n\n        private HistoricalVolatility _historicalVolatility;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _historicalVolatility = Indicators.HistoricalVolatility(Bars.ClosePrices, 14, 252);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_historicalVolatility.Result.Last(1) < _historicalVolatility.Result.Maximum(14)) return;\n\n            if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) < _simpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) > _simpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass HistoricalVolatilitySample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.historicalVolatility = api.Indicators.HistoricalVolatility(api.Bars.ClosePrices, 14, 252)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 9)\n\n    def on_bar_closed(self):\n        if self.historicalVolatility.Result.Last(0) < Functions.Maximum(self.historicalVolatility.Result, 14):\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.simpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) < self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.simpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) > self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/HistoricalVolatility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/HistoricalVolatility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.HistoricalVolatility.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.HistoricalVolatility","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"historicalVolatility.Result: IndicatorDataSeries","summary":"The result of the HistoricalVolatility Indicator","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var historicalVolatility = Indicators.HistoricalVolatility(Bars.ClosePrices, 14, 252);\nPrint(\"Historical Volatility = {0}\", historicalVolatility.Result.Last(1));","python":"historicalVolatility = api.Indicators.HistoricalVolatility(api.Bars.ClosePrices, 14, 252)\napi.Print(f\"Historical Volatility = {historicalVolatility.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/HistoricalVolatility/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/HistoricalVolatility/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.History","kind":"interface","name":"History","type":null,"namespace":"cAlgo.API","group":"History","csharp":"public interface History","python":"History","summary":"Provides access to methods of the historical trades collection","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trades = History.FindAll(\"myLabel\", SymbolName);\nvar winners = trades.Count(trade => trade.NetProfit > 0);\nPrint(\"Trades: {0}, winners: {1}, net profit: {2}\", trades.Length, winners, trades.Sum(trade => trade.NetProfit));","python":"trades = api.History.FindAll(\"myLabel\", api.SymbolName)\nwinners = len([trade for trade in trades if trade.NetProfit > 0])\napi.Print(f\"Trades: {len(trades)}, winners: {winners}, net profit: {sum(trade.NetProfit for trade in trades)}\")"},{"csharp":"foreach (var trade in History.OrderByDescending(historicalTrade => historicalTrade.ClosingTime).Take(10))\n    Print(\"{0} {1} closed at {2}, net profit {3}\", trade.SymbolName, trade.TradeType, trade.ClosingTime, trade.NetProfit);","python":"for trade in sorted(api.History, key=lambda trade: trade.ClosingTime, reverse=True)[:10]:\n    api.Print(f\"{trade.SymbolName} {trade.TradeType} closed at {trade.ClosingTime}, net profit {trade.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindAll(System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindAll(string label)","python":"api.History.FindAll(label: str) -> list[HistoricalTrade]","summary":"Find all historical trades by the label","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trades = History.FindAll(\"myLabel\");\nPrint(\"myLabel trades: {0}, net profit: {1}\", trades.Length, trades.Sum(trade => trade.NetProfit));","python":"trades = api.History.FindAll(\"myLabel\")\napi.Print(f\"myLabel trades: {len(trades)}, net profit: {sum(trade.NetProfit for trade in trades)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindAll(System.String,System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindAll(string label, string symbolName)","python":"api.History.FindAll(label: str, symbolName: str) -> list[HistoricalTrade]","summary":"Find all historical trades by label, symbol name","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trades = History.FindAll(\"myLabel\", \"EURUSD\");\nPrint(\"EURUSD trades: {0}, pips: {1}\", trades.Length, trades.Sum(trade => trade.Pips));","python":"trades = api.History.FindAll(\"myLabel\", \"EURUSD\")\napi.Print(f\"EURUSD trades: {len(trades)}, pips: {sum(trade.Pips for trade in trades)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindAll(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"FindAll","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindAll(string label, string symbolName, TradeType tradeType)","python":"api.History.FindAll(label: str, symbolName: str, tradeType: TradeType) -> list[HistoricalTrade]","summary":"Find all historical trades by label, symbol name and trade type","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type to search by"}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sellTrades = History.FindAll(\"myLabel\", \"EURUSD\", TradeType.Sell);\nPrint(\"EURUSD sell trades: {0}, net profit: {1}\", sellTrades.Length, sellTrades.Sum(trade => trade.NetProfit));","python":"sellTrades = api.History.FindAll(\"myLabel\", \"EURUSD\", TradeType.Sell)\napi.Print(f\"EURUSD sell trades: {len(sellTrades)}, net profit: {sum(trade.NetProfit for trade in sellTrades)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindByClosingDealId(System.Int32)","kind":"method","name":"FindByClosingDealId","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindByClosingDealId(int closingDealId)","python":"api.History.FindByClosingDealId(closingDealId: int) -> HistoricalTrade | None","summary":"Find HistoricalTrade by closing deal Id.","remarks":null,"parameters":[{"name":"closingDealId","csharpType":"int","pythonType":"int","summary":"HistoricalTrade closing deal Id"}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"HistoricalTrade if found otherwise null.","nullable":true},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"const int closingDealId = 1234567;\nvar trade = History.FindByClosingDealId(closingDealId);\nif (trade != null)\n    Print(\"Deal {0} closed position {1} with net profit {2}\", closingDealId, trade.PositionId, trade.NetProfit);","python":"closingDealId = 1234567\ntrade = api.History.FindByClosingDealId(closingDealId)\nif trade is not None:\n    api.Print(f\"Deal {closingDealId} closed position {trade.PositionId} with net profit {trade.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindByClosingDealId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindByClosingDealId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindByPositionId(System.Int32)","kind":"method","name":"FindByPositionId","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindByPositionId(int positionId)","python":"api.History.FindByPositionId(positionId: int) -> list[HistoricalTrade]","summary":"Find all historical trades related to a position.","remarks":null,"parameters":[{"name":"positionId","csharpType":"int","pythonType":"int","summary":"Position ID"}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"const int positionId = 342343;\nforeach (var trade in History.FindByPositionId(positionId))\n    Print(\"Closed {0} units at {1}, net profit {2}\", trade.VolumeInUnits, trade.ClosingPrice, trade.NetProfit);","python":"positionId = 342343\nfor trade in api.History.FindByPositionId(positionId):\n    api.Print(f\"Closed {trade.VolumeInUnits} units at {trade.ClosingPrice}, net profit {trade.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindByPositionId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindByPositionId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindLast(System.String)","kind":"method","name":"FindLast","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindLast(string label)","python":"api.History.FindLast(label: str) -> HistoricalTrade","summary":"Find last historical trade by its label","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\");\nif (trade != null)\n    Print(\"Last myLabel trade net profit: {0}\", trade.NetProfit);","python":"trade = api.History.FindLast(\"myLabel\")\nif trade is not None:\n    api.Print(f\"Last myLabel trade net profit: {trade.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindLast(System.String,System.String)","kind":"method","name":"FindLast","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindLast(string label, string symbolName)","python":"api.History.FindLast(label: str, symbolName: str) -> HistoricalTrade","summary":"Find last historical trade by its label, symbol name","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trade = History.FindLast(\"myLabel\", \"EURUSD\");\nif (trade != null)\n    Print(\"Last EURUSD trade closed at {0}\", trade.ClosingTime);","python":"trade = api.History.FindLast(\"myLabel\", \"EURUSD\")\nif trade is not None:\n    api.Print(f\"Last EURUSD trade closed at {trade.ClosingTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindLast(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"FindLast","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindLast(string label, string symbolName, TradeType tradeType)","python":"api.History.FindLast(label: str, symbolName: str, tradeType: TradeType) -> HistoricalTrade","summary":"Find last historical trade by its label, symbol name and trade type","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type to search by"}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastBuy = History.FindLast(\"myLabel\", \"EURUSD\", TradeType.Buy);\nif (lastBuy != null && lastBuy.NetProfit < 0)\n    Print(\"Last EURUSD buy was a loss of {0}\", lastBuy.NetProfit);","python":"lastBuy = api.History.FindLast(\"myLabel\", \"EURUSD\", TradeType.Buy)\nif lastBuy is not None and lastBuy.NetProfit < 0:\n    api.Print(f\"Last EURUSD buy was a loss of {lastBuy.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/FindLast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.History.Count","kind":"property","name":"Count","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"int Count {get;}","python":"api.History.Count: int","summary":"Total number of historical trades","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Historical trades: {0}\", History.Count);","python":"api.Print(f\"Historical trades: {api.History.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.History.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade Item {get;}","python":"api.History[index: int] -> HistoricalTrade","summary":"Find a historical trade by index","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"the index in the list"}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (History.Count > 0)\n    Print(\"First trade net profit: {0}\", History[0].NetProfit);","python":"if api.History.Count > 0:\n    api.Print(f\"First trade net profit: {api.History[0].NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindLast(System.String,cAlgo.API.Internals.Symbol)","kind":"method","name":"FindLast","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindLast(string label, Symbol symbol)","python":"api.History.FindLast(label: str, symbol: Symbol) -> HistoricalTrade","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindLast(System.String,cAlgo.API.Internals.Symbol,cAlgo.API.TradeType)","kind":"method","name":"FindLast","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade FindLast(string label, Symbol symbol, TradeType tradeType)","python":"api.History.FindLast(label: str, symbol: Symbol, tradeType: TradeType) -> HistoricalTrade","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""}],"returns":{"csharpType":"HistoricalTrade","pythonType":"HistoricalTrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindAll(System.String,cAlgo.API.Internals.Symbol)","kind":"method","name":"FindAll","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindAll(string label, Symbol symbol)","python":"api.History.FindAll(label: str, symbol: Symbol) -> list[HistoricalTrade]","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.History.FindAll(System.String,cAlgo.API.Internals.Symbol,cAlgo.API.TradeType)","kind":"method","name":"FindAll","type":"T:cAlgo.API.History","namespace":"cAlgo.API","group":"History","csharp":"HistoricalTrade[] FindAll(string label, Symbol symbol, TradeType tradeType)","python":"api.History.FindAll(label: str, symbol: Symbol, tradeType: TradeType) -> list[HistoricalTrade]","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""}],"returns":{"csharpType":"HistoricalTrade[]","pythonType":"list[HistoricalTrade]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/History/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HorizontalAlignment","kind":"enum","name":"HorizontalAlignment","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum HorizontalAlignment","python":"HorizontalAlignment","summary":"Describes horizontal position related to an anchor point or a parent element","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock\n{\n    Text = \"Top right corner\",\n    HorizontalAlignment = HorizontalAlignment.Right,\n    VerticalAlignment = VerticalAlignment.Top\n};\n\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Top right corner\"\ntextBlock.HorizontalAlignment = HorizontalAlignment.Right\ntextBlock.VerticalAlignment = VerticalAlignment.Top\n\napi.Chart.AddControl(textBlock)"},{"csharp":"Chart.DrawStaticText(\"info\", \"Centered at the bottom\", VerticalAlignment.Bottom, HorizontalAlignment.Center, Color.Yellow);","python":"api.Chart.DrawStaticText(\"info\", \"Centered at the bottom\", VerticalAlignment.Bottom, HorizontalAlignment.Center, Color.Yellow)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HorizontalAlignment.Center","kind":"enum value","name":"Center","type":"T:cAlgo.API.HorizontalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"HorizontalAlignment.Center;","python":"HorizontalAlignment.Center","summary":"Center horizontal alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HorizontalAlignment.Left","kind":"enum value","name":"Left","type":"T:cAlgo.API.HorizontalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"HorizontalAlignment.Left;","python":"HorizontalAlignment.Left","summary":"Left horizontal alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HorizontalAlignment.Right","kind":"enum value","name":"Right","type":"T:cAlgo.API.HorizontalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"HorizontalAlignment.Right;","python":"HorizontalAlignment.Right","summary":"Right horizontal alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HorizontalAlignment.Stretch","kind":"enum value","name":"Stretch","type":"T:cAlgo.API.HorizontalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"HorizontalAlignment.Stretch;","python":"HorizontalAlignment.Stretch","summary":"Stretch horizontal alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"HorizontalAlignment","pythonType":"HorizontalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/HorizontalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HotkeyArgs","kind":"class","name":"HotkeyArgs","type":null,"namespace":"cAlgo.API","group":"Hotkeys","csharp":"public class HotkeyArgs","python":"HotkeyArgs","summary":"Provides data for Plugin Hotkeys handler.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Hotkeys.TryAdd(Key.S, ModifierKeys.Control | ModifierKeys.Shift, OnHotkey);\n}\n\nprivate void OnHotkey(HotkeyArgs args)\n{\n    Print(\"Hotkey pressed: {0} + {1}\", args.Modifiers, args.Key);\n}","python":"from System import Action\n\ndef on_start(self):\n    api.Hotkeys.TryAdd(Key.S, ModifierKeys.Control | ModifierKeys.Shift, Action[HotkeyArgs](self.on_hotkey))\n\ndef on_hotkey(self, args):\n    api.Print(f\"Hotkey pressed: {args.Modifiers} + {args.Key}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.HotkeyArgs.Key","kind":"property","name":"Key","type":"T:cAlgo.API.HotkeyArgs","namespace":"cAlgo.API","group":"Hotkeys","csharp":"public Key Key {get;}","python":"hotkeyArgs.Key: Key","summary":"Keyboard key","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Hotkeys.TryAdd(Key.F2, args => Print(\"Key pressed: {0}\", args.Key));","python":"from System import Action\napi.Hotkeys.TryAdd(Key.F2, Action[HotkeyArgs](lambda args: api.Print(f\"Key pressed: {args.Key}\")))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.HotkeyArgs.Modifiers","kind":"property","name":"Modifiers","type":"T:cAlgo.API.HotkeyArgs","namespace":"cAlgo.API","group":"Hotkeys","csharp":"public ModifierKeys Modifiers {get;}","python":"hotkeyArgs.Modifiers: ModifierKeys","summary":"Modifiers key that was used with the Key","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Hotkeys.TryAdd(Key.B, ModifierKeys.Alt, args => Print(\"Modifiers: {0}\", args.Modifiers));","python":"from System import Action\napi.Hotkeys.TryAdd(Key.B, ModifierKeys.Alt, Action[HotkeyArgs](lambda args: api.Print(f\"Modifiers: {args.Modifiers}\")))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/Modifiers/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/HotkeyArgs/Modifiers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Hotkeys","kind":"interface","name":"Hotkeys","type":null,"namespace":"cAlgo.API","group":"Hotkeys","csharp":"public interface Hotkeys","python":"Hotkeys","summary":"Provides access to Hotkeys API for plugins.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins;\n\npublic partial class HotkeysTest : Plugin\n{\n    protected override void OnStart()\n    {\n        var panel = new StackPanel { Orientation = Orientation.Vertical };\n\n        var addHotkeyWithModifierButton = new Button { Text = \"Add Hotkey R+Alt\" };\n\n        addHotkeyWithModifierButton.Click += args =>\n        {\n            Print($\"Hotkey add result: {Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, HotkeyHandler)}\");\n        };\n\n        var removeHotkeyWithModifierButton = new Button { Text = \"Remove Hotkey R+Alt\" };\n\n        removeHotkeyWithModifierButton.Click += args =>\n        {\n            Print($\"Hotkey remove result: {Hotkeys.Remove(Key.R, ModifierKeys.Alt)}\");\n        };\n\n        var addHotkeyWithoutModifierButton = new Button { Text = \"Add Hotkey Q\" };\n\n        addHotkeyWithoutModifierButton.Click += args =>\n        {\n            Print($\"Hotkey add result: {Hotkeys.TryAdd(Key.Q, HotkeyHandler)}\");\n        };\n\n        var removeHotkeyWithoutModifierButton = new Button { Text = \"Remove Hotkey Q\" };\n\n        removeHotkeyWithoutModifierButton.Click += args =>\n        {\n            Print($\"Hotkey add result: {Hotkeys.Remove(Key.Q)}\");\n        };\n\n        var cleanButton = new Button { Text = \"Clear Hotkeys\" };\n\n        cleanButton.Click += args =>\n        {\n            Hotkeys.Clear();\n        };\n\n        panel.AddChild(addHotkeyWithModifierButton);\n        panel.AddChild(removeHotkeyWithModifierButton);\n\n        panel.AddChild(addHotkeyWithoutModifierButton);\n        panel.AddChild(removeHotkeyWithoutModifierButton);\n\n        panel.AddChild(cleanButton);\n\n        var block = Asp.SymbolTab.AddBlock(\"Hotkeys\");\n\n        block.Child = panel;\n    }\n\n    private void HotkeyHandler(HotkeyArgs args)\n    {\n        Print($\"Hotkey triggered: {args.Key} + {args.Modifiers}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action\n\nclass Test():\n    def on_start(self):\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        addHotkeyWithModifierButton = Button()\n        addHotkeyWithModifierButton.Text = \"Add Hotkey R+Alt\"\n        addHotkeyWithModifierButton.Click += lambda args: print(f\"Hotkey add result: {api.Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, Action[HotkeyArgs](self.hotkey_handler))}\")\n\n        removeHotkeyWithModifierButton = Button()\n        removeHotkeyWithModifierButton.Text = \"Remove Hotkey R+Alt\"\n        removeHotkeyWithModifierButton.Click += lambda args: print(f\"Hotkey remove result: {api.Hotkeys.Remove(Key.R, ModifierKeys.Alt)}\")\n\n        addHotkeyWithoutModifierButton = Button()\n        addHotkeyWithoutModifierButton.Text = \"Add Hotkey Q\"\n        addHotkeyWithoutModifierButton.Click += lambda args: print(f\"Hotkey add result: {api.Hotkeys.TryAdd(Key.Q, Action[HotkeyArgs](self.hotkey_handler))}\")\n\n        removeHotkeyWithoutModifierButton = Button()\n        removeHotkeyWithoutModifierButton.Text = \"Remove Hotkey Q\"\n        removeHotkeyWithoutModifierButton.Click += lambda args: print(f\"Hotkey add result: {api.Hotkeys.Remove(Key.Q)}\")\n\n        cleanButton = Button()\n        cleanButton.Text = \"Clear Hotkeys\"\n        cleanButton.Click += lambda args: api.Hotkeys.Clear()\n\n        panel.AddChild(addHotkeyWithModifierButton)\n        panel.AddChild(removeHotkeyWithModifierButton)\n        panel.AddChild(addHotkeyWithoutModifierButton)\n        panel.AddChild(removeHotkeyWithoutModifierButton)\n        panel.AddChild(cleanButton)\n\n        block = api.Asp.SymbolTab.AddBlock(\"Hotkeys\")\n        block.Child = panel\n\n    def hotkey_handler(self, args):\n        print(f\"Hotkey triggered: {args.Key} + {args.Modifiers}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Hotkeys.Clear","kind":"method","name":"Clear","type":"T:cAlgo.API.Hotkeys","namespace":"cAlgo.API","group":"Hotkeys","csharp":"void Clear()","python":"api.Hotkeys.Clear() -> None","summary":"Clears all added hotkeys.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStop()\n{\n    Hotkeys.Clear();\n    Print(\"All plugin hotkeys removed\");\n}","python":"def on_stop(self):\n    api.Hotkeys.Clear()\n    api.Print(\"All plugin hotkeys removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Clear/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Clear/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Hotkeys.Remove(cAlgo.API.Key)","kind":"method","name":"Remove","type":"T:cAlgo.API.Hotkeys","namespace":"cAlgo.API","group":"Hotkeys","csharp":"bool Remove(Key key)","python":"api.Hotkeys.Remove(key: Key) -> bool","summary":"Removes an hotkey.","remarks":null,"parameters":[{"name":"key","csharpType":"Key","pythonType":"Key","summary":"Main Key"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Hotkeys.TryAdd(Key.F9, args => Print(\"F9 pressed\"));\nPrint(\"Hotkey F9 removed: {0}\", Hotkeys.Remove(Key.F9));","python":"from System import Action\napi.Hotkeys.TryAdd(Key.F9, Action[HotkeyArgs](lambda args: api.Print(\"F9 pressed\")))\napi.Print(f\"Hotkey F9 removed: {api.Hotkeys.Remove(Key.F9)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Hotkeys.Remove(cAlgo.API.Key,cAlgo.API.ModifierKeys)","kind":"method","name":"Remove","type":"T:cAlgo.API.Hotkeys","namespace":"cAlgo.API","group":"Hotkeys","csharp":"bool Remove(Key key, ModifierKeys modifiers)","python":"api.Hotkeys.Remove(key: Key, modifiers: ModifierKeys) -> bool","summary":"Removes an hotkey.","remarks":null,"parameters":[{"name":"key","csharpType":"Key","pythonType":"Key","summary":"Main Key"},{"name":"modifiers","csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"The modifier key"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, args => Print(\"Alt+R pressed\"));\nPrint(\"Hotkey Alt+R removed: {0}\", Hotkeys.Remove(Key.R, ModifierKeys.Alt));","python":"from System import Action\napi.Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, Action[HotkeyArgs](lambda args: api.Print(\"Alt+R pressed\")))\napi.Print(f\"Hotkey Alt+R removed: {api.Hotkeys.Remove(Key.R, ModifierKeys.Alt)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Hotkeys.TryAdd(cAlgo.API.Key,System.Action{cAlgo.API.HotkeyArgs})","kind":"method","name":"TryAdd","type":"T:cAlgo.API.Hotkeys","namespace":"cAlgo.API","group":"Hotkeys","csharp":"bool TryAdd(Key key, Action<HotkeyArgs> handler)","python":"api.Hotkeys.TryAdd(key: Key, handler: Callable[[HotkeyArgs], None]) -> bool","summary":"Adds a new hotkey.","remarks":null,"parameters":[{"name":"key","csharpType":"Key","pythonType":"Key","summary":"Main Key"},{"name":"handler","csharpType":"Action<HotkeyArgs>","pythonType":"Callable[[HotkeyArgs], None]","summary":"Handler action"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var isAdded = Hotkeys.TryAdd(Key.F9, args => Print(\"F9 pressed at {0}\", Server.Time));\nPrint(\"Hotkey F9 added: {0}\", isAdded);","python":"from System import Action\nisAdded = api.Hotkeys.TryAdd(Key.F9, Action[HotkeyArgs](lambda args: api.Print(f\"F9 pressed at {api.Server.Time}\")))\napi.Print(f\"Hotkey F9 added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/TryAdd/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/TryAdd/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Hotkeys.TryAdd(cAlgo.API.Key,cAlgo.API.ModifierKeys,System.Action{cAlgo.API.HotkeyArgs})","kind":"method","name":"TryAdd","type":"T:cAlgo.API.Hotkeys","namespace":"cAlgo.API","group":"Hotkeys","csharp":"bool TryAdd(Key key, ModifierKeys modifiers, Action<HotkeyArgs> handler)","python":"api.Hotkeys.TryAdd(key: Key, modifiers: ModifierKeys, handler: Callable[[HotkeyArgs], None]) -> bool","summary":"Adds a new hotkey.","remarks":null,"parameters":[{"name":"key","csharpType":"Key","pythonType":"Key","summary":"Main Key"},{"name":"modifiers","csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"The modifier key"},{"name":"handler","csharpType":"Action<HotkeyArgs>","pythonType":"Callable[[HotkeyArgs], None]","summary":"Handler action"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var isAdded = Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, args => Print(\"Hotkey {0}+{1} pressed\", args.Modifiers, args.Key));\nPrint(\"Hotkey Alt+R added: {0}\", isAdded);","python":"from System import Action\nisAdded = api.Hotkeys.TryAdd(Key.R, ModifierKeys.Alt, Action[HotkeyArgs](lambda args: api.Print(f\"Hotkey {args.Modifiers}+{args.Key} pressed\")))\napi.Print(f\"Hotkey Alt+R added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/TryAdd/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Hotkeys/Hotkeys/TryAdd/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Http","kind":"interface","name":"Http","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public interface Http","python":"Http","summary":"The Https interface contains the methods necessary for sending HTTP requests.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var response = Http.Get(\"https://api.restful-api.dev/objects\");\n\n        if (!response.IsSuccessful)\n        {\n            Print(\"HTTP request failed\");\n            return;\n        }\n\n        Print(response.Body);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        response = api.Http.Get(\"https://api.restful-api.dev/objects\")\n\n        if response.IsSuccessful == False:\n            print(\"HTTP request failed\")\n            return\n\n        print(response.Body)","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var request = new HttpRequest(new(\"https://api.restful-api.dev/objects\"));\n\n        request.Headers.Add(\"Authorization\", \"Bearer token\");\n\n        var response = Http.Send(request);\n\n        if (!response.IsSuccessful)\n        {\n            Print(\"HTTP request failed\");\n            return;\n        }\n\n        Print(response.Body);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\nfrom System import Uri\n\nclass Test():\n    def on_start(self):\n        request = HttpRequest(Uri(\"https://api.restful-api.dev/objects\"))\n        request.Headers.Add(\"Authorization\", \"Bearer token\")\n\n        response = api.Http.Send(request)\n\n        if response.IsSuccessful == False:\n            print(\"HTTP request failed\")\n            return\n\n        print(response.Body)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.Get(System.Uri)","kind":"method","name":"Get","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpResponse Get(Uri uri)","python":"api.Http.Get(uri: Uri) -> HttpResponse","summary":"Performs a GET request to the specified URI.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"The URI that the GET request should be made to."}],"returns":{"csharpType":"HttpResponse","pythonType":"HttpResponse","summary":"The HttpResponse object representing the result of the request.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(new Uri(\"https://api.example.com/quotes/EURUSD\"));\nif (response.IsSuccessful)\n    Print(response.Body);\nelse\n    Print(\"Request failed with status code {0}\", response.StatusCode);","python":"from System import Uri\n\nresponse = api.Http.Get(Uri(\"https://api.example.com/quotes/EURUSD\"))\nif response.IsSuccessful:\n    api.Print(response.Body)\nelse:\n    api.Print(f\"Request failed with status code {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.Get(System.String)","kind":"method","name":"Get","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpResponse Get(string uri)","python":"api.Http.Get(uri: str) -> HttpResponse","summary":"Performs a GET request to the specified URI.","remarks":null,"parameters":[{"name":"uri","csharpType":"string","pythonType":"str","summary":"The string containing the URI that the GET request should be made to."}],"returns":{"csharpType":"HttpResponse","pythonType":"HttpResponse","summary":"The HttpResponse object representing the result of the request.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nif (response.IsSuccessful)\n    Print(response.Body);\nelse\n    Print(\"Request failed with status code {0}\", response.StatusCode);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nif response.IsSuccessful:\n    api.Print(response.Body)\nelse:\n    api.Print(f\"Request failed with status code {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.GetAsync(System.Uri,System.Action{cAlgo.API.HttpResponse})","kind":"method","name":"GetAsync","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"void GetAsync(Uri uri, Action<HttpResponse> callback)","python":"api.Http.GetAsync(uri: Uri, callback: Callable[[HttpResponse], None]) -> None","summary":"Performs a GET request to the specified URI asynchronously.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"The URI that the GET request should be made to."},{"name":"callback","csharpType":"Action<HttpResponse>","pythonType":"Callable[[HttpResponse], None]","summary":"The method to be invoked when the request is being sent."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var uri = new Uri(\"https://api.example.com/quotes/EURUSD\");\nHttp.GetAsync(uri, response => Print(\"Status: {0} | Body: {1}\", response.StatusCode, response.Body));","python":"from System import Uri\n\nuri = Uri(\"https://api.example.com/quotes/EURUSD\")\napi.Http.GetAsync(uri, lambda response: api.Print(f\"Status: {response.StatusCode} | Body: {response.Body}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/GetAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/GetAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.GetAsync(System.String,System.Action{cAlgo.API.HttpResponse})","kind":"method","name":"GetAsync","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"void GetAsync(string uri, Action<HttpResponse> callback)","python":"api.Http.GetAsync(uri: str, callback: Callable[[HttpResponse], None]) -> None","summary":"Performs a GET request to the specified URI asynchronously.","remarks":null,"parameters":[{"name":"uri","csharpType":"string","pythonType":"str","summary":"The string containing the URI that the GET request should be made to."},{"name":"callback","csharpType":"Action<HttpResponse>","pythonType":"Callable[[HttpResponse], None]","summary":"The method to be invoked when the request is being sent."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Http.GetAsync(\"https://api.example.com/quotes/EURUSD\", response =>\n{\n    if (response.IsSuccessful)\n        Print(response.Body);\n});","python":"api.Http.GetAsync(\"https://api.example.com/quotes/EURUSD\", lambda response: api.Print(response.Body) if response.IsSuccessful else None)"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/GetAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/GetAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.Send(cAlgo.API.HttpRequest)","kind":"method","name":"Send","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpResponse Send(HttpRequest request)","python":"api.Http.Send(request: HttpRequest) -> HttpResponse","summary":"Performs a request to the specified URI. The request method depends on the value of the request.Method property.","remarks":null,"parameters":[{"name":"request","csharpType":"HttpRequest","pythonType":"HttpRequest","summary":"The HttpRequest object representing the request contents."}],"returns":{"csharpType":"HttpResponse","pythonType":"HttpResponse","summary":"The HttpResponse object representing the result of the request.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/signals\"))\n{\n    Method = HttpMethod.Post,\n    Body = \"EURUSD buy\"\n};\nvar response = Http.Send(request);\nPrint(\"Status code: {0}\", response.StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/signals\"))\nrequest.Method = HttpMethod.Post\nrequest.Body = \"EURUSD buy\"\nresponse = api.Http.Send(request)\napi.Print(f\"Status code: {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Send/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Send/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"M:cAlgo.API.Http.SendAsync(cAlgo.API.HttpRequest,System.Action{cAlgo.API.HttpResponse})","kind":"method","name":"SendAsync","type":"T:cAlgo.API.Http","namespace":"cAlgo.API","group":"HTTP","csharp":"void SendAsync(HttpRequest request, Action<HttpResponse> callback)","python":"api.Http.SendAsync(request: HttpRequest, callback: Callable[[HttpResponse], None]) -> None","summary":"Performs a request to the specified URI. The request method depends on the value of the request.Method property.","remarks":null,"parameters":[{"name":"request","csharpType":"HttpRequest","pythonType":"HttpRequest","summary":"The HttpRequest object representing the request contents."},{"name":"callback","csharpType":"Action<HttpResponse>","pythonType":"Callable[[HttpResponse], None]","summary":"The method to be invoked when the request is being sent."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/signals\"))\n{\n    Method = HttpMethod.Post,\n    Body = \"EURUSD buy\"\n};\nHttp.SendAsync(request, response => Print(\"Signal sent: {0}\", response.IsSuccessful));","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/signals\"))\nrequest.Method = HttpMethod.Post\nrequest.Body = \"EURUSD buy\"\napi.Http.SendAsync(request, lambda response: api.Print(f\"Signal sent: {response.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/SendAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/Http/SendAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown."}]}
{"id":"T:cAlgo.API.HttpException","kind":"class","name":"HttpException","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public sealed class HttpException : Exception","python":"HttpException","summary":"Represents errors that may occur during HTTP request","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes\");\nif (!response.IsSuccessful && response.Exception != null)\n    Print(\"HTTP request failed: {0}\", response.Exception.Message);","python":"response = api.Http.Get(\"https://api.example.com/quotes\")\nif not response.IsSuccessful and response.Exception is not None:\n    api.Print(f\"HTTP request failed: {response.Exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpException/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpMethod","kind":"enum","name":"HttpMethod","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public enum HttpMethod","python":"HttpMethod","summary":"An enumeration of different HTTP Methods.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/orders/42\")) { Method = HttpMethod.Delete };\nvar response = Http.Send(request);\nPrint(\"{0} request status code: {1}\", request.Method, response.StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/orders/42\"))\nrequest.Method = HttpMethod.Delete\nresponse = api.Http.Send(request)\napi.Print(f\"{request.Method} request status code: {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Get","kind":"enum value","name":"Get","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Get;","python":"HttpMethod.Get","summary":"Represents an HTTP GET protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Post","kind":"enum value","name":"Post","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Post;","python":"HttpMethod.Post","summary":"Represents an HTTP POST protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Delete","kind":"enum value","name":"Delete","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Delete;","python":"HttpMethod.Delete","summary":"Represents an HTTP DELETE protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Put","kind":"enum value","name":"Put","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Put;","python":"HttpMethod.Put","summary":"Represents an HTTP PUT protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Patch","kind":"enum value","name":"Patch","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Patch;","python":"HttpMethod.Patch","summary":"Represents the HTTP PATCH protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Head","kind":"enum value","name":"Head","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Head;","python":"HttpMethod.Head","summary":"Represents an HTTP HEAD protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Options","kind":"enum value","name":"Options","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Options;","python":"HttpMethod.Options","summary":"Represents an HTTP OPTIONS protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpMethod.Trace","kind":"enum value","name":"Trace","type":"T:cAlgo.API.HttpMethod","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpMethod.Trace;","python":"HttpMethod.Trace","summary":"Represents an HTTP TRACE protocol method.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpRequest","kind":"class","name":"HttpRequest","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public sealed class HttpRequest","python":"HttpRequest","summary":"The class representing an HTTP request.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/orders\"))\n{\n    Method = HttpMethod.Post,\n    Body = \"{\\\"symbol\\\": \\\"EURUSD\\\", \\\"volume\\\": 10000}\",\n    Timeout = TimeSpan.FromSeconds(10)\n};\nrequest.Headers.Add(\"Content-Type\", \"application/json\");\n\nvar response = Http.Send(request);\nPrint(\"Status code: {0} | Body: {1}\", response.StatusCode, response.Body);","python":"from System import Uri, TimeSpan\n\nrequest = HttpRequest(Uri(\"https://api.example.com/orders\"))\nrequest.Method = HttpMethod.Post\nrequest.Body = '{\"symbol\": \"EURUSD\", \"volume\": 10000}'\nrequest.Timeout = TimeSpan.FromSeconds(10)\nrequest.Headers.Add(\"Content-Type\", \"application/json\")\n\nresponse = api.Http.Send(request)\napi.Print(f\"Status code: {response.StatusCode} | Body: {response.Body}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequest.#ctor(System.Uri)","kind":"constructor","name":"HttpRequest","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpRequest(Uri uri)","python":"HttpRequest(uri: Uri)","summary":"The default class constructor.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes/EURUSD\"));\nvar response = Http.Send(request);\nPrint(\"Status code: {0}\", response.StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes/EURUSD\"))\nresponse = api.Http.Send(request)\napi.Print(f\"Status code: {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Body","kind":"property","name":"Body","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public string Body {get; set;}","python":"httpRequest.Body: str","summary":"Gets or sets the request body. If a GET, TRACE, HEAD, CONNECT, and OPTIONS request is performed, the value of this property is ignored.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/signals\")) { Method = HttpMethod.Post };\nrequest.Body = \"{\\\"symbol\\\": \\\"EURUSD\\\", \\\"side\\\": \\\"buy\\\"}\";\nrequest.Headers.Add(\"Content-Type\", \"application/json\");\nPrint(\"Status code: {0}\", Http.Send(request).StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/signals\"))\nrequest.Method = HttpMethod.Post\nrequest.Body = '{\"symbol\": \"EURUSD\", \"side\": \"buy\"}'\nrequest.Headers.Add(\"Content-Type\", \"application/json\")\napi.Print(f\"Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Body/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Body/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Headers","kind":"property","name":"Headers","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpRequestHeaders Headers {get;}","python":"httpRequest.Headers: HttpRequestHeaders","summary":"Gets the request headers.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpRequestHeaders","pythonType":"HttpRequestHeaders","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/account\"));\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\");\nrequest.Headers.Add(\"Accept\", \"application/json\");\nPrint(\"Status code: {0}\", Http.Send(request).StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/account\"))\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\")\nrequest.Headers.Add(\"Accept\", \"application/json\")\napi.Print(f\"Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Headers/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Headers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Method","kind":"property","name":"Method","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpMethod Method {get; set;}","python":"httpRequest.Method: HttpMethod","summary":"Gets or sets the request method. The default value is Get.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpMethod","pythonType":"HttpMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/orders/42\")) { Method = HttpMethod.Delete };\nPrint(\"{0} status code: {1}\", request.Method, Http.Send(request).StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/orders/42\"))\nrequest.Method = HttpMethod.Delete\napi.Print(f\"{request.Method} status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Method/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Method/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Timeout","kind":"property","name":"Timeout","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public TimeSpan Timeout {get; set;}","python":"httpRequest.Timeout: TimeSpan","summary":"Gets or sets the request timeout. The default value is 100,000 milliseconds (100 seconds).","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\")) { Timeout = TimeSpan.FromSeconds(5) };\nvar response = Http.Send(request);\nif (!response.IsSuccessful)\n    Print(\"Request failed or timed out after {0}\", request.Timeout);","python":"from System import Uri, TimeSpan\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Timeout = TimeSpan.FromSeconds(5)\nresponse = api.Http.Send(request)\nif not response.IsSuccessful:\n    api.Print(f\"Request failed or timed out after {request.Timeout}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Timeout/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Timeout/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Uri","kind":"property","name":"Uri","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public Uri Uri {get;}","python":"httpRequest.Uri: Uri","summary":"Gets or sets the request URI.","remarks":null,"parameters":[],"returns":{"csharpType":"Uri","pythonType":"Uri","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes/EURUSD\"));\nPrint(\"Host: {0} | Path: {1}\", request.Uri.Host, request.Uri.AbsolutePath);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes/EURUSD\"))\napi.Print(f\"Host: {request.Uri.Host} | Path: {request.Uri.AbsolutePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Uri/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Uri/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.Version","kind":"property","name":"Version","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public Version Version {get; set;}","python":"httpRequest.Version: Version","summary":"Gets or sets the request version. The default value is 2.0.","remarks":null,"parameters":[],"returns":{"csharpType":"Version","pythonType":"Version","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\")) { Version = new Version(1, 1) };\nPrint(\"HTTP version: {0} | Status code: {1}\", request.Version, Http.Send(request).StatusCode);","python":"from System import Uri, Version\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Version = Version(1, 1)\napi.Print(f\"HTTP version: {request.Version} | Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Version/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/Version/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpRequest.VersionPolicy","kind":"property","name":"VersionPolicy","type":"T:cAlgo.API.HttpRequest","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpVersionPolicy VersionPolicy {get; set;}","python":"httpRequest.VersionPolicy: HttpVersionPolicy","summary":"Gets or sets the request version policy. The default value is RequestVersionOrLower .","remarks":null,"parameters":[],"returns":{"csharpType":"HttpVersionPolicy","pythonType":"HttpVersionPolicy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\"))\n{\n    Version = new Version(2, 0),\n    VersionPolicy = HttpVersionPolicy.RequestVersionExact\n};\nPrint(\"Status code: {0}\", Http.Send(request).StatusCode);","python":"from System import Uri, Version\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Version = Version(2, 0)\nrequest.VersionPolicy = HttpVersionPolicy.RequestVersionExact\napi.Print(f\"Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/VersionPolicy/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequest/VersionPolicy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpRequestHeaders","kind":"class","name":"HttpRequestHeaders","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public sealed class HttpRequestHeaders","python":"HttpRequestHeaders","summary":"The class that represents an HTTP request headers collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/account\"));\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\");\nrequest.Headers.Add(\"Accept\", \"application/json\");\nforeach (var header in request.Headers)\n    Print(\"{0}: {1}\", header.Key, header.Value);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/account\"))\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\")\nrequest.Headers.Add(\"Accept\", \"application/json\")\nfor header in request.Headers:\n    api.Print(f\"{header.Key}: {header.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequestHeaders.Add(System.String,System.String)","kind":"method","name":"Add","type":"T:cAlgo.API.HttpRequestHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public void Add(string name, string value)","python":"httpRequestHeaders.Add(name: str, value: str) -> None","summary":"Adds a new header.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The Header name"},{"name":"value","csharpType":"string","pythonType":"str","summary":"The Header value"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/account\"));\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\");\nPrint(\"Status code: {0}\", Http.Send(request).StatusCode);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/account\"))\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\")\napi.Print(f\"Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequestHeaders.GetEnumerator","kind":"method","name":"GetEnumerator","type":"T:cAlgo.API.HttpRequestHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public IEnumerator<KeyValuePair<string, string>> GetEnumerator()","python":"httpRequestHeaders.GetEnumerator() -> IEnumerator[KeyValuePair[str, str]]","summary":"Returns an enumerator that iterates through HttpRequestHeaders .","remarks":null,"parameters":[],"returns":{"csharpType":"IEnumerator<KeyValuePair<string, string>>","pythonType":"IEnumerator[KeyValuePair[str, str]]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\"));\nrequest.Headers.Add(\"Accept\", \"application/json\");\nusing var enumerator = request.Headers.GetEnumerator();\nwhile (enumerator.MoveNext())\n    Print(\"{0}: {1}\", enumerator.Current.Key, enumerator.Current.Value);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Headers.Add(\"Accept\", \"application/json\")\nenumerator = request.Headers.GetEnumerator()\nwhile enumerator.MoveNext():\n    api.Print(f\"{enumerator.Current.Key}: {enumerator.Current.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/GetEnumerator/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/GetEnumerator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequestHeaders.GetValue(System.String)","kind":"method","name":"GetValue","type":"T:cAlgo.API.HttpRequestHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public string GetValue(string name)","python":"httpRequestHeaders.GetValue(name: str) -> str","summary":"Returns an existing header value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The Header name"}],"returns":{"csharpType":"string","pythonType":"str","summary":"The Header value if the header is successfully found; otherwise, an empty string.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\"));\nrequest.Headers.Add(\"Accept\", \"application/json\");\nPrint(\"Accept: {0}\", request.Headers.GetValue(\"Accept\"));","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Headers.Add(\"Accept\", \"application/json\")\napi.Print(f\"Accept: {request.Headers.GetValue('Accept')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/GetValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/GetValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequestHeaders.Remove(System.String)","kind":"method","name":"Remove","type":"T:cAlgo.API.HttpRequestHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public bool Remove(string name)","python":"httpRequestHeaders.Remove(name: str) -> bool","summary":"Removes an existing header.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Header name"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"true if the header is successfully found and removed; otherwise, false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\"));\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\");\nvar removed = request.Headers.Remove(\"Authorization\");\nPrint(\"Authorization header removed: {0}\", removed);","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Headers.Add(\"Authorization\", \"Bearer my-token\")\nremoved = request.Headers.Remove(\"Authorization\")\napi.Print(f\"Authorization header removed: {removed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpRequestHeaders.Update(System.String,System.String)","kind":"method","name":"Update","type":"T:cAlgo.API.HttpRequestHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public void Update(string name, string value)","python":"httpRequestHeaders.Update(name: str, value: str) -> None","summary":"Updates an existing header.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The Header name"},{"name":"value","csharpType":"string","pythonType":"str","summary":"The new Header value"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/account\"));\nrequest.Headers.Add(\"Accept\", \"text/plain\");\nrequest.Headers.Update(\"Accept\", \"application/json\");\nPrint(\"Accept: {0}\", request.Headers.GetValue(\"Accept\"));","python":"from System import Uri\n\nrequest = HttpRequest(Uri(\"https://api.example.com/account\"))\nrequest.Headers.Add(\"Accept\", \"text/plain\")\nrequest.Headers.Update(\"Accept\", \"application/json\")\napi.Print(f\"Accept: {request.Headers.GetValue('Accept')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Update/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpRequestHeaders/Update/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpResponse","kind":"class","name":"HttpResponse","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public sealed class HttpResponse","python":"HttpResponse","summary":"The class representing an HTTP response.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nif (response.IsSuccessful)\n    Print(\"Status: {0} | Content type: {1} | Body: {2}\", response.StatusCode, response.Headers.GetValue(\"Content-Type\"), response.Body);\nelse\n    Print(\"Request failed: {0}\", response.Exception?.Message);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nif response.IsSuccessful:\n    api.Print(f\"Status: {response.StatusCode} | Content type: {response.Headers.GetValue('Content-Type')} | Body: {response.Body}\")\nelif response.Exception is not None:\n    api.Print(f\"Request failed: {response.Exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpResponse.Body","kind":"property","name":"Body","type":"T:cAlgo.API.HttpResponse","namespace":"cAlgo.API","group":"HTTP","csharp":"public string Body {get;}","python":"httpResponse.Body: str","summary":"Gets the body of the response.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nif (response.IsSuccessful)\n    Print(\"Response body: {0}\", response.Body);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nif response.IsSuccessful:\n    api.Print(f\"Response body: {response.Body}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Body/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Body/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpResponse.Exception","kind":"property","name":"Exception","type":"T:cAlgo.API.HttpResponse","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpException Exception {get;}","python":"httpResponse.Exception: HttpException","summary":"Gets the exception thrown when sending HTTP request.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpException","pythonType":"HttpException","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nif (response.Exception != null)\n    Print(\"Request error: {0}\", response.Exception.Message);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nif response.Exception is not None:\n    api.Print(f\"Request error: {response.Exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Exception/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Exception/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpResponse.Headers","kind":"property","name":"Headers","type":"T:cAlgo.API.HttpResponse","namespace":"cAlgo.API","group":"HTTP","csharp":"public HttpResponseHeaders Headers {get;}","python":"httpResponse.Headers: HttpResponseHeaders","summary":"Gets the headers contained in the response.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpResponseHeaders","pythonType":"HttpResponseHeaders","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nforeach (var header in response.Headers)\n    Print(\"{0}: {1}\", header.Key, header.Value);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nfor header in response.Headers:\n    api.Print(f\"{header.Key}: {header.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Headers/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/Headers/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpResponse.IsSuccessful","kind":"property","name":"IsSuccessful","type":"T:cAlgo.API.HttpResponse","namespace":"cAlgo.API","group":"HTTP","csharp":"public bool IsSuccessful {get;}","python":"httpResponse.IsSuccessful: bool","summary":"Gets true if the response is successful, false otherwise.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nPrint(\"Request successful: {0}\", response.IsSuccessful);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\napi.Print(f\"Request successful: {response.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/IsSuccessful/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/IsSuccessful/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.HttpResponse.StatusCode","kind":"property","name":"StatusCode","type":"T:cAlgo.API.HttpResponse","namespace":"cAlgo.API","group":"HTTP","csharp":"public int StatusCode {get;}","python":"httpResponse.StatusCode: int","summary":"Gets the response status code.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nif (response.StatusCode == 404)\n    Print(\"Quote not found\");","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nif response.StatusCode == 404:\n    api.Print(\"Quote not found\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/StatusCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponse/StatusCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpResponseHeaders","kind":"class","name":"HttpResponseHeaders","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public sealed class HttpResponseHeaders","python":"HttpResponseHeaders","summary":"The class that represents an HTTP response headers collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nPrint(\"Content type: {0}\", response.Headers.GetValue(\"Content-Type\"));\nforeach (var header in response.Headers)\n    Print(\"{0}: {1}\", header.Key, header.Value);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\napi.Print(f\"Content type: {response.Headers.GetValue('Content-Type')}\")\nfor header in response.Headers:\n    api.Print(f\"{header.Key}: {header.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpResponseHeaders.GetEnumerator","kind":"method","name":"GetEnumerator","type":"T:cAlgo.API.HttpResponseHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public IEnumerator<KeyValuePair<string, string>> GetEnumerator()","python":"httpResponseHeaders.GetEnumerator() -> IEnumerator[KeyValuePair[str, str]]","summary":"Returns an enumerator that iterates through HttpResponseHeaders .","remarks":null,"parameters":[],"returns":{"csharpType":"IEnumerator<KeyValuePair<string, string>>","pythonType":"IEnumerator[KeyValuePair[str, str]]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nusing var enumerator = response.Headers.GetEnumerator();\nwhile (enumerator.MoveNext())\n    Print(\"{0}: {1}\", enumerator.Current.Key, enumerator.Current.Value);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\nenumerator = response.Headers.GetEnumerator()\nwhile enumerator.MoveNext():\n    api.Print(f\"{enumerator.Current.Key}: {enumerator.Current.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetEnumerator/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetEnumerator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.HttpResponseHeaders.GetValue(System.String)","kind":"method","name":"GetValue","type":"T:cAlgo.API.HttpResponseHeaders","namespace":"cAlgo.API","group":"HTTP","csharp":"public string GetValue(string name)","python":"httpResponseHeaders.GetValue(name: str) -> str","summary":"Returns an existing header value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The Header name"}],"returns":{"csharpType":"string","pythonType":"str","summary":"The Header value if the header is successfully found; otherwise, an empty string.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://api.example.com/quotes/EURUSD\");\nvar contentType = response.Headers.GetValue(\"Content-Type\");\nif (contentType.Contains(\"json\"))\n    Print(\"JSON response: {0}\", response.Body);","python":"response = api.Http.Get(\"https://api.example.com/quotes/EURUSD\")\ncontentType = response.Headers.GetValue(\"Content-Type\")\nif \"json\" in contentType:\n    api.Print(f\"JSON response: {response.Body}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpResponseHeaders/GetValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.HttpVersionPolicy","kind":"enum","name":"HttpVersionPolicy","type":null,"namespace":"cAlgo.API","group":"HTTP","csharp":"public enum HttpVersionPolicy","python":"HttpVersionPolicy","summary":"An enumeration of different HTTP version policies.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var request = new HttpRequest(new Uri(\"https://api.example.com/quotes\"))\n{\n    Version = new Version(2, 0),\n    VersionPolicy = HttpVersionPolicy.RequestVersionOrLower\n};\nPrint(\"Status code: {0}\", Http.Send(request).StatusCode);","python":"from System import Uri, Version\n\nrequest = HttpRequest(Uri(\"https://api.example.com/quotes\"))\nrequest.Version = Version(2, 0)\nrequest.VersionPolicy = HttpVersionPolicy.RequestVersionOrLower\napi.Print(f\"Status code: {api.Http.Send(request).StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpVersionPolicy.RequestVersionOrLower","kind":"enum value","name":"RequestVersionOrLower","type":"T:cAlgo.API.HttpVersionPolicy","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpVersionPolicy.RequestVersionOrLower;","python":"HttpVersionPolicy.RequestVersionOrLower","summary":"Use the requested version or downgrade to a lower one. This is the default behavior.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpVersionPolicy","pythonType":"HttpVersionPolicy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpVersionPolicy.RequestVersionOrHigher","kind":"enum value","name":"RequestVersionOrHigher","type":"T:cAlgo.API.HttpVersionPolicy","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpVersionPolicy.RequestVersionOrHigher;","python":"HttpVersionPolicy.RequestVersionOrHigher","summary":"Use the highest available version, downgrading only to the requested version but not below.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpVersionPolicy","pythonType":"HttpVersionPolicy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.HttpVersionPolicy.RequestVersionExact","kind":"enum value","name":"RequestVersionExact","type":"T:cAlgo.API.HttpVersionPolicy","namespace":"cAlgo.API","group":"HTTP","csharp":"HttpVersionPolicy.RequestVersionExact;","python":"HttpVersionPolicy.RequestVersionExact","summary":"Only use the requested version.","remarks":null,"parameters":[],"returns":{"csharpType":"HttpVersionPolicy","pythonType":"HttpVersionPolicy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/","markdown":"https://help.ctrader.com/ctrader-algo/references/HTTP/HttpVersionPolicy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.HullMovingAverage","kind":"interface","name":"HullMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface HullMovingAverage","python":"HullMovingAverage","summary":"The Hull Moving Average (HMA) is a directional trend indicator. It captures the current state of the market and uses recent price action to determine if conditions are bullish or bearish relative to historical data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var hullMovingAverage = Indicators.HullMovingAverage(Bars.ClosePrices, 9);\nPrint(\"Hull Moving Average: {0}\", hullMovingAverage.Result.Last(1));","python":"hullMovingAverage = api.Indicators.HullMovingAverage(api.Bars.ClosePrices, 9)\napi.Print(f\"Hull Moving Average: {hullMovingAverage.Result.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Hull Moving Average indicator\n    public partial class HullMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private HullMovingAverage _fastHull;\n\n        private HullMovingAverage _slowHull;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastHull = Indicators.HullMovingAverage(FastMaSource, FastMaPeriod);\n            _slowHull = Indicators.HullMovingAverage(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastHull.Result.HasCrossedAbove(_slowHull.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastHull.Result.HasCrossedBelow(_slowHull.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass HullMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastHull = api.Indicators.HullMovingAverage(api.FastMaSource, api.FastMaPeriod)\n        self.slowHull = api.Indicators.HullMovingAverage(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastHull.Result, self.slowHull.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastHull.Result, self.slowHull.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/HullMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/HullMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.IAccount","kind":"interface","name":"IAccount","type":null,"namespace":"cAlgo.API.Internals","group":"Account","csharp":"public interface IAccount","python":"IAccount","summary":"Contains the current account information.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Balance: {0} {1}\", Account.Balance, Account.Asset.Name);\nPrint(\"Equity: {0}, Margin: {1}, Free margin: {2}\", Account.Equity, Account.Margin, Account.FreeMargin);\n// Margin Level = Equity / Margin * 100, null when no margin is used\nif (Account.MarginLevel.HasValue)\n    Print(\"Margin level: {0}%\", Account.MarginLevel.Value);","python":"api.Print(f\"Balance: {api.Account.Balance} {api.Account.Asset.Name}\")\napi.Print(f\"Equity: {api.Account.Equity}, Margin: {api.Account.Margin}, Free margin: {api.Account.FreeMargin}\")\n# Margin Level = Equity / Margin * 100, None when no margin is used\nif api.Account.MarginLevel is not None:\n    api.Print(f\"Margin level: {api.Account.MarginLevel}%\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Account object properties to get your trading account data\n    public partial class AccountSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var grid = new Grid(16, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 5);\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n\n            grid.AddChild(new TextBlock { Text = \"Account Info\", Style = style, HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock { Text = \"Type\", Style = style }, 1, 0);\n            grid.AddChild(new TextBlock { Text = Account.AccountType.ToString(), Style = style }, 1, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Is Live\", Style = style }, 2, 0);\n            grid.AddChild(new TextBlock { Text = Account.IsLive.ToString(), Style = style }, 2, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Balance\", Style = style }, 3, 0);\n            grid.AddChild(new TextBlock { Text = Account.Balance.ToString(), Style = style }, 3, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Broker Name\", Style = style }, 4, 0);\n            grid.AddChild(new TextBlock { Text = Account.BrokerName, Style = style }, 4, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Currency\", Style = style }, 5, 0);\n            grid.AddChild(new TextBlock { Text = Account.Asset.Name, Style = style }, 5, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Number\", Style = style }, 6, 0);\n            grid.AddChild(new TextBlock { Text = Account.Number.ToString(), Style = style }, 6, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Equity\", Style = style }, 7, 0);\n            grid.AddChild(new TextBlock { Text = Account.Equity.ToString(), Style = style }, 7, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Free Margin\", Style = style }, 8, 0);\n            grid.AddChild(new TextBlock { Text = Account.FreeMargin.ToString(), Style = style }, 8, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Margin\", Style = style }, 9, 0);\n            grid.AddChild(new TextBlock { Text = Account.Margin.ToString(), Style = style }, 9, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Margin Level\", Style = style }, 10, 0);\n            grid.AddChild(new TextBlock { Text = Account.MarginLevel.ToString(), Style = style }, 10, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Precise Leverage\", Style = style }, 11, 0);\n            grid.AddChild(new TextBlock { Text = Account.PreciseLeverage.ToString(), Style = style }, 11, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Stop Out Level\", Style = style }, 12, 0);\n            grid.AddChild(new TextBlock { Text = Account.StopOutLevel.ToString(), Style = style }, 12, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Unrealized Gross Profit\", Style = style }, 13, 0);\n            grid.AddChild(new TextBlock { Text = Account.UnrealizedGrossProfit.ToString(), Style = style }, 13, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Unrealized Net Profit\", Style = style }, 14, 0);\n            grid.AddChild(new TextBlock { Text = Account.UnrealizedNetProfit.ToString(), Style = style }, 14, 1);\n\n            grid.AddChild(new TextBlock { Text = \"User Id\", Style = style }, 15, 0);\n            grid.AddChild(new TextBlock { Text = Account.UserId.ToString(), Style = style }, 15, 1);\n\n            Chart.AddControl(grid);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass AccountSample():\n    def initialize(self):\n        grid = Grid(16, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 5)\n        self.style.Set(ControlProperty.Margin, 5)\n        self.style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold)\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n\n        headerTextBox = self.getTextBlock(\"Account Info\")\n        headerTextBox.HorizontalAlignment = HorizontalAlignment.Center\n\n        grid.AddChild(headerTextBox, 0, 0, 1, 2)\n        grid.AddChild(self.getTextBlock(\"Type\"), 1, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.AccountType)), 1, 1)\n        grid.AddChild(self.getTextBlock(\"Is Live\"), 2, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.IsLive)), 2, 1)\n        grid.AddChild(self.getTextBlock(\"Balance\"), 3, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Balance)), 3, 1)\n        grid.AddChild(self.getTextBlock(\"Broker Name\"), 4, 0)\n        grid.AddChild(self.getTextBlock(api.Account.BrokerName), 4, 1)\n        grid.AddChild(self.getTextBlock(\"Currency\"), 5, 0)\n        grid.AddChild(self.getTextBlock(api.Account.Asset.Name), 5, 1)\n        grid.AddChild(self.getTextBlock(\"Number\"), 6, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Number)), 6, 1)\n        grid.AddChild(self.getTextBlock(\"Equity\"), 7, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Equity)), 7, 1)\n        grid.AddChild(self.getTextBlock(\"Free Margin\"), 8, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.FreeMargin)), 8, 1)\n        grid.AddChild(self.getTextBlock(\"Margin\"), 9, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.Margin)), 9, 1)\n        grid.AddChild(self.getTextBlock(\"Margin Level\"), 10, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.MarginLevel)), 10, 1)\n        grid.AddChild(self.getTextBlock(\"Precise Leverage\"), 11, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.PreciseLeverage)), 11, 1)\n        grid.AddChild(self.getTextBlock(\"Stop Out Level\"), 12, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.StopOutLevel)), 12, 1)\n        grid.AddChild(self.getTextBlock(\"Unrealized Gross Profit\"), 13, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UnrealizedGrossProfit)), 13, 1)\n        grid.AddChild(self.getTextBlock(\"Unrealized Net Profit\"), 14, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UnrealizedNetProfit)), 14, 1)\n        grid.AddChild(self.getTextBlock(\"User Id\"), 15, 0)\n        grid.AddChild(self.getTextBlock(str(api.Account.UserId)), 15, 1)\n\n        api.Chart.AddControl(grid)\n\n    def getTextBlock(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.AccountType","kind":"property","name":"AccountType","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"AccountType AccountType {get;}","python":"api.Account.AccountType: AccountType","summary":"Returns the current account type.","remarks":null,"parameters":[],"returns":{"csharpType":"AccountType","pythonType":"AccountType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Account type: {0}\", Account.AccountType);\nif (Account.AccountType == AccountType.Netted)\n    Print(\"Only one net position per symbol is allowed\");","python":"api.Print(f\"Account type: {api.Account.AccountType}\")\nif api.Account.AccountType == AccountType.Netted:\n    api.Print(\"Only one net position per symbol is allowed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/AccountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/AccountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Asset","kind":"property","name":"Asset","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"Asset Asset {get;}","python":"api.Account.Asset: Asset","summary":"Gets the account deposit asset/currency","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Deposit currency: {0}, digits: {1}\", Account.Asset.Name, Account.Asset.Digits);","python":"api.Print(f\"Deposit currency: {api.Account.Asset.Name}, digits: {api.Account.Asset.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Asset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Asset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Balance","kind":"property","name":"Balance","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double Balance {get;}","python":"api.Account.Balance: float","summary":"Returns the balance of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"double balanceBefore;\ndouble balanceAfter;\n\nprotected override void OnStart()\n{\n   // store the balance upon start up of the robot\n   balanceBefore = Account.Balance;\n}\n\n\nprotected override void OnStop()\n{\n    // Store the balance upon stop of the robot.\n    balanceAfter = Account.Balance;\n    // print the difference\n\tPrint(\"The difference of balanceBefore and balanceAfter is: {0}\", balanceBefore-balanceAfter);\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        # store the balance upon start up of the robot\n        self.balanceBefore = api.Account.Balance\n\n    def on_stop(self):\n        # Store the balance upon stop of the robot.\n        balanceAfter = api.Account.Balance\n        # print the difference\n        api.Print(f\"The difference of balanceBefore and balanceAfter is: {self.balanceBefore-balanceAfter}\")"},{"csharp":"if ( Account.Balance <= 0 )\n    Stop();","python":"if api.Account.Balance <= 0:\n    api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Balance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Balance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.BrokerName","kind":"property","name":"BrokerName","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"string BrokerName {get;}","python":"api.Account.BrokerName: str","summary":"Returns the broker name of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Broker: {0}\", Account.BrokerName);","python":"api.Print(f\"Broker: {api.Account.BrokerName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/BrokerName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/BrokerName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.CreationTime","kind":"property","name":"CreationTime","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"DateTime CreationTime {get;}","python":"api.Account.CreationTime: DateTime","summary":"Gets the account creation time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var accountAge = Server.Time - Account.CreationTime;\nPrint(\"Account created on {0}, {1} days ago\", Account.CreationTime, (int)accountAge.TotalDays);","python":"accountAge = api.Server.Time - api.Account.CreationTime\napi.Print(f\"Account created on {api.Account.CreationTime}, {int(accountAge.TotalDays)} days ago\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/CreationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/CreationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Credit","kind":"property","name":"Credit","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double Credit {get;}","python":"api.Account.Credit: float","summary":"Gets the credit of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Credit: {0}, Balance: {1}\", Account.Credit, Account.Balance);","python":"api.Print(f\"Credit: {api.Account.Credit}, Balance: {api.Account.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Credit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Credit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Equity","kind":"property","name":"Equity","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double Equity {get;}","python":"api.Account.Equity: float","summary":"Represents the equity of the current account (balance minus Unrealized Net Loss plus Unrealized Net Profit plus Bonus).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The equity of this account is: {0}\", Account.Equity);","python":"api.Print(f\"The equity of this account is: {api.Account.Equity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Equity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Equity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.FreeMargin","kind":"property","name":"FreeMargin","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double FreeMargin {get;}","python":"api.Account.FreeMargin: float","summary":"Represents the free margin of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The free margin of this account is: {0}\", Account.FreeMargin);","python":"api.Print(f\"The free margin of this account is: {api.Account.FreeMargin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/FreeMargin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/FreeMargin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.IsLive","kind":"property","name":"IsLive","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"bool IsLive {get;}","python":"api.Account.IsLive: bool","summary":"Defines if the account is Live or Demo. True if the Account is Live, False if it is a Demo.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.IsLive)\n    Print(\"Live Account\");\nelse\n    Print(\"Demo Account\");","python":"if api.Account.IsLive:\n    api.Print(\"Live Account\")\nelse:\n    api.Print(\"Demo Account\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/IsLive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/IsLive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Margin","kind":"property","name":"Margin","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double Margin {get;}","python":"api.Account.Margin: float","summary":"Represents the margin of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The margin of this account is: {0}\", Account.Margin);","python":"api.Print(f\"The margin of this account is: {api.Account.Margin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Margin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Margin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.MarginLevel","kind":"property","name":"MarginLevel","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double? MarginLevel {get;}","python":"api.Account.MarginLevel: float | None","summary":"Represents the margin level of the current account. Margin Level (in %) is calculated using this formula: Equity / Margin * 100","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The marginLevel of this account is: {0}\", Account.MarginLevel);","python":"api.Print(f\"The marginLevel of this account is: {api.Account.MarginLevel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/MarginLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/MarginLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Number","kind":"property","name":"Number","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"int Number {get;}","python":"api.Account.Number: int","summary":"Returns the number of the current account, e.g. 123456.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Account number: {0}\", Account.Number);","python":"api.Print(f\"Account number: {api.Account.Number}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Number/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Number/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.PreciseLeverage","kind":"property","name":"PreciseLeverage","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double PreciseLeverage {get;}","python":"api.Account.PreciseLeverage: float","summary":"Gets the precise account leverage value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Account leverage: 1:{0}\", Account.PreciseLeverage);","python":"api.Print(f\"Account leverage: 1:{api.Account.PreciseLeverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/PreciseLeverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/PreciseLeverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.StopOutLevel","kind":"property","name":"StopOutLevel","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double StopOutLevel {get;}","python":"api.Account.StopOutLevel: float","summary":"Stop Out level is a lowest allowed Margin Level for account. If Margin Level is less than Stop Out, position will be closed sequentially until Margin Level is greater than Stop Out.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.MarginLevel.HasValue && Account.MarginLevel.Value < Account.StopOutLevel * 2)\n    Print(\"Margin level {0}% is close to the stop out level {1}%\", Account.MarginLevel.Value, Account.StopOutLevel);","python":"if api.Account.MarginLevel is not None and api.Account.MarginLevel < api.Account.StopOutLevel * 2:\n    api.Print(f\"Margin level {api.Account.MarginLevel}% is close to the stop out level {api.Account.StopOutLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/StopOutLevel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/StopOutLevel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.TotalMarginCalculationType","kind":"property","name":"TotalMarginCalculationType","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"TotalMarginCalculationType TotalMarginCalculationType {get;}","python":"api.Account.TotalMarginCalculationType: TotalMarginCalculationType","summary":"Type of total margin requirements per Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"TotalMarginCalculationType","pythonType":"TotalMarginCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Total margin calculation type: {0}\", Account.TotalMarginCalculationType);","python":"api.Print(f\"Total margin calculation type: {api.Account.TotalMarginCalculationType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/TotalMarginCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/TotalMarginCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.UnrealizedGrossProfit","kind":"property","name":"UnrealizedGrossProfit","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double UnrealizedGrossProfit {get;}","python":"api.Account.UnrealizedGrossProfit: float","summary":"Gets the Unrealized Gross profit value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Unrealized gross profit: {0}\", Account.UnrealizedGrossProfit);","python":"api.Print(f\"Unrealized gross profit: {api.Account.UnrealizedGrossProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UnrealizedGrossProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UnrealizedGrossProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.UnrealizedNetProfit","kind":"property","name":"UnrealizedNetProfit","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"double UnrealizedNetProfit {get;}","python":"api.Account.UnrealizedNetProfit: float","summary":"Gets the Unrealized Net profit value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.UnrealizedNetProfit < -100)\n    Print(\"Floating loss exceeds 100 {0}: {1}\", Account.Asset.Name, Account.UnrealizedNetProfit);","python":"if api.Account.UnrealizedNetProfit < -100:\n    api.Print(f\"Floating loss exceeds 100 {api.Account.Asset.Name}: {api.Account.UnrealizedNetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UnrealizedNetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UnrealizedNetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.UserId","kind":"property","name":"UserId","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"long UserId {get;}","python":"api.Account.UserId: int","summary":"Gets the user ID.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"User id: {0}\", Account.UserId);","python":"api.Print(f\"User id: {api.Account.UserId}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UserId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UserId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.UserNickName","kind":"property","name":"UserNickName","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"string UserNickName {get;}","python":"api.Account.UserNickName: str","summary":"Gets the user nick name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"User nick name: {0}\", Account.UserNickName);","python":"api.Print(f\"User nick name: {api.Account.UserNickName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UserNickName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/UserNickName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Internals.IAccount.Switched","kind":"event","name":"Switched","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"event Action<AccountSwitchedEventArgs> Switched;","python":"api.Account.Switched += handler  # handler(obj: AccountSwitchedEventArgs)","summary":"Occurs when user switch his account.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<AccountSwitchedEventArgs>","pythonType":"Callable[[AccountSwitchedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Account.Switched += OnAccountSwitched;\n}\n\nprivate void OnAccountSwitched(AccountSwitchedEventArgs args)\n{\n    Print(\"Account switched from {0} to {1}\", args.PreviousAccountNumber, args.CurrentAccountNumber);\n}","python":"def on_start(self):\n    api.Account.Switched += self.on_account_switched\n\ndef on_account_switched(self, args):\n    api.Print(f\"Account switched from {args.PreviousAccountNumber} to {args.CurrentAccountNumber}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Switched/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/Switched/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Currency","kind":"property","name":"Currency","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"string Currency {get;}","python":"api.Account.Currency: str","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Account.Asset.Name instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Leverage","kind":"property","name":"Leverage","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"int Leverage {get;}","python":"api.Account.Leverage: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use PreciseLeverage instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"IReadonlyList<Position> Positions {get;}","python":"api.Account.Positions: IReadonlyList[Position]","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<Position>","pythonType":"IReadonlyList[Position]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Positions instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IAccount.PendingOrders","kind":"property","name":"PendingOrders","type":"T:cAlgo.API.Internals.IAccount","namespace":"cAlgo.API.Internals","group":"Account","csharp":"IReadonlyList<PendingOrder> PendingOrders {get;}","python":"api.Account.PendingOrders: IReadonlyList[PendingOrder]","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<PendingOrder>","pythonType":"IReadonlyList[PendingOrder]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use PendingOrders instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/IAccount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.IAssetConverter","kind":"interface","name":"IAssetConverter","type":null,"namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"public interface IAssetConverter","python":"IAssetConverter","summary":"Its an interface for converting an asset / currency value to another asset / currency value.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var convertResult = AssetConverter.Convert(10, \"USD\", \"CAD\");\nPrint(\"10 USD is {0} CAD\", convertResult);","python":"convertResult = api.AssetConverter.Convert(10, \"USD\", \"CAD\")\napi.Print(f\"10 USD is {convertResult} CAD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IAssetConverter.Convert(System.Double,cAlgo.API.Asset,cAlgo.API.Asset)","kind":"method","name":"Convert","type":"T:cAlgo.API.Internals.IAssetConverter","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"double Convert(double value, Asset from, Asset to)","python":"api.AssetConverter.Convert(value: float, from: Asset, to: Asset) -> float","summary":"Converts an asset to another asset.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from Asset"},{"name":"from","csharpType":"Asset","pythonType":"Asset","summary":"Actual or current asset of the value"},{"name":"to","csharpType":"Asset","pythonType":"Asset","summary":"Target asset"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var valueInQuoteAsset = AssetConverter.Convert(1000, Account.Asset, Symbol.QuoteAsset);\nPrint(\"1000 {0} is {1} {2}\", Account.Asset.Name, valueInQuoteAsset, Symbol.QuoteAsset.Name);","python":"valueInQuoteAsset = api.AssetConverter.Convert(1000, api.Account.Asset, api.Symbol.QuoteAsset)\napi.Print(f\"1000 {api.Account.Asset.Name} is {valueInQuoteAsset} {api.Symbol.QuoteAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IAssetConverter.Convert(System.Double,System.String,System.String)","kind":"method","name":"Convert","type":"T:cAlgo.API.Internals.IAssetConverter","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"double Convert(double value, string from, string to)","python":"api.AssetConverter.Convert(value: float, from: str, to: str) -> float","summary":"Converts an asset to another asset.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from Asset"},{"name":"from","csharpType":"string","pythonType":"str","summary":"Actual or current asset of the value"},{"name":"to","csharpType":"string","pythonType":"str","summary":"Target asset"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var valueInJpy = AssetConverter.Convert(100, \"EUR\", \"JPY\");\nPrint(\"100 EUR is {0} JPY\", valueInJpy);","python":"valueInJpy = api.AssetConverter.Convert(100, \"EUR\", \"JPY\")\napi.Print(f\"100 EUR is {valueInJpy} JPY\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IAssetConverter.Convert(System.Double,cAlgo.API.Asset,System.String)","kind":"method","name":"Convert","type":"T:cAlgo.API.Internals.IAssetConverter","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"double Convert(double value, Asset from, string to)","python":"api.AssetConverter.Convert(value: float, from: Asset, to: str) -> float","summary":"Converts an asset to another asset.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from Asset"},{"name":"from","csharpType":"Asset","pythonType":"Asset","summary":"Actual or current asset of the value"},{"name":"to","csharpType":"string","pythonType":"str","summary":"Target asset name"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var balanceInUsd = AssetConverter.Convert(Account.Balance, Account.Asset, \"USD\");\nPrint(\"Balance in USD: {0}\", balanceInUsd);","python":"balanceInUsd = api.AssetConverter.Convert(api.Account.Balance, api.Account.Asset, \"USD\")\napi.Print(f\"Balance in USD: {balanceInUsd}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IAssetConverter.Convert(System.Double,System.String,cAlgo.API.Asset)","kind":"method","name":"Convert","type":"T:cAlgo.API.Internals.IAssetConverter","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"double Convert(double value, string from, Asset to)","python":"api.AssetConverter.Convert(value: float, from: str, to: Asset) -> float","summary":"Converts an asset to another asset.","remarks":null,"parameters":[{"name":"value","csharpType":"double","pythonType":"float","summary":"The value you want to convert from Asset"},{"name":"from","csharpType":"string","pythonType":"str","summary":"Actual or current asset name of the value"},{"name":"to","csharpType":"Asset","pythonType":"Asset","summary":"Target asset"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Value in to / target asset","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var valueInAccountAsset = AssetConverter.Convert(500, \"GBP\", Account.Asset);\nPrint(\"500 GBP is {0} {1}\", valueInAccountAsset, Account.Asset.Name);","python":"valueInAccountAsset = api.AssetConverter.Convert(500, \"GBP\", api.Account.Asset)\napi.Print(f\"500 GBP is {valueInAccountAsset} {api.Account.Asset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/IAssetConverter/Convert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.IIndicatorsAccessor","kind":"interface","name":"IIndicatorsAccessor","type":null,"namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"public interface IIndicatorsAccessor","python":"IIndicatorsAccessor","summary":"Accessor to Indicators","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class IndicatorsSample : Robot\n{\n    private RelativeStrengthIndex _rsi;\n    private SimpleMovingAverage _sma;\n\n    protected override void OnStart()\n    {\n        _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n        _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);\n    }\n\n    protected override void OnBar()\n    {\n        if (_rsi.Result.Last(1) < 30 && Bars.ClosePrices.Last(1) > _sma.Result.Last(1))\n            Print(\"RSI is oversold while the price is above the 50 period SMA\");\n    }\n}","python":"class IndicatorsSample():\n    def on_start(self):\n        self.rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n        self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 50)\n\n    def on_bar(self):\n        if self.rsi.Result.Last(1) < 30 and api.Bars.ClosePrices.Last(1) > self.sma.Result.Last(1):\n            api.Print(\"RSI is oversold while the price is above the 50 period SMA\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AcceleratorOscillator","kind":"method","name":"AcceleratorOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AcceleratorOscillator AcceleratorOscillator()","python":"api.Indicators.AcceleratorOscillator() -> AcceleratorOscillator","summary":"Initializes the AcceleratorOscillator indicator instance","remarks":null,"parameters":[],"returns":{"csharpType":"AcceleratorOscillator","pythonType":"AcceleratorOscillator","summary":"AcceleratorOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var acceleratorOscillator = Indicators.AcceleratorOscillator();\nPrint(\"Accelerator Oscillator: {0}\", acceleratorOscillator.Result.Last(1));","python":"acceleratorOscillator = api.Indicators.AcceleratorOscillator()\napi.Print(f\"Accelerator Oscillator: {acceleratorOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AcceleratorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AcceleratorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AcceleratorOscillator(cAlgo.API.Bars)","kind":"method","name":"AcceleratorOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AcceleratorOscillator AcceleratorOscillator(Bars bars)","python":"api.Indicators.AcceleratorOscillator(bars: Bars) -> AcceleratorOscillator","summary":"Initializes the AcceleratorOscillator indicator instance","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"AcceleratorOscillator","pythonType":"AcceleratorOscillator","summary":"AcceleratorOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAcceleratorOscillator = Indicators.AcceleratorOscillator(dailyBars);\nPrint(\"Daily Accelerator Oscillator: {0}\", dailyAcceleratorOscillator.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAcceleratorOscillator = api.Indicators.AcceleratorOscillator(dailyBars)\napi.Print(f\"Daily Accelerator Oscillator: {dailyAcceleratorOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AcceleratorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AcceleratorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AccumulationDistribution","kind":"method","name":"AccumulationDistribution","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AccumulationDistribution AccumulationDistribution()","python":"api.Indicators.AccumulationDistribution() -> AccumulationDistribution","summary":"The Accumulation Distribution indicator shows bullish or bearish trends.","remarks":null,"parameters":[],"returns":{"csharpType":"AccumulationDistribution","pythonType":"AccumulationDistribution","summary":"AccumulationDistribution","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var accumulationDistribution = Indicators.AccumulationDistribution();\nPrint(\"Accumulation/Distribution: {0}\", accumulationDistribution.Result.LastValue);","python":"accumulationDistribution = api.Indicators.AccumulationDistribution()\napi.Print(f\"Accumulation/Distribution: {accumulationDistribution.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AccumulationDistribution(cAlgo.API.Bars)","kind":"method","name":"AccumulationDistribution","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AccumulationDistribution AccumulationDistribution(Bars bars)","python":"api.Indicators.AccumulationDistribution(bars: Bars) -> AccumulationDistribution","summary":"The Accumulation Distribution indicator shows bullish or bearish trends.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"AccumulationDistribution","pythonType":"AccumulationDistribution","summary":"AccumulationDistribution","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAccumulationDistribution = Indicators.AccumulationDistribution(dailyBars);\nPrint(\"Daily Accumulation/Distribution: {0}\", dailyAccumulationDistribution.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAccumulationDistribution = api.Indicators.AccumulationDistribution(dailyBars)\napi.Print(f\"Daily Accumulation/Distribution: {dailyAccumulationDistribution.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AccumulativeSwingIndex(System.Int32)","kind":"method","name":"AccumulativeSwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AccumulativeSwingIndex AccumulativeSwingIndex(int limitMoveValue)","python":"api.Indicators.AccumulativeSwingIndex(limitMoveValue: int) -> AccumulativeSwingIndex","summary":"Initializes the Accumulative Swing Index indicator","remarks":"The Accumulative Swing Index indicator is used as a divergence and confirmation tool.","parameters":[{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":"The value of the Limit Move used for calculation."}],"returns":{"csharpType":"AccumulativeSwingIndex","pythonType":"AccumulativeSwingIndex","summary":"Accumulative Swing Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(12);\nPrint(\"Accumulative Swing Index: {0}\", accumulativeSwingIndex.Result.Last(1));","python":"accumulativeSwingIndex = api.Indicators.AccumulativeSwingIndex(12)\napi.Print(f\"Accumulative Swing Index: {accumulativeSwingIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulativeSwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulativeSwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AccumulativeSwingIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"AccumulativeSwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AccumulativeSwingIndex AccumulativeSwingIndex(Bars bars, int limitMoveValue)","python":"api.Indicators.AccumulativeSwingIndex(bars: Bars, limitMoveValue: int) -> AccumulativeSwingIndex","summary":"Initializes the Accumulative Swing Index indicator","remarks":"The Accumulative Swing Index indicator is used as a divergence and confirmation tool.","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":"The value of the Limit Move used for calculation."}],"returns":{"csharpType":"AccumulativeSwingIndex","pythonType":"AccumulativeSwingIndex","summary":"Accumulative Swing Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAsi = Indicators.AccumulativeSwingIndex(dailyBars, 12);\nPrint(\"Daily Accumulative Swing Index: {0}\", dailyAsi.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAsi = api.Indicators.AccumulativeSwingIndex(dailyBars, 12)\napi.Print(f\"Daily Accumulative Swing Index: {dailyAsi.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulativeSwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AccumulativeSwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Alligator(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"Alligator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Alligator Alligator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)","python":"api.Indicators.Alligator(jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> Alligator","summary":"Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.","remarks":null,"parameters":[{"name":"jawsPeriods","csharpType":"int","pythonType":"int","summary":"The jaws period of Alligator"},{"name":"jawsShift","csharpType":"int","pythonType":"int","summary":"The jaws shift of Alligator"},{"name":"teethPeriods","csharpType":"int","pythonType":"int","summary":"The teeth period of Alligator"},{"name":"teethShift","csharpType":"int","pythonType":"int","summary":"The teeth shift of Alligator"},{"name":"lipsPeriods","csharpType":"int","pythonType":"int","summary":"The lips period of Alligator"},{"name":"lipsShift","csharpType":"int","pythonType":"int","summary":"The lips shift of Alligator"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"Alligator","pythonType":"Alligator","summary":"Alligator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple);\nPrint(\"Jaws: {0}, Teeth: {1}, Lips: {2}\", alligator.Jaws.LastValue, alligator.Teeth.LastValue, alligator.Lips.LastValue);","python":"alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple)\napi.Print(f\"Jaws: {alligator.Jaws.LastValue}, Teeth: {alligator.Teeth.LastValue}, Lips: {alligator.Lips.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Alligator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Alligator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Alligator(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"Alligator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Alligator Alligator(DataSeries source, int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)","python":"api.Indicators.Alligator(source: DataSeries, jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> Alligator","summary":"Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for the Alligator calculation."},{"name":"jawsPeriods","csharpType":"int","pythonType":"int","summary":"The jaws period of Alligator"},{"name":"jawsShift","csharpType":"int","pythonType":"int","summary":"The jaws shift of Alligator"},{"name":"teethPeriods","csharpType":"int","pythonType":"int","summary":"The teeth period of Alligator"},{"name":"teethShift","csharpType":"int","pythonType":"int","summary":"The teeth shift of Alligator"},{"name":"lipsPeriods","csharpType":"int","pythonType":"int","summary":"The lips period of Alligator"},{"name":"lipsShift","csharpType":"int","pythonType":"int","summary":"The lips shift of Alligator"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"Alligator","pythonType":"Alligator","summary":"Alligator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var alligator = Indicators.Alligator(Bars.ClosePrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple);\nvar isUpTrend = alligator.Lips.LastValue > alligator.Teeth.LastValue && alligator.Teeth.LastValue > alligator.Jaws.LastValue;\nPrint(\"Alligator on close prices, up trend: {0}\", isUpTrend);","python":"alligator = api.Indicators.Alligator(api.Bars.ClosePrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple)\nisUpTrend = alligator.Lips.LastValue > alligator.Teeth.LastValue and alligator.Teeth.LastValue > alligator.Jaws.LastValue\napi.Print(f\"Alligator on close prices, up trend: {isUpTrend}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Alligator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Alligator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Aroon(System.Int32)","kind":"method","name":"Aroon","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Aroon Aroon(int periods)","python":"api.Indicators.Aroon(periods: int) -> Aroon","summary":"The Aroon indicator is used to identify trends and their reversals.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"Aroon","pythonType":"Aroon","summary":"Aroon indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var aroon = Indicators.Aroon(25);\nif (aroon.Up.LastValue > aroon.Down.LastValue)\n    Print(\"Aroon Up {0} is above Aroon Down {1}\", aroon.Up.LastValue, aroon.Down.LastValue);","python":"aroon = api.Indicators.Aroon(25)\nif aroon.Up.LastValue > aroon.Down.LastValue:\n    api.Print(f\"Aroon Up {aroon.Up.LastValue} is above Aroon Down {aroon.Down.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Aroon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Aroon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Aroon(cAlgo.API.Bars,System.Int32)","kind":"method","name":"Aroon","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Aroon Aroon(Bars bars, int periods)","python":"api.Indicators.Aroon(bars: Bars, periods: int) -> Aroon","summary":"The Aroon indicator is used to identify trends and their reversals.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"Aroon","pythonType":"Aroon","summary":"Aroon indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAroon = Indicators.Aroon(dailyBars, 25);\nPrint(\"Daily Aroon Up: {0}, Down: {1}\", dailyAroon.Up.LastValue, dailyAroon.Down.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAroon = api.Indicators.Aroon(dailyBars, 25)\napi.Print(f\"Daily Aroon Up: {dailyAroon.Up.LastValue}, Down: {dailyAroon.Down.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Aroon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Aroon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AverageDirectionalMovementIndexRating(System.Int32)","kind":"method","name":"AverageDirectionalMovementIndexRating","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AverageDirectionalMovementIndexRating AverageDirectionalMovementIndexRating(int periods)","python":"api.Indicators.AverageDirectionalMovementIndexRating(periods: int) -> AverageDirectionalMovementIndexRating","summary":"The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX). It's calculated by taking the average of the current ADX and the ADX from one time period before.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The Period of AverageDirectionalMovementIndexRating"}],"returns":{"csharpType":"AverageDirectionalMovementIndexRating","pythonType":"AverageDirectionalMovementIndexRating","summary":"AverageDirectionalMovementIndexRating","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14);\nPrint(\"ADX: {0}, ADXR: {1}, DI+: {2}, DI-: {3}\", adxr.ADX.LastValue, adxr.ADXR.LastValue, adxr.DIPlus.LastValue, adxr.DIMinus.LastValue);","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)\napi.Print(f\"ADX: {adxr.ADX.LastValue}, ADXR: {adxr.ADXR.LastValue}, DI+: {adxr.DIPlus.LastValue}, DI-: {adxr.DIMinus.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageDirectionalMovementIndexRating/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageDirectionalMovementIndexRating/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AverageDirectionalMovementIndexRating(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"AverageDirectionalMovementIndexRating","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AverageDirectionalMovementIndexRating AverageDirectionalMovementIndexRating(int periods, MovingAverageType maType)","python":"api.Indicators.AverageDirectionalMovementIndexRating(periods: int, maType: MovingAverageType) -> AverageDirectionalMovementIndexRating","summary":"The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX). It's calculated by taking the average of the current ADX and the ADX from one time period before.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The Period of AverageDirectionalMovementIndexRating"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"AverageDirectionalMovementIndexRating","pythonType":"AverageDirectionalMovementIndexRating","summary":"AverageDirectionalMovementIndexRating","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var adxr = Indicators.AverageDirectionalMovementIndexRating(14, MovingAverageType.Exponential);\nif (adxr.ADXR.LastValue > 25)\n    Print(\"The market is trending, ADXR: {0}\", adxr.ADXR.LastValue);","python":"adxr = api.Indicators.AverageDirectionalMovementIndexRating(14, MovingAverageType.Exponential)\nif adxr.ADXR.LastValue > 25:\n    api.Print(f\"The market is trending, ADXR: {adxr.ADXR.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageDirectionalMovementIndexRating/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageDirectionalMovementIndexRating/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AverageTrueRange(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"AverageTrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AverageTrueRange AverageTrueRange(int periods, MovingAverageType maType)","python":"api.Indicators.AverageTrueRange(periods: int, maType: MovingAverageType) -> AverageTrueRange","summary":"Average true range. An indicator providing the degree of price volatility.","remarks":"Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder. The indicator provides the degree of price volatility. The average true range is an N-day exponential moving average of the true range values. Wilder recommended a 14-period smoothing.","parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Period of moving average to use for Average True Range caluclation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of moving average to use for Average True Range caluclation."}],"returns":{"csharpType":"AverageTrueRange","pythonType":"AverageTrueRange","summary":"Average True Range indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var atr = Indicators.AverageTrueRange(14, MovingAverageType.Exponential);\nvar stopLossPips = 2 * atr.Result.LastValue / Symbol.PipSize;\nPrint(\"ATR(14): {0}, stop loss at 2 x ATR: {1} pips\", atr.Result.LastValue, stopLossPips);","python":"atr = api.Indicators.AverageTrueRange(14, MovingAverageType.Exponential)\nstopLossPips = 2 * atr.Result.LastValue / api.Symbol.PipSize\napi.Print(f\"ATR(14): {atr.Result.LastValue}, stop loss at 2 x ATR: {stopLossPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageTrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageTrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AverageTrueRange(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"AverageTrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AverageTrueRange AverageTrueRange(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.AverageTrueRange(bars: Bars, periods: int, maType: MovingAverageType) -> AverageTrueRange","summary":"Average true range. An indicator providing the degree of price volatility.","remarks":"Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder. The indicator provides the degree of price volatility. The average true range is an N-day exponential moving average of the true range values. Wilder recommended a 14-period smoothing.","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Period of moving average to use for Average True Range caluclation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of moving average to use for Average True Range caluclation."}],"returns":{"csharpType":"AverageTrueRange","pythonType":"AverageTrueRange","summary":"Average True Range indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAtr = Indicators.AverageTrueRange(dailyBars, 14, MovingAverageType.Exponential);\nPrint(\"Daily ATR(14): {0} pips\", dailyAtr.Result.LastValue / Symbol.PipSize);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAtr = api.Indicators.AverageTrueRange(dailyBars, 14, MovingAverageType.Exponential)\napi.Print(f\"Daily ATR(14): {dailyAtr.Result.LastValue / api.Symbol.PipSize} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageTrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageTrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AwesomeOscillator","kind":"method","name":"AwesomeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AwesomeOscillator AwesomeOscillator()","python":"api.Indicators.AwesomeOscillator() -> AwesomeOscillator","summary":"Initializes the AwesomeOscillator indicator instance","remarks":null,"parameters":[],"returns":{"csharpType":"AwesomeOscillator","pythonType":"AwesomeOscillator","summary":"AwesomeOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var awesomeOscillator = Indicators.AwesomeOscillator();\nPrint(\"Awesome Oscillator: {0}\", awesomeOscillator.Result.Last(1));","python":"awesomeOscillator = api.Indicators.AwesomeOscillator()\napi.Print(f\"Awesome Oscillator: {awesomeOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AwesomeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AwesomeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AwesomeOscillator(cAlgo.API.Bars)","kind":"method","name":"AwesomeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AwesomeOscillator AwesomeOscillator(Bars bars)","python":"api.Indicators.AwesomeOscillator(bars: Bars) -> AwesomeOscillator","summary":"Initializes the AwesomeOscillator indicator instance by passing the bars","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"AwesomeOscillator","pythonType":"AwesomeOscillator","summary":"AwesomeOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyAwesomeOscillator = Indicators.AwesomeOscillator(dailyBars);\nPrint(\"Daily Awesome Oscillator: {0}\", dailyAwesomeOscillator.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyAwesomeOscillator = api.Indicators.AwesomeOscillator(dailyBars)\napi.Print(f\"Daily Awesome Oscillator: {dailyAwesomeOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AwesomeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AwesomeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.BearsPower(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"BearsPower","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"BearsPower BearsPower(int periods, MovingAverageType maType)","python":"api.Indicators.BearsPower(periods: int, maType: MovingAverageType) -> BearsPower","summary":"Bears Power shows the maximum bearish strength during the time period.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"BearsPower","pythonType":"BearsPower","summary":"BearsPower","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bearsPower = Indicators.BearsPower(13, MovingAverageType.Exponential);\nPrint(\"Bears Power: {0}\", bearsPower.Result.Last(1));","python":"bearsPower = api.Indicators.BearsPower(13, MovingAverageType.Exponential)\napi.Print(f\"Bears Power: {bearsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BearsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BearsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.BearsPower(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"BearsPower","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"BearsPower BearsPower(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.BearsPower(bars: Bars, periods: int, maType: MovingAverageType) -> BearsPower","summary":"Bears Power shows the maximum bearish strength during the time period.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"BearsPower","pythonType":"BearsPower","summary":"BearsPower","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyBearsPower = Indicators.BearsPower(dailyBars, 13, MovingAverageType.Exponential);\nPrint(\"Daily Bears Power: {0}\", dailyBearsPower.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyBearsPower = api.Indicators.BearsPower(dailyBars, 13, MovingAverageType.Exponential)\napi.Print(f\"Daily Bears Power: {dailyBearsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BearsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BearsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.BollingerBands(cAlgo.API.DataSeries,System.Int32,System.Double,cAlgo.API.MovingAverageType)","kind":"method","name":"BollingerBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"BollingerBands BollingerBands(DataSeries source, int periods, double standardDeviations, MovingAverageType maType)","python":"api.Indicators.BollingerBands(source: DataSeries, periods: int, standardDeviations: float, maType: MovingAverageType) -> BollingerBands","summary":"The Bollinger Bands indicator shows volatility.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"standardDeviations","csharpType":"double","pythonType":"float","summary":"The value of the standard deviations used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"BollingerBands","pythonType":"BollingerBands","summary":"Bollinger Bands indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nif (Symbol.Bid > bollingerBands.Top.LastValue)\n    Print(\"Bid is above the top band {0}\", bollingerBands.Top.LastValue);\nelse if (Symbol.Bid < bollingerBands.Bottom.LastValue)\n    Print(\"Bid is below the bottom band {0}\", bollingerBands.Bottom.LastValue);","python":"bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nif api.Symbol.Bid > bollingerBands.Top.LastValue:\n    api.Print(f\"Bid is above the top band {bollingerBands.Top.LastValue}\")\nelif api.Symbol.Bid < bollingerBands.Bottom.LastValue:\n    api.Print(f\"Bid is below the bottom band {bollingerBands.Bottom.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BollingerBands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BollingerBands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.BullsPower(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"BullsPower","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"BullsPower BullsPower(int periods, MovingAverageType maType)","python":"api.Indicators.BullsPower(periods: int, maType: MovingAverageType) -> BullsPower","summary":"Bulls Power shows the maximum bullish strength during the time period.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"BullsPower","pythonType":"BullsPower","summary":"BullsPower","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bullsPower = Indicators.BullsPower(13, MovingAverageType.Exponential);\nPrint(\"Bulls Power: {0}\", bullsPower.Result.Last(1));","python":"bullsPower = api.Indicators.BullsPower(13, MovingAverageType.Exponential)\napi.Print(f\"Bulls Power: {bullsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BullsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BullsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.BullsPower(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"BullsPower","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"BullsPower BullsPower(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.BullsPower(bars: Bars, periods: int, maType: MovingAverageType) -> BullsPower","summary":"Bulls Power shows the maximum bullish strength during the time period.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"BullsPower","pythonType":"BullsPower","summary":"BullsPower","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyBullsPower = Indicators.BullsPower(dailyBars, 13, MovingAverageType.Exponential);\nPrint(\"Daily Bulls Power: {0}\", dailyBullsPower.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyBullsPower = api.Indicators.BullsPower(dailyBars, 13, MovingAverageType.Exponential)\napi.Print(f\"Daily Bulls Power: {dailyBullsPower.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BullsPower/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/BullsPower/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CenterOfGravity(System.Int32)","kind":"method","name":"CenterOfGravity","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CenterOfGravity CenterOfGravity(int length)","python":"api.Indicators.CenterOfGravity(length: int) -> CenterOfGravity","summary":"The Center of Gravity (COG) indicator is a technical indicator developed by John Ehlers in 2002, used to identify potential turning points in the price as early as possible.","remarks":null,"parameters":[{"name":"length","csharpType":"int","pythonType":"int","summary":"The length of CenterOfGravity"}],"returns":{"csharpType":"CenterOfGravity","pythonType":"CenterOfGravity","summary":"CenterOfGravity","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var centerOfGravity = Indicators.CenterOfGravity(10);\nPrint(\"Center of Gravity: {0}, lag: {1}\", centerOfGravity.Result.LastValue, centerOfGravity.Lag.LastValue);","python":"centerOfGravity = api.Indicators.CenterOfGravity(10)\napi.Print(f\"Center of Gravity: {centerOfGravity.Result.LastValue}, lag: {centerOfGravity.Lag.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CenterOfGravity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CenterOfGravity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinMoneyFlow(System.Int32)","kind":"method","name":"ChaikinMoneyFlow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinMoneyFlow ChaikinMoneyFlow(int periods)","python":"api.Indicators.ChaikinMoneyFlow(periods: int) -> ChaikinMoneyFlow","summary":"The Chaikin Money Flow indicator measures the money flow volume over a specific period.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"ChaikinMoneyFlow","pythonType":"ChaikinMoneyFlow","summary":"Chaikin Money Flow indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chaikinMoneyFlow = Indicators.ChaikinMoneyFlow(21);\nvar isBuyingPressure = chaikinMoneyFlow.Result.Last(1) > 0;\nPrint(\"Chaikin Money Flow: {0}, buying pressure: {1}\", chaikinMoneyFlow.Result.Last(1), isBuyingPressure);","python":"chaikinMoneyFlow = api.Indicators.ChaikinMoneyFlow(21)\nisBuyingPressure = chaikinMoneyFlow.Result.Last(1) > 0\napi.Print(f\"Chaikin Money Flow: {chaikinMoneyFlow.Result.Last(1)}, buying pressure: {isBuyingPressure}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinMoneyFlow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinMoneyFlow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinMoneyFlow(cAlgo.API.Bars,System.Int32)","kind":"method","name":"ChaikinMoneyFlow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinMoneyFlow ChaikinMoneyFlow(Bars bars, int periods)","python":"api.Indicators.ChaikinMoneyFlow(bars: Bars, periods: int) -> ChaikinMoneyFlow","summary":"The Chaikin Money Flow indicator measures the money flow volume over a specific period.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"ChaikinMoneyFlow","pythonType":"ChaikinMoneyFlow","summary":"Chaikin Money Flow indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyChaikinMoneyFlow = Indicators.ChaikinMoneyFlow(dailyBars, 21);\nPrint(\"Daily Chaikin Money Flow: {0}\", dailyChaikinMoneyFlow.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyChaikinMoneyFlow = api.Indicators.ChaikinMoneyFlow(dailyBars, 21)\napi.Print(f\"Daily Chaikin Money Flow: {dailyChaikinMoneyFlow.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinMoneyFlow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinMoneyFlow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinOscillator(System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ChaikinOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinOscillator ChaikinOscillator(int shortTerm, int longTerm, MovingAverageType maType)","python":"api.Indicators.ChaikinOscillator(shortTerm: int, longTerm: int, maType: MovingAverageType) -> ChaikinOscillator","summary":"The Chaikin Oscillator indicator is the difference between two moving averages over the Chaikin Money Flow.","remarks":null,"parameters":[{"name":"shortTerm","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"longTerm","csharpType":"int","pythonType":"int","summary":"The slow moving average period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ChaikinOscillator","pythonType":"ChaikinOscillator","summary":"ChaikinOscillator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chaikinOscillator = Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential);\nPrint(\"Chaikin Oscillator: {0}\", chaikinOscillator.Result.Last(1));","python":"chaikinOscillator = api.Indicators.ChaikinOscillator(3, 10, MovingAverageType.Exponential)\napi.Print(f\"Chaikin Oscillator: {chaikinOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinOscillator(cAlgo.API.Bars,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ChaikinOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinOscillator ChaikinOscillator(Bars bars, int shortTerm, int longTerm, MovingAverageType maType)","python":"api.Indicators.ChaikinOscillator(bars: Bars, shortTerm: int, longTerm: int, maType: MovingAverageType) -> ChaikinOscillator","summary":"The Chaikin Oscillator indicator is the difference between two moving averages over the Chaikin Money Flow.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"shortTerm","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"longTerm","csharpType":"int","pythonType":"int","summary":"The slow moving average period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ChaikinOscillator","pythonType":"ChaikinOscillator","summary":"ChaikinOscillator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyChaikinOscillator = Indicators.ChaikinOscillator(dailyBars, 3, 10, MovingAverageType.Exponential);\nPrint(\"Daily Chaikin Oscillator: {0}\", dailyChaikinOscillator.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyChaikinOscillator = api.Indicators.ChaikinOscillator(dailyBars, 3, 10, MovingAverageType.Exponential)\napi.Print(f\"Daily Chaikin Oscillator: {dailyChaikinOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinVolatility(System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ChaikinVolatility","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinVolatility ChaikinVolatility(int periods, int rateOfChange, MovingAverageType maType)","python":"api.Indicators.ChaikinVolatility(periods: int, rateOfChange: int, maType: MovingAverageType) -> ChaikinVolatility","summary":"The Chaikin Volatiliy indicator measures the trading range between the high and the low prices.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"rateOfChange","csharpType":"int","pythonType":"int","summary":"The value of the rage of change used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"ChaikinVolatility","pythonType":"ChaikinVolatility","summary":"Chaikin Volatility indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chaikinVolatility = Indicators.ChaikinVolatility(10, 10, MovingAverageType.Exponential);\nPrint(\"Chaikin Volatility: {0}\", chaikinVolatility.Result.LastValue);","python":"chaikinVolatility = api.Indicators.ChaikinVolatility(10, 10, MovingAverageType.Exponential)\napi.Print(f\"Chaikin Volatility: {chaikinVolatility.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinVolatility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinVolatility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinVolatility(cAlgo.API.Bars,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ChaikinVolatility","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinVolatility ChaikinVolatility(Bars bars, int periods, int rateOfChange, MovingAverageType maType)","python":"api.Indicators.ChaikinVolatility(bars: Bars, periods: int, rateOfChange: int, maType: MovingAverageType) -> ChaikinVolatility","summary":"The Chaikin Volatility indicator measures the trading range between the high and the low prices.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"rateOfChange","csharpType":"int","pythonType":"int","summary":"The value of the rage of change used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"ChaikinVolatility","pythonType":"ChaikinVolatility","summary":"Chaikin Volatility indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyChaikinVolatility = Indicators.ChaikinVolatility(dailyBars, 10, 10, MovingAverageType.Exponential);\nPrint(\"Daily Chaikin Volatility: {0}\", dailyChaikinVolatility.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyChaikinVolatility = api.Indicators.ChaikinVolatility(dailyBars, 10, 10, MovingAverageType.Exponential)\napi.Print(f\"Daily Chaikin Volatility: {dailyChaikinVolatility.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinVolatility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChaikinVolatility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChandeMomentumOscillator(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"ChandeMomentumOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChandeMomentumOscillator ChandeMomentumOscillator(DataSeries source, int periods)","python":"api.Indicators.ChandeMomentumOscillator(source: DataSeries, periods: int) -> ChandeMomentumOscillator","summary":"The Chande Momentum Oscillator (CMO) is a technical indicator designed to measure the momentum of a financial instrument.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"ChandeMomentumOscillator","pythonType":"ChandeMomentumOscillator","summary":"Chande Momentum Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cmo = Indicators.ChandeMomentumOscillator(Bars.ClosePrices, 9);\nif (cmo.Result.LastValue > 50)\n    Print(\"Chande Momentum Oscillator is overbought: {0}\", cmo.Result.LastValue);","python":"cmo = api.Indicators.ChandeMomentumOscillator(api.Bars.ClosePrices, 9)\nif cmo.Result.LastValue > 50:\n    api.Print(f\"Chande Momentum Oscillator is overbought: {cmo.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChandeMomentumOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChandeMomentumOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChandeMomentumOscillator(System.Int32)","kind":"method","name":"ChandeMomentumOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChandeMomentumOscillator ChandeMomentumOscillator(int periods)","python":"api.Indicators.ChandeMomentumOscillator(periods: int) -> ChandeMomentumOscillator","summary":"The Chande Momentum Oscillator (CMO) is a technical indicator designed to measure the momentum of a financial instrument.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"ChandeMomentumOscillator","pythonType":"ChandeMomentumOscillator","summary":"Chande Momentum Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cmo = Indicators.ChandeMomentumOscillator(9);\nPrint(\"Chande Momentum Oscillator(9): {0}\", cmo.Result.LastValue);","python":"cmo = api.Indicators.ChandeMomentumOscillator(9)\napi.Print(f\"Chande Momentum Oscillator(9): {cmo.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChandeMomentumOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ChandeMomentumOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CommodityChannelIndex(System.Int32)","kind":"method","name":"CommodityChannelIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CommodityChannelIndex CommodityChannelIndex(int periods)","python":"api.Indicators.CommodityChannelIndex(periods: int) -> CommodityChannelIndex","summary":"The Commodity Channel Index identifies overbought and oversold conditions, price reversals and trend strength.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"CommodityChannelIndex","pythonType":"CommodityChannelIndex","summary":"Commodity Channel Index indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cci = Indicators.CommodityChannelIndex(20);\nif (cci.Result.LastValue > 100)\n    Print(\"CCI(20) is above 100: {0}\", cci.Result.LastValue);","python":"cci = api.Indicators.CommodityChannelIndex(20)\nif cci.Result.LastValue > 100:\n    api.Print(f\"CCI(20) is above 100: {cci.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CommodityChannelIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CommodityChannelIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CommodityChannelIndex(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"CommodityChannelIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CommodityChannelIndex CommodityChannelIndex(DataSeries source, int periods)","python":"api.Indicators.CommodityChannelIndex(source: DataSeries, periods: int) -> CommodityChannelIndex","summary":"The Commodity Channel Index identifies overbought and oversold conditions, price reversals and trend strength.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"CommodityChannelIndex","pythonType":"CommodityChannelIndex","summary":"Commodity Channel Index indicator instance.","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var cci = Indicators.CommodityChannelIndex(Bars.TypicalPrices, 20);\nPrint(\"CCI(20) of typical prices: {0}\", cci.Result.LastValue);","python":"cci = api.Indicators.CommodityChannelIndex(api.Bars.TypicalPrices, 20)\napi.Print(f\"CCI(20) of typical prices: {cci.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CommodityChannelIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CommodityChannelIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CyberCycle(System.Double)","kind":"method","name":"CyberCycle","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CyberCycle CyberCycle(double alpha)","python":"api.Indicators.CyberCycle(alpha: float) -> CyberCycle","summary":"The Cyber Cycles Oscillator is an indicator designed by John Ehlers, it is used for isolating the cycle component of the market from its trend counterpart.","remarks":null,"parameters":[{"name":"alpha","csharpType":"double","pythonType":"float","summary":"CyberCycle Alpha"}],"returns":{"csharpType":"CyberCycle","pythonType":"CyberCycle","summary":"CyberCycle","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cyberCycle = Indicators.CyberCycle(0.07);\nPrint(\"Cyber Cycle: {0}, trigger: {1}\", cyberCycle.Cycle.LastValue, cyberCycle.Trigger.LastValue);","python":"cyberCycle = api.Indicators.CyberCycle(0.07)\napi.Print(f\"Cyber Cycle: {cyberCycle.Cycle.LastValue}, trigger: {cyberCycle.Trigger.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CyberCycle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/CyberCycle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DeMarker(System.Int32)","kind":"method","name":"DeMarker","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DeMarker DeMarker(int periods)","python":"api.Indicators.DeMarker(periods: int) -> DeMarker","summary":"The DeMarker (DeM) is an oscillator that compares the most recent maximum and minimum prices to the previous period's equivalent price.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"}],"returns":{"csharpType":"DeMarker","pythonType":"DeMarker","summary":"DeMarker","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var deMarker = Indicators.DeMarker(14);\nif (deMarker.Result.Last(1) < 0.3)\n    Print(\"DeMarker is oversold: {0}\", deMarker.Result.Last(1));","python":"deMarker = api.Indicators.DeMarker(14)\nif deMarker.Result.Last(1) < 0.3:\n    api.Print(f\"DeMarker is oversold: {deMarker.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DeMarker/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DeMarker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DeMarker(cAlgo.API.Bars,System.Int32)","kind":"method","name":"DeMarker","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DeMarker DeMarker(Bars bars, int periods)","python":"api.Indicators.DeMarker(bars: Bars, periods: int) -> DeMarker","summary":"The DeMarker (DeM) is an oscillator that compares the most recent maximum and minimum prices to the previous period's equivalent price.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"}],"returns":{"csharpType":"DeMarker","pythonType":"DeMarker","summary":"DeMarker","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyDeMarker = Indicators.DeMarker(dailyBars, 14);\nPrint(\"Daily DeMarker: {0}\", dailyDeMarker.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyDeMarker = api.Indicators.DeMarker(dailyBars, 14)\napi.Print(f\"Daily DeMarker: {dailyDeMarker.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DeMarker/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DeMarker/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DetrendedPriceOscillator(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"DetrendedPriceOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DetrendedPriceOscillator DetrendedPriceOscillator(DataSeries source, int periods, MovingAverageType maType)","python":"api.Indicators.DetrendedPriceOscillator(source: DataSeries, periods: int, maType: MovingAverageType) -> DetrendedPriceOscillator","summary":"The Detrended Price Oscillator shows intermediate overbought and oversold levels.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"DetrendedPriceOscillator","pythonType":"DetrendedPriceOscillator","summary":"Detrended Price Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dpoFast = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 10, MovingAverageType.Simple);\nvar dpoSlow = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 30, MovingAverageType.Simple);\nif (dpoFast.Result.Last(1) > dpoSlow.Result.Last(1))\n    Print(\"Fast DPO is above slow DPO\");","python":"dpoFast = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 10, MovingAverageType.Simple)\ndpoSlow = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 30, MovingAverageType.Simple)\nif dpoFast.Result.Last(1) > dpoSlow.Result.Last(1):\n    api.Print(\"Fast DPO is above slow DPO\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DetrendedPriceOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DetrendedPriceOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DirectionalMovementSystem(System.Int32)","kind":"method","name":"DirectionalMovementSystem","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DirectionalMovementSystem DirectionalMovementSystem(int periods)","python":"api.Indicators.DirectionalMovementSystem(periods: int) -> DirectionalMovementSystem","summary":"The Directional Movement System is composed of three indicators that show if the market is trending and provide signals.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"DirectionalMovementSystem","pythonType":"DirectionalMovementSystem","summary":"Directional Movement System indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dms = Indicators.DirectionalMovementSystem(14);\nif (dms.ADX.LastValue > 25 && dms.DIPlus.LastValue > dms.DIMinus.LastValue)\n    Print(\"Strong up trend, ADX: {0}\", dms.ADX.LastValue);","python":"dms = api.Indicators.DirectionalMovementSystem(14)\nif dms.ADX.LastValue > 25 and dms.DIPlus.LastValue > dms.DIMinus.LastValue:\n    api.Print(f\"Strong up trend, ADX: {dms.ADX.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DirectionalMovementSystem(cAlgo.API.Bars,System.Int32)","kind":"method","name":"DirectionalMovementSystem","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DirectionalMovementSystem DirectionalMovementSystem(Bars bars, int periods)","python":"api.Indicators.DirectionalMovementSystem(bars: Bars, periods: int) -> DirectionalMovementSystem","summary":"The Directional Movement System is composed of three indicators that show if the market is trending and provide signals.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"DirectionalMovementSystem","pythonType":"DirectionalMovementSystem","summary":"Directional Movement System indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyDms = Indicators.DirectionalMovementSystem(dailyBars, 14);\nPrint(\"Daily ADX: {0}, DI+: {1}, DI-: {2}\", dailyDms.ADX.LastValue, dailyDms.DIPlus.LastValue, dailyDms.DIMinus.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyDms = api.Indicators.DirectionalMovementSystem(dailyBars, 14)\napi.Print(f\"Daily ADX: {dailyDms.ADX.LastValue}, DI+: {dailyDms.DIPlus.LastValue}, DI-: {dailyDms.DIMinus.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DirectionalMovementSystem(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"DirectionalMovementSystem","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DirectionalMovementSystem DirectionalMovementSystem(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.DirectionalMovementSystem(bars: Bars, periods: int, maType: MovingAverageType) -> DirectionalMovementSystem","summary":"The Directional Movement System is composed of three indicators that show if the market is trending and provide signals.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Method of calculation of MA."}],"returns":{"csharpType":"DirectionalMovementSystem","pythonType":"DirectionalMovementSystem","summary":"Directional Movement System indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyDms = Indicators.DirectionalMovementSystem(dailyBars, 14, MovingAverageType.Exponential);\nPrint(\"Daily ADX (exponential smoothing): {0}\", dailyDms.ADX.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyDms = api.Indicators.DirectionalMovementSystem(dailyBars, 14, MovingAverageType.Exponential)\napi.Print(f\"Daily ADX (exponential smoothing): {dailyDms.ADX.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DirectionalMovementSystem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DonchianChannel(System.Int32)","kind":"method","name":"DonchianChannel","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DonchianChannel DonchianChannel(int periods)","python":"api.Indicators.DonchianChannel(periods: int) -> DonchianChannel","summary":"The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.","remarks":"The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.","parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Period of Calculation of the Donchian Channel"}],"returns":{"csharpType":"DonchianChannel","pythonType":"DonchianChannel","summary":"Donchian Channel indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var donchianChannel = Indicators.DonchianChannel(20);\nPrint(\"Donchian top: {0}, middle: {1}, bottom: {2}\", donchianChannel.Top.LastValue, donchianChannel.Middle.LastValue, donchianChannel.Bottom.LastValue);","python":"donchianChannel = api.Indicators.DonchianChannel(20)\napi.Print(f\"Donchian top: {donchianChannel.Top.LastValue}, middle: {donchianChannel.Middle.LastValue}, bottom: {donchianChannel.Bottom.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DonchianChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DonchianChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DonchianChannel(cAlgo.API.Bars,System.Int32)","kind":"method","name":"DonchianChannel","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DonchianChannel DonchianChannel(Bars bars, int periods)","python":"api.Indicators.DonchianChannel(bars: Bars, periods: int) -> DonchianChannel","summary":"The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.","remarks":"The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Period of Calculation of the Dochian Channel"}],"returns":{"csharpType":"DonchianChannel","pythonType":"DonchianChannel","summary":"Donchian Channel indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyDonchian = Indicators.DonchianChannel(dailyBars, 20);\nif (Symbol.Bid > dailyDonchian.Top.Last(1))\n    Print(\"Bid broke above the 20 day high {0}\", dailyDonchian.Top.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyDonchian = api.Indicators.DonchianChannel(dailyBars, 20)\nif api.Symbol.Bid > dailyDonchian.Top.Last(1):\n    api.Print(f\"Bid broke above the 20 day high {dailyDonchian.Top.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DonchianChannel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DonchianChannel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DoubleExponentialMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"DoubleExponentialMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DoubleExponentialMovingAverage DoubleExponentialMovingAverage(DataSeries source, int periods)","python":"api.Indicators.DoubleExponentialMovingAverage(source: DataSeries, periods: int) -> DoubleExponentialMovingAverage","summary":"The Double Exponential Moving Average (DEMA) is a combination of smoothed exponential moving averages (EMA) and a basic EMA","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation."}],"returns":{"csharpType":"DoubleExponentialMovingAverage","pythonType":"DoubleExponentialMovingAverage","summary":"The DEMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dema = Indicators.DoubleExponentialMovingAverage(Bars.ClosePrices, 20);\nPrint(\"DEMA(20): {0}\", dema.Result.LastValue);","python":"dema = api.Indicators.DoubleExponentialMovingAverage(api.Bars.ClosePrices, 20)\napi.Print(f\"DEMA(20): {dema.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DoubleExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/DoubleExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.EaseOfMovement(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"EaseOfMovement","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"EaseOfMovement EaseOfMovement(int periods, MovingAverageType maType)","python":"api.Indicators.EaseOfMovement(periods: int, maType: MovingAverageType) -> EaseOfMovement","summary":"The Ease Of Movement indicator relates the price change to the volume.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"The moving average type used for the calculation"}],"returns":{"csharpType":"EaseOfMovement","pythonType":"EaseOfMovement","summary":"Ease Of Movement indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var easeOfMovement = Indicators.EaseOfMovement(14, MovingAverageType.Simple);\nPrint(\"Ease Of Movement: {0}\", easeOfMovement.Result.Last(1));","python":"easeOfMovement = api.Indicators.EaseOfMovement(14, MovingAverageType.Simple)\napi.Print(f\"Ease Of Movement: {easeOfMovement.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/EaseOfMovement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/EaseOfMovement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.EaseOfMovement(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"EaseOfMovement","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"EaseOfMovement EaseOfMovement(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.EaseOfMovement(bars: Bars, periods: int, maType: MovingAverageType) -> EaseOfMovement","summary":"The Ease Of Movement indicator relates the price change to the volume.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"The moving average type used for the calculation"}],"returns":{"csharpType":"EaseOfMovement","pythonType":"EaseOfMovement","summary":"Ease Of Movement indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyEaseOfMovement = Indicators.EaseOfMovement(dailyBars, 14, MovingAverageType.Simple);\nPrint(\"Daily Ease Of Movement: {0}\", dailyEaseOfMovement.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyEaseOfMovement = api.Indicators.EaseOfMovement(dailyBars, 14, MovingAverageType.Simple)\napi.Print(f\"Daily Ease Of Movement: {dailyEaseOfMovement.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/EaseOfMovement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/EaseOfMovement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ElderForceIndex(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ElderForceIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ElderForceIndex ElderForceIndex(int periods, MovingAverageType maType)","python":"api.Indicators.ElderForceIndex(periods: int, maType: MovingAverageType) -> ElderForceIndex","summary":"Elder's Force Index measures the amount of power used to move the price of an asset.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ElderForceIndex","pythonType":"ElderForceIndex","summary":"ElderForceIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var forceIndex = Indicators.ElderForceIndex(13, MovingAverageType.Exponential);\nPrint(\"Elder Force Index: {0}\", forceIndex.Result.Last(1));","python":"forceIndex = api.Indicators.ElderForceIndex(13, MovingAverageType.Exponential)\napi.Print(f\"Elder Force Index: {forceIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderForceIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderForceIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ElderForceIndex(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ElderForceIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ElderForceIndex ElderForceIndex(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.ElderForceIndex(bars: Bars, periods: int, maType: MovingAverageType) -> ElderForceIndex","summary":"Elder's Force Index measures the amount of power used to move the price of an asset.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ElderForceIndex","pythonType":"ElderForceIndex","summary":"ElderForceIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyForceIndex = Indicators.ElderForceIndex(dailyBars, 13, MovingAverageType.Exponential);\nPrint(\"Daily Elder Force Index: {0}\", dailyForceIndex.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyForceIndex = api.Indicators.ElderForceIndex(dailyBars, 13, MovingAverageType.Exponential)\napi.Print(f\"Daily Elder Force Index: {dailyForceIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderForceIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderForceIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ElderRayIndex(System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ElderRayIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ElderRayIndex ElderRayIndex(int periods, MovingAverageType maType)","python":"api.Indicators.ElderRayIndex(periods: int, maType: MovingAverageType) -> ElderRayIndex","summary":"Elder Ray Index shows the maximum bullish and bearish strengths during the time period.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ElderRayIndex","pythonType":"ElderRayIndex","summary":"ElderRayIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var elderRay = Indicators.ElderRayIndex(13, MovingAverageType.Exponential);\nPrint(\"Elder Ray bulls power: {0}, bears power: {1}\", elderRay.BullsPower.Last(1), elderRay.BearsPower.Last(1));","python":"elderRay = api.Indicators.ElderRayIndex(13, MovingAverageType.Exponential)\napi.Print(f\"Elder Ray bulls power: {elderRay.BullsPower.Last(1)}, bears power: {elderRay.BearsPower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderRayIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderRayIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ElderRayIndex(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ElderRayIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ElderRayIndex ElderRayIndex(Bars bars, int periods, MovingAverageType maType)","python":"api.Indicators.ElderRayIndex(bars: Bars, periods: int, maType: MovingAverageType) -> ElderRayIndex","summary":"Elder Ray Index shows the maximum bullish and bearish strengths during the time period.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"ElderRayIndex","pythonType":"ElderRayIndex","summary":"ElderRayIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyElderRay = Indicators.ElderRayIndex(dailyBars, 13, MovingAverageType.Exponential);\nPrint(\"Daily Elder Ray bulls power: {0}, bears power: {1}\", dailyElderRay.BullsPower.Last(1), dailyElderRay.BearsPower.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyElderRay = api.Indicators.ElderRayIndex(dailyBars, 13, MovingAverageType.Exponential)\napi.Print(f\"Daily Elder Ray bulls power: {dailyElderRay.BullsPower.Last(1)}, bears power: {dailyElderRay.BearsPower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderRayIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ElderRayIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Envelopes(System.Int32,cAlgo.API.MovingAverageType,System.Double)","kind":"method","name":"Envelopes","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Envelopes Envelopes(int periods, MovingAverageType maType, double deviation)","python":"api.Indicators.Envelopes(periods: int, maType: MovingAverageType, deviation: float) -> Envelopes","summary":"The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"},{"name":"deviation","csharpType":"double","pythonType":"float","summary":"The distance from the moving average in percents"}],"returns":{"csharpType":"Envelopes","pythonType":"Envelopes","summary":"Envelopes indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var envelopes = Indicators.Envelopes(20, MovingAverageType.Simple, 0.1);\nPrint(\"Envelopes upper: {0}, main: {1}, lower: {2}\", envelopes.Upper.LastValue, envelopes.Main.LastValue, envelopes.Lower.LastValue);","python":"envelopes = api.Indicators.Envelopes(20, MovingAverageType.Simple, 0.1)\napi.Print(f\"Envelopes upper: {envelopes.Upper.LastValue}, main: {envelopes.Main.LastValue}, lower: {envelopes.Lower.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Envelopes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Envelopes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Envelopes(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType,System.Double)","kind":"method","name":"Envelopes","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Envelopes Envelopes(DataSeries source, int periods, MovingAverageType maType, double deviation)","python":"api.Indicators.Envelopes(source: DataSeries, periods: int, maType: MovingAverageType, deviation: float) -> Envelopes","summary":"The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"},{"name":"deviation","csharpType":"double","pythonType":"float","summary":"The distance from the moving average in percents"}],"returns":{"csharpType":"Envelopes","pythonType":"Envelopes","summary":"Envelopes indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);\nif (Symbol.Bid > envelopes.Upper.LastValue)\n    Print(\"Bid is above the upper envelope {0}\", envelopes.Upper.LastValue);","python":"envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)\nif api.Symbol.Bid > envelopes.Upper.LastValue:\n    api.Print(f\"Bid is above the upper envelope {envelopes.Upper.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Envelopes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Envelopes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ExponentialMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"ExponentialMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ExponentialMovingAverage ExponentialMovingAverage(DataSeries source, int periods)","python":"api.Indicators.ExponentialMovingAverage(source: DataSeries, periods: int) -> ExponentialMovingAverage","summary":"The Exponential Moving Average smoothes the price data producing a trend indicator.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for the EMA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."}],"returns":{"csharpType":"ExponentialMovingAverage","pythonType":"ExponentialMovingAverage","summary":"Exponential Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ema = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 20);\nif (Bars.ClosePrices.Last(1) > ema.Result.Last(1))\n    Print(\"Last bar closed above EMA(20): {0}\", ema.Result.Last(1));","python":"ema = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 20)\nif api.Bars.ClosePrices.Last(1) > ema.Result.Last(1):\n    api.Print(f\"Last bar closed above EMA(20): {ema.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalAdaptiveMovingAverage(System.Int32)","kind":"method","name":"FractalAdaptiveMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalAdaptiveMovingAverage FractalAdaptiveMovingAverage(int periods)","python":"api.Indicators.FractalAdaptiveMovingAverage(periods: int) -> FractalAdaptiveMovingAverage","summary":"The Fractal Adaptive Moving Average (FRAMA) indicator is a type of moving average that adjusts its sensitivity to price movements based on market volatility","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation. Must be an even number."}],"returns":{"csharpType":"FractalAdaptiveMovingAverage","pythonType":"FractalAdaptiveMovingAverage","summary":"The FRAMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var frama = Indicators.FractalAdaptiveMovingAverage(16);\nPrint(\"FRAMA(16): {0}\", frama.Result.LastValue);","python":"frama = api.Indicators.FractalAdaptiveMovingAverage(16)\napi.Print(f\"FRAMA(16): {frama.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalAdaptiveMovingAverage(cAlgo.API.Bars,System.Int32)","kind":"method","name":"FractalAdaptiveMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalAdaptiveMovingAverage FractalAdaptiveMovingAverage(Bars bars, int periods)","python":"api.Indicators.FractalAdaptiveMovingAverage(bars: Bars, periods: int) -> FractalAdaptiveMovingAverage","summary":"The Fractal Adaptive Moving Average (FRAMA) indicator is a type of moving average that adjusts its sensitivity to price movements based on market volatility","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation. Must be an even number."}],"returns":{"csharpType":"FractalAdaptiveMovingAverage","pythonType":"FractalAdaptiveMovingAverage","summary":"The FRAMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyFrama = Indicators.FractalAdaptiveMovingAverage(dailyBars, 16);\nPrint(\"Daily FRAMA(16): {0}\", dailyFrama.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyFrama = api.Indicators.FractalAdaptiveMovingAverage(dailyBars, 16)\napi.Print(f\"Daily FRAMA(16): {dailyFrama.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalChaosBands","kind":"method","name":"FractalChaosBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalChaosBands FractalChaosBands()","python":"api.Indicators.FractalChaosBands() -> FractalChaosBands","summary":"The Fractal Chaos Bands indicator breaks down large trends into predictable patterns.","remarks":null,"parameters":[],"returns":{"csharpType":"FractalChaosBands","pythonType":"FractalChaosBands","summary":"Fractal Chaos Bands indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractalChaosBands = Indicators.FractalChaosBands();\nPrint(\"Fractal Chaos Bands high: {0}, low: {1}\", fractalChaosBands.High.LastValue, fractalChaosBands.Low.LastValue);","python":"fractalChaosBands = api.Indicators.FractalChaosBands()\napi.Print(f\"Fractal Chaos Bands high: {fractalChaosBands.High.LastValue}, low: {fractalChaosBands.Low.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalChaosBands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalChaosBands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalChaosBands(cAlgo.API.Bars)","kind":"method","name":"FractalChaosBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalChaosBands FractalChaosBands(Bars bars)","python":"api.Indicators.FractalChaosBands(bars: Bars) -> FractalChaosBands","summary":"The Fractal Chaos Bands indicator breaks down large trends into predictable patterns.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"FractalChaosBands","pythonType":"FractalChaosBands","summary":"Fractal Chaos Bands indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyChaosBands = Indicators.FractalChaosBands(dailyBars);\nPrint(\"Daily Fractal Chaos Bands high: {0}, low: {1}\", dailyChaosBands.High.LastValue, dailyChaosBands.Low.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyChaosBands = api.Indicators.FractalChaosBands(dailyBars)\napi.Print(f\"Daily Fractal Chaos Bands high: {dailyChaosBands.High.LastValue}, low: {dailyChaosBands.Low.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalChaosBands/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/FractalChaosBands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Fractals(System.Int32)","kind":"method","name":"Fractals","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Fractals Fractals(int periods)","python":"api.Indicators.Fractals(periods: int) -> Fractals","summary":"The fractal indicator is a trading indicator used in technical analysis that is used to identify potential trend reversal points in a market.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Fractals Period"}],"returns":{"csharpType":"Fractals","pythonType":"Fractals","summary":"Fractals","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fractals = Indicators.Fractals(5);\n// A fractal value is NaN on bars without a fractal\nif (!double.IsNaN(fractals.UpFractal.Last(3)))\n    Print(\"Up fractal at {0}\", fractals.UpFractal.Last(3));","python":"import math\nfractals = api.Indicators.Fractals(5)\n# A fractal value is NaN on bars without a fractal\nif not math.isnan(fractals.UpFractal.Last(3)):\n    api.Print(f\"Up fractal at {fractals.UpFractal.Last(3)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Fractals/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Fractals/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Fractals(cAlgo.API.Bars,System.Int32)","kind":"method","name":"Fractals","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Fractals Fractals(Bars bars, int periods)","python":"api.Indicators.Fractals(bars: Bars, periods: int) -> Fractals","summary":"The fractal indicator is a trading indicator used in technical analysis that is used to identify potential trend reversal points in a market.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Fractals Period"}],"returns":{"csharpType":"Fractals","pythonType":"Fractals","summary":"Fractals","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyFractals = Indicators.Fractals(dailyBars, 5);\nPrint(\"Daily down fractal three bars ago: {0}\", dailyFractals.DownFractal.Last(3));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyFractals = api.Indicators.Fractals(dailyBars, 5)\napi.Print(f\"Daily down fractal three bars ago: {dailyFractals.DownFractal.Last(3)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Fractals/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Fractals/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.GatorOscillator(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"GatorOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"GatorOscillator GatorOscillator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)","python":"api.Indicators.GatorOscillator(jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> GatorOscillator","summary":"Gator Oscillator (GO) supplements the Alligator indicator and is used together with it.","remarks":null,"parameters":[{"name":"jawsPeriods","csharpType":"int","pythonType":"int","summary":"The jaws period of Alligator"},{"name":"jawsShift","csharpType":"int","pythonType":"int","summary":"The jaws shift of Alligator"},{"name":"teethPeriods","csharpType":"int","pythonType":"int","summary":"The teeth period of Alligator"},{"name":"teethShift","csharpType":"int","pythonType":"int","summary":"The teeth shift of Alligator"},{"name":"lipsPeriods","csharpType":"int","pythonType":"int","summary":"The lips period of Alligator"},{"name":"lipsShift","csharpType":"int","pythonType":"int","summary":"The lips shift of Alligator"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"GatorOscillator","pythonType":"GatorOscillator","summary":"GatorOscillator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gator = Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple);\nPrint(\"Gator upper: {0}, lower: {1}\", gator.Upper.Last(1), gator.Lower.Last(1));","python":"gator = api.Indicators.GatorOscillator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple)\napi.Print(f\"Gator upper: {gator.Upper.Last(1)}, lower: {gator.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GatorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GatorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.GatorOscillator(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"GatorOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"GatorOscillator GatorOscillator(DataSeries source, int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)","python":"api.Indicators.GatorOscillator(source: DataSeries, jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> GatorOscillator","summary":"Gator Oscillator (GO) supplements the Alligator indicator and is used together with it.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for the Alligator calculation."},{"name":"jawsPeriods","csharpType":"int","pythonType":"int","summary":"The jaws period of Alligator"},{"name":"jawsShift","csharpType":"int","pythonType":"int","summary":"The jaws shift of Alligator"},{"name":"teethPeriods","csharpType":"int","pythonType":"int","summary":"The teeth period of Alligator"},{"name":"teethShift","csharpType":"int","pythonType":"int","summary":"The teeth shift of Alligator"},{"name":"lipsPeriods","csharpType":"int","pythonType":"int","summary":"The lips period of Alligator"},{"name":"lipsShift","csharpType":"int","pythonType":"int","summary":"The lips shift of Alligator"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"GatorOscillator","pythonType":"GatorOscillator","summary":"GatorOscillator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gator = Indicators.GatorOscillator(Bars.MedianPrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple);\nPrint(\"Gator on median prices, upper: {0}, lower: {1}\", gator.Upper.Last(1), gator.Lower.Last(1));","python":"gator = api.Indicators.GatorOscillator(api.Bars.MedianPrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple)\napi.Print(f\"Gator on median prices, upper: {gator.Upper.Last(1)}, lower: {gator.Lower.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GatorOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GatorOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.GetIndicator``1(System.Object[])","kind":"method","name":"GetIndicator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TIndicator GetIndicator(object[] parameterValues)","python":"api.Indicators.GetIndicator(parameterValues: list[object]) -> TIndicator","summary":"Initializes the custom indicator","remarks":null,"parameters":[{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The custom indicator parameter values or an anonymous object that contains custom indicator parameter values."}],"returns":{"csharpType":"TIndicator","pythonType":"TIndicator","summary":"Custom indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // SampleSMA and SampleSmaBot are separate algo projects: the config.json tab is the SampleSMA indicator's,\n    // and the cBot references the SampleSMA project\n    public partial class SampleSMA : Indicator\n    {\n        private SimpleMovingAverage _sma;\n\n        protected override void Initialize() => _sma = Indicators.SimpleMovingAverage(Source, Periods);\n\n        public override void Calculate(int index) => Result[index] = _sma.Result[index];\n    }\n\n    public partial class SampleSmaBot : Robot\n    {\n        protected override void OnStart()\n        {\n            // Parameter values are passed in the order the custom indicator declares them\n            var sampleSma = Indicators.GetIndicator<SampleSMA>(Bars.ClosePrices, 20);\n            Print(\"SampleSMA: {0}\", sampleSma.Result.LastValue);\n        }\n    }\n}","python":"# The SampleSMA indicator project must be referenced by this algo; the config.json tab is SampleSMA's\nsampleSma = api.GetIndicator(\"SampleSMA\", api.Bars.ClosePrices, 20)\napi.Print(f\"SampleSMA: {sampleSma.Result.LastValue}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    },\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GetIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GetIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.GetIndicator``1(cAlgo.API.Bars,System.Object[])","kind":"method","name":"GetIndicator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TIndicator GetIndicator(Bars bars, object[] parameterValues)","python":"api.Indicators.GetIndicator(bars: Bars, parameterValues: list[object]) -> TIndicator","summary":"Initializes the custom indicator","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":"The custom indicator parameter values or an anonymous object that contains custom indicator parameter values."}],"returns":{"csharpType":"TIndicator","pythonType":"TIndicator","summary":"Custom indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // SampleSMA and DailySmaBot are separate algo projects: the config.json tab is the SampleSMA indicator's,\n    // and the cBot references the SampleSMA project\n    public partial class SampleSMA : Indicator\n    {\n        private SimpleMovingAverage _sma;\n\n        protected override void Initialize() => _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, Periods);\n\n        public override void Calculate(int index) => Result[index] = _sma.Result[index];\n    }\n\n    public partial class DailySmaBot : Robot\n    {\n        protected override void OnStart()\n        {\n            var dailyBars = MarketData.GetBars(TimeFrame.Daily);\n            // The custom indicator is calculated on the daily bars instead of the chart bars\n            var dailySma = Indicators.GetIndicator<SampleSMA>(dailyBars, 20);\n            Print(\"Daily SMA(20): {0}\", dailySma.Result.LastValue);\n        }\n    }\n}","python":"# The SampleSMA indicator project must be referenced by this algo; the config.json tab is SampleSMA's\ndailySma = api.GetIndicator(\"SampleSMA\", api.MarketData.GetBars(TimeFrame.Daily), 20)","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GetIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/GetIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.HighMinusLow","kind":"method","name":"HighMinusLow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"HighMinusLow HighMinusLow()","python":"api.Indicators.HighMinusLow() -> HighMinusLow","summary":"The High Minus Low indicator is used to compute the range of daily bars","remarks":null,"parameters":[],"returns":{"csharpType":"HighMinusLow","pythonType":"HighMinusLow","summary":"High Minus Low indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var highMinusLow = Indicators.HighMinusLow();\nPrint(\"Range of the last closed bar: {0}\", highMinusLow.Result.Last(1));","python":"highMinusLow = api.Indicators.HighMinusLow()\napi.Print(f\"Range of the last closed bar: {highMinusLow.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HighMinusLow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HighMinusLow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.HighMinusLow(cAlgo.API.Bars)","kind":"method","name":"HighMinusLow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"HighMinusLow HighMinusLow(Bars bars)","python":"api.Indicators.HighMinusLow(bars: Bars) -> HighMinusLow","summary":"The High Minus Low indicator is used to compute the range of daily bars","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"HighMinusLow","pythonType":"HighMinusLow","summary":"High Minus Low indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyRange = Indicators.HighMinusLow(dailyBars);\nPrint(\"Range of the last closed daily bar: {0}\", dailyRange.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyRange = api.Indicators.HighMinusLow(dailyBars)\napi.Print(f\"Range of the last closed daily bar: {dailyRange.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HighMinusLow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HighMinusLow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.HistoricalVolatility(cAlgo.API.DataSeries,System.Int32,System.Int32)","kind":"method","name":"HistoricalVolatility","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"HistoricalVolatility HistoricalVolatility(DataSeries source, int periods, int barHistory)","python":"api.Indicators.HistoricalVolatility(source: DataSeries, periods: int, barHistory: int) -> HistoricalVolatility","summary":"The Historical Volatility indicator is derived from time series of past market prices.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"barHistory","csharpType":"int","pythonType":"int","summary":"The value of the bar history used for calculation."}],"returns":{"csharpType":"HistoricalVolatility","pythonType":"HistoricalVolatility","summary":"Historical Volatility indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var historicalVolatility = Indicators.HistoricalVolatility(Bars.ClosePrices, 20, 252);\nPrint(\"Historical volatility: {0}\", historicalVolatility.Result.LastValue);","python":"historicalVolatility = api.Indicators.HistoricalVolatility(api.Bars.ClosePrices, 20, 252)\napi.Print(f\"Historical volatility: {historicalVolatility.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HistoricalVolatility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HistoricalVolatility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.HullMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"HullMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"HullMovingAverage HullMovingAverage(DataSeries source, int periods)","python":"api.Indicators.HullMovingAverage(source: DataSeries, periods: int) -> HullMovingAverage","summary":"The Hull Moving Average is a more responsive moving average that nearly removes lag and improves smoothing at the same time.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"HullMovingAverage","pythonType":"HullMovingAverage","summary":"Hull Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var hma = Indicators.HullMovingAverage(Bars.ClosePrices, 14);\nvar isRising = hma.Result.Last(1) > hma.Result.Last(2);\nPrint(\"HMA(14): {0}, rising: {1}\", hma.Result.Last(1), isRising);","python":"hma = api.Indicators.HullMovingAverage(api.Bars.ClosePrices, 14)\nisRising = hma.Result.Last(1) > hma.Result.Last(2)\napi.Print(f\"HMA(14): {hma.Result.Last(1)}, rising: {isRising}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HullMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/HullMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.IchimokuKinkoHyo(System.Int32,System.Int32,System.Int32)","kind":"method","name":"IchimokuKinkoHyo","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"IchimokuKinkoHyo IchimokuKinkoHyo(int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)","python":"api.Indicators.IchimokuKinkoHyo(tenkanSenPeriods: int, kijunSenPeriods: int, senkouSpanBPeriods: int) -> IchimokuKinkoHyo","summary":"Ichimoku Kinko Hyo Indicator is a moving average based trend identification system.","remarks":"Ichimoku Kinko Hyo Indicator contains more data points than standard candlestick charts and thus provides a clearer picture of potential price action.","parameters":[{"name":"tenkanSenPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Tenkan Sen"},{"name":"kijunSenPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Kijun Sen"},{"name":"senkouSpanBPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Senkou Span B"}],"returns":{"csharpType":"IchimokuKinkoHyo","pythonType":"IchimokuKinkoHyo","summary":"Ichimoku Kinko Hyo Indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimoku = Indicators.IchimokuKinkoHyo(9, 26, 52);\nPrint(\"Tenkan Sen: {0}, Kijun Sen: {1}\", ichimoku.TenkanSen.LastValue, ichimoku.KijunSen.LastValue);\nPrint(\"Senkou Span A: {0}, Senkou Span B: {1}, Chikou Span: {2}\", ichimoku.SenkouSpanA.LastValue, ichimoku.SenkouSpanB.LastValue, ichimoku.ChikouSpan.LastValue);","python":"ichimoku = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\napi.Print(f\"Tenkan Sen: {ichimoku.TenkanSen.LastValue}, Kijun Sen: {ichimoku.KijunSen.LastValue}\")\napi.Print(f\"Senkou Span A: {ichimoku.SenkouSpanA.LastValue}, Senkou Span B: {ichimoku.SenkouSpanB.LastValue}, Chikou Span: {ichimoku.ChikouSpan.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/IchimokuKinkoHyo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/IchimokuKinkoHyo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.IchimokuKinkoHyo(cAlgo.API.Bars,System.Int32,System.Int32,System.Int32)","kind":"method","name":"IchimokuKinkoHyo","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"IchimokuKinkoHyo IchimokuKinkoHyo(Bars bars, int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)","python":"api.Indicators.IchimokuKinkoHyo(bars: Bars, tenkanSenPeriods: int, kijunSenPeriods: int, senkouSpanBPeriods: int) -> IchimokuKinkoHyo","summary":"Ichimoku Kinko Hyo Indicator is a moving average based trend identification system.","remarks":"Ichimoku Kinko Hyo Indicator contains more data points than standard candlestick charts and thus provides a clearer picture of potential price action.","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"tenkanSenPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Tenkan Sen"},{"name":"kijunSenPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Kijun Sen"},{"name":"senkouSpanBPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the Senkou Span B"}],"returns":{"csharpType":"IchimokuKinkoHyo","pythonType":"IchimokuKinkoHyo","summary":"Ichimoku Kinko Hyo Indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyIchimoku = Indicators.IchimokuKinkoHyo(dailyBars, 9, 26, 52);\nif (dailyIchimoku.TenkanSen.LastValue > dailyIchimoku.KijunSen.LastValue)\n    Print(\"Daily Tenkan Sen is above Kijun Sen\");","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyIchimoku = api.Indicators.IchimokuKinkoHyo(dailyBars, 9, 26, 52)\nif dailyIchimoku.TenkanSen.LastValue > dailyIchimoku.KijunSen.LastValue:\n    api.Print(\"Daily Tenkan Sen is above Kijun Sen\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/IchimokuKinkoHyo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/IchimokuKinkoHyo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.KaufmanAdaptiveMovingAverage(System.Int32,System.Int32,System.Int32)","kind":"method","name":"KaufmanAdaptiveMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"KaufmanAdaptiveMovingAverage KaufmanAdaptiveMovingAverage(int periods, int fastPeriods, int slowPeriods)","python":"api.Indicators.KaufmanAdaptiveMovingAverage(periods: int, fastPeriods: int, slowPeriods: int) -> KaufmanAdaptiveMovingAverage","summary":"The Kaufman's Adaptive Moving Average (KAMA) indicator is a type of adaptive moving average designed to adjust its smoothing factor based on market volatility","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation. Must be an even number."},{"name":"fastPeriods","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"slowPeriods","csharpType":"int","pythonType":"int","summary":"The slow moving average period"}],"returns":{"csharpType":"KaufmanAdaptiveMovingAverage","pythonType":"KaufmanAdaptiveMovingAverage","summary":"The KAMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var kama = Indicators.KaufmanAdaptiveMovingAverage(10, 2, 30);\nPrint(\"KAMA(10, 2, 30): {0}\", kama.Result.LastValue);","python":"kama = api.Indicators.KaufmanAdaptiveMovingAverage(10, 2, 30)\napi.Print(f\"KAMA(10, 2, 30): {kama.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KaufmanAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KaufmanAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.KaufmanAdaptiveMovingAverage(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32)","kind":"method","name":"KaufmanAdaptiveMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"KaufmanAdaptiveMovingAverage KaufmanAdaptiveMovingAverage(DataSeries source, int periods, int fastPeriods, int slowPeriods)","python":"api.Indicators.KaufmanAdaptiveMovingAverage(source: DataSeries, periods: int, fastPeriods: int, slowPeriods: int) -> KaufmanAdaptiveMovingAverage","summary":"The Kaufman's Adaptive Moving Average (KAMA) indicator is a type of adaptive moving average designed to adjust its smoothing factor based on market volatility","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation. Must be an even number."},{"name":"fastPeriods","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"slowPeriods","csharpType":"int","pythonType":"int","summary":"The slow moving average period"}],"returns":{"csharpType":"KaufmanAdaptiveMovingAverage","pythonType":"KaufmanAdaptiveMovingAverage","summary":"The KAMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var kama = Indicators.KaufmanAdaptiveMovingAverage(Bars.TypicalPrices, 10, 2, 30);\nPrint(\"KAMA of typical prices: {0}\", kama.Result.LastValue);","python":"kama = api.Indicators.KaufmanAdaptiveMovingAverage(api.Bars.TypicalPrices, 10, 2, 30)\napi.Print(f\"KAMA of typical prices: {kama.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KaufmanAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KaufmanAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.KeltnerChannels(System.Int32,cAlgo.API.MovingAverageType,System.Int32,cAlgo.API.MovingAverageType,System.Double)","kind":"method","name":"KeltnerChannels","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"KeltnerChannels KeltnerChannels(int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)","python":"api.Indicators.KeltnerChannels(maPeriod: int, maType: MovingAverageType, atrPeriod: int, atrMaType: MovingAverageType, bandDistance: float) -> KeltnerChannels","summary":"Initializes the Keltner Channels indicator instance","remarks":null,"parameters":[{"name":"maPeriod","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"},{"name":"atrPeriod","csharpType":"int","pythonType":"int","summary":"Average True Range Period"},{"name":"atrMaType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Average True Range MAType"},{"name":"bandDistance","csharpType":"double","pythonType":"float","summary":"ATR Multiplier"}],"returns":{"csharpType":"KeltnerChannels","pythonType":"KeltnerChannels","summary":"KeltnerChannels","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var keltner = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nPrint(\"Keltner top: {0}, main: {1}, bottom: {2}\", keltner.Top.LastValue, keltner.Main.LastValue, keltner.Bottom.LastValue);","python":"keltner = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\napi.Print(f\"Keltner top: {keltner.Top.LastValue}, main: {keltner.Main.LastValue}, bottom: {keltner.Bottom.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KeltnerChannels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KeltnerChannels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.KeltnerChannels(cAlgo.API.Bars,System.Int32,cAlgo.API.MovingAverageType,System.Int32,cAlgo.API.MovingAverageType,System.Double)","kind":"method","name":"KeltnerChannels","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"KeltnerChannels KeltnerChannels(Bars bars, int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)","python":"api.Indicators.KeltnerChannels(bars: Bars, maPeriod: int, maType: MovingAverageType, atrPeriod: int, atrMaType: MovingAverageType, bandDistance: float) -> KeltnerChannels","summary":"Initializes the Keltner Channels indicator instance","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"maPeriod","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"},{"name":"atrPeriod","csharpType":"int","pythonType":"int","summary":"Average True Range Period"},{"name":"atrMaType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Average True Range MAType"},{"name":"bandDistance","csharpType":"double","pythonType":"float","summary":"ATR Multiplier"}],"returns":{"csharpType":"KeltnerChannels","pythonType":"KeltnerChannels","summary":"KeltnerChannels","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyKeltner = Indicators.KeltnerChannels(dailyBars, 20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nPrint(\"Daily Keltner top: {0}, bottom: {1}\", dailyKeltner.Top.LastValue, dailyKeltner.Bottom.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyKeltner = api.Indicators.KeltnerChannels(dailyBars, 20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\napi.Print(f\"Daily Keltner top: {dailyKeltner.Top.LastValue}, bottom: {dailyKeltner.Bottom.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KeltnerChannels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/KeltnerChannels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.LinearRegressionForecast(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"LinearRegressionForecast","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"LinearRegressionForecast LinearRegressionForecast(DataSeries source, int periods)","python":"api.Indicators.LinearRegressionForecast(source: DataSeries, periods: int) -> LinearRegressionForecast","summary":"Linear Regression Forecast is a trend indicator used to forecast values using the Least Squares Fit method.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"LinearRegressionForecast","pythonType":"LinearRegressionForecast","summary":"Linear Regression Forecast indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var forecast = Indicators.LinearRegressionForecast(Bars.ClosePrices, 14);\nPrint(\"Linear Regression Forecast: {0}\", forecast.Result.LastValue);","python":"forecast = api.Indicators.LinearRegressionForecast(api.Bars.ClosePrices, 14)\napi.Print(f\"Linear Regression Forecast: {forecast.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionForecast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionForecast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.LinearRegressionIntercept(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"LinearRegressionIntercept","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"LinearRegressionIntercept LinearRegressionIntercept(DataSeries source, int periods)","python":"api.Indicators.LinearRegressionIntercept(source: DataSeries, periods: int) -> LinearRegressionIntercept","summary":"The Linear Regression Intercept can be used together with the Linear Regression Slope indicator to plot the Linear Regression Line.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for calculation."}],"returns":{"csharpType":"LinearRegressionIntercept","pythonType":"LinearRegressionIntercept","summary":"The Linear Regression Intercept indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var intercept = Indicators.LinearRegressionIntercept(Bars.ClosePrices, 14);\nPrint(\"Linear Regression Intercept: {0}\", intercept.Result.LastValue);","python":"intercept = api.Indicators.LinearRegressionIntercept(api.Bars.ClosePrices, 14)\napi.Print(f\"Linear Regression Intercept: {intercept.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionIntercept/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionIntercept/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.LinearRegressionRSquared(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"LinearRegressionRSquared","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"LinearRegressionRSquared LinearRegressionRSquared(DataSeries source, int periods)","python":"api.Indicators.LinearRegressionRSquared(source: DataSeries, periods: int) -> LinearRegressionRSquared","summary":"The R Squared or coefficient of determination indicator's main purpose is the confirm the strength of the market.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"LinearRegressionRSquared","pythonType":"LinearRegressionRSquared","summary":"Linear Regression R-Squared indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rSquared = Indicators.LinearRegressionRSquared(Bars.ClosePrices, 14);\nPrint(\"R squared: {0}\", rSquared.Result.LastValue);","python":"rSquared = api.Indicators.LinearRegressionRSquared(api.Bars.ClosePrices, 14)\napi.Print(f\"R squared: {rSquared.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionRSquared/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionRSquared/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.LinearRegressionSlope(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"LinearRegressionSlope","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"LinearRegressionSlope LinearRegressionSlope(DataSeries source, int periods)","python":"api.Indicators.LinearRegressionSlope(source: DataSeries, periods: int) -> LinearRegressionSlope","summary":"The Linear Regression Slope indicator is intended to measure the direction and strength of a trend.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for calculation."}],"returns":{"csharpType":"LinearRegressionSlope","pythonType":"LinearRegressionSlope","summary":"The Linear Regression Slope indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var slope = Indicators.LinearRegressionSlope(Bars.ClosePrices, 14);\nPrint(\"Linear Regression Slope: {0}, trend: {1}\", slope.Result.LastValue, slope.Result.LastValue > 0 ? \"up\" : \"down\");","python":"slope = api.Indicators.LinearRegressionSlope(api.Bars.ClosePrices, 14)\napi.Print(f\"Linear Regression Slope: {slope.Result.LastValue}, trend: {'up' if slope.Result.LastValue > 0 else 'down'}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionSlope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/LinearRegressionSlope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdCrossOver(System.Int32,System.Int32,System.Int32)","kind":"method","name":"MacdCrossOver","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdCrossOver MacdCrossOver(int longCycle, int shortCycle, int signalPeriods)","python":"api.Indicators.MacdCrossOver(longCycle: int, shortCycle: int, signalPeriods: int) -> MacdCrossOver","summary":"The MACD Line with the Signal line and their difference as a histogram.","remarks":null,"parameters":[{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."}],"returns":{"csharpType":"MacdCrossOver","pythonType":"MacdCrossOver","summary":"The Macd CrossOver indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macdCrossOver = Indicators.MacdCrossOver(26, 12, 9);\nif (macdCrossOver.MACD.HasCrossedAbove(macdCrossOver.Signal, 0))\n    Print(\"MACD crossed above the signal line\");","python":"macdCrossOver = api.Indicators.MacdCrossOver(26, 12, 9)\nif Functions.HasCrossedAbove(macdCrossOver.MACD, macdCrossOver.Signal, 0):\n    api.Print(\"MACD crossed above the signal line\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdCrossOver/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdCrossOver/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdCrossOver(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32)","kind":"method","name":"MacdCrossOver","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdCrossOver MacdCrossOver(DataSeries source, int longCycle, int shortCycle, int signalPeriods)","python":"api.Indicators.MacdCrossOver(source: DataSeries, longCycle: int, shortCycle: int, signalPeriods: int) -> MacdCrossOver","summary":"Initializes the MacdCrossOver indicator instance for a specific source series","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source series to be applied"},{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."}],"returns":{"csharpType":"MacdCrossOver","pythonType":"MacdCrossOver","summary":"The MacdCrossOver indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macdCrossOver = Indicators.MacdCrossOver(Bars.TypicalPrices, 26, 12, 9);\nPrint(\"MACD: {0}, signal: {1}, histogram: {2}\", macdCrossOver.MACD.LastValue, macdCrossOver.Signal.LastValue, macdCrossOver.Histogram.LastValue);","python":"macdCrossOver = api.Indicators.MacdCrossOver(api.Bars.TypicalPrices, 26, 12, 9)\napi.Print(f\"MACD: {macdCrossOver.MACD.LastValue}, signal: {macdCrossOver.Signal.LastValue}, histogram: {macdCrossOver.Histogram.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdCrossOver/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdCrossOver/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdHistogram(System.Int32,System.Int32,System.Int32)","kind":"method","name":"MacdHistogram","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdHistogram MacdHistogram(int longCycle, int shortCycle, int signalPeriods)","python":"api.Indicators.MacdHistogram(longCycle: int, shortCycle: int, signalPeriods: int) -> MacdHistogram","summary":"The MACD Histogram is a momentum indicator measured by typically subtracting a 26 period moving average from a 12 period moving average.","remarks":null,"parameters":[{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."}],"returns":{"csharpType":"MacdHistogram","pythonType":"MacdHistogram","summary":"The Macd Histogram indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macd = Indicators.MacdHistogram(26, 12, 9);\nPrint(\"MACD histogram: {0}, signal: {1}\", macd.Histogram.LastValue, macd.Signal.LastValue);","python":"macd = api.Indicators.MacdHistogram(26, 12, 9)\napi.Print(f\"MACD histogram: {macd.Histogram.LastValue}, signal: {macd.Signal.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdHistogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdHistogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdHistogram(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32)","kind":"method","name":"MacdHistogram","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdHistogram MacdHistogram(DataSeries source, int longCycle, int shortCycle, int signalPeriods)","python":"api.Indicators.MacdHistogram(source: DataSeries, longCycle: int, shortCycle: int, signalPeriods: int) -> MacdHistogram","summary":"Initializes the MacdHistogram indicator instance for a specific source series","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source series to be applied"},{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."}],"returns":{"csharpType":"MacdHistogram","pythonType":"MacdHistogram","summary":"The Macd Histogram indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macd = Indicators.MacdHistogram(Bars.MedianPrices, 26, 12, 9);\nPrint(\"MACD histogram of median prices: {0}\", macd.Histogram.LastValue);","python":"macd = api.Indicators.MacdHistogram(api.Bars.MedianPrices, 26, 12, 9)\napi.Print(f\"MACD histogram of median prices: {macd.Histogram.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdHistogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdHistogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdOscillatorMovingAverage(System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"MacdOscillatorMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdOscillatorMovingAverage MacdOscillatorMovingAverage(int longCycle, int shortCycle, int signalPeriods, MovingAverageType maType)","python":"api.Indicators.MacdOscillatorMovingAverage(longCycle: int, shortCycle: int, signalPeriods: int, maType: MovingAverageType) -> MacdOscillatorMovingAverage","summary":"The Oscillator of a Moving Average (OsMA) over the MACD.","remarks":null,"parameters":[{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"MacdOscillatorMovingAverage","pythonType":"MacdOscillatorMovingAverage","summary":"MacdOscillatorMovingAverage","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macdOsma = Indicators.MacdOscillatorMovingAverage(26, 12, 9, MovingAverageType.Exponential);\nPrint(\"MACD OsMA histogram: {0}\", macdOsma.Histogram.LastValue);","python":"macdOsma = api.Indicators.MacdOscillatorMovingAverage(26, 12, 9, MovingAverageType.Exponential)\napi.Print(f\"MACD OsMA histogram: {macdOsma.Histogram.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdOscillatorMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdOscillatorMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MacdOscillatorMovingAverage(cAlgo.API.DataSeries,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"MacdOscillatorMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MacdOscillatorMovingAverage MacdOscillatorMovingAverage(DataSeries source, int longCycle, int shortCycle, int signalPeriods, MovingAverageType maType)","python":"api.Indicators.MacdOscillatorMovingAverage(source: DataSeries, longCycle: int, shortCycle: int, signalPeriods: int, maType: MovingAverageType) -> MacdOscillatorMovingAverage","summary":"The Oscillator of a Moving Average (OsMA) over the MACD.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source series to be applied"},{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used calculation."},{"name":"signalPeriods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation of the signal."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"MacdOscillatorMovingAverage","pythonType":"MacdOscillatorMovingAverage","summary":"MacdOscillatorMovingAverage","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macdOsma = Indicators.MacdOscillatorMovingAverage(Bars.MedianPrices, 26, 12, 9, MovingAverageType.Exponential);\nPrint(\"MACD OsMA histogram of median prices: {0}\", macdOsma.Histogram.LastValue);","python":"macdOsma = api.Indicators.MacdOscillatorMovingAverage(api.Bars.MedianPrices, 26, 12, 9, MovingAverageType.Exponential)\napi.Print(f\"MACD OsMA histogram of median prices: {macdOsma.Histogram.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdOscillatorMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MacdOscillatorMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MarketFacilitationIndex","kind":"method","name":"MarketFacilitationIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MarketFacilitationIndex MarketFacilitationIndex()","python":"api.Indicators.MarketFacilitationIndex() -> MarketFacilitationIndex","summary":"The indicator shows the effectiveness of price movement by computing the price movement per volume unit","remarks":null,"parameters":[],"returns":{"csharpType":"MarketFacilitationIndex","pythonType":"MarketFacilitationIndex","summary":"MarketFacilitationIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketFacilitationIndex = Indicators.MarketFacilitationIndex();\nPrint(\"Market Facilitation Index: {0}\", marketFacilitationIndex.Result.Last(1));","python":"marketFacilitationIndex = api.Indicators.MarketFacilitationIndex()\napi.Print(f\"Market Facilitation Index: {marketFacilitationIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MarketFacilitationIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MarketFacilitationIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MarketFacilitationIndex(cAlgo.API.Bars)","kind":"method","name":"MarketFacilitationIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MarketFacilitationIndex MarketFacilitationIndex(Bars bars)","python":"api.Indicators.MarketFacilitationIndex(bars: Bars) -> MarketFacilitationIndex","summary":"The indicator shows the effectiveness of price movement by computing the price movement per volume unit","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"MarketFacilitationIndex","pythonType":"MarketFacilitationIndex","summary":"MarketFacilitationIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyMarketFacilitationIndex = Indicators.MarketFacilitationIndex(dailyBars);\nPrint(\"Daily Market Facilitation Index: {0}\", dailyMarketFacilitationIndex.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyMarketFacilitationIndex = api.Indicators.MarketFacilitationIndex(dailyBars)\napi.Print(f\"Daily Market Facilitation Index: {dailyMarketFacilitationIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MarketFacilitationIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MarketFacilitationIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MassIndex(System.Int32)","kind":"method","name":"MassIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MassIndex MassIndex(int periods)","python":"api.Indicators.MassIndex(periods: int) -> MassIndex","summary":"The Mass Index indicator is used to predict trend reversals.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"MassIndex","pythonType":"MassIndex","summary":"Mass Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var massIndex = Indicators.MassIndex(9);\nif (massIndex.Result.LastValue > 27)\n    Print(\"Mass Index reversal bulge: {0}\", massIndex.Result.LastValue);","python":"massIndex = api.Indicators.MassIndex(9)\nif massIndex.Result.LastValue > 27:\n    api.Print(f\"Mass Index reversal bulge: {massIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MassIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MassIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MassIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"MassIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MassIndex MassIndex(Bars bars, int periods)","python":"api.Indicators.MassIndex(bars: Bars, periods: int) -> MassIndex","summary":"The Mass Index indicator is used to predict trend reversals.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"MassIndex","pythonType":"MassIndex","summary":"Mass Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyMassIndex = Indicators.MassIndex(dailyBars, 9);\nPrint(\"Daily Mass Index: {0}\", dailyMassIndex.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyMassIndex = api.Indicators.MassIndex(dailyBars, 9)\napi.Print(f\"Daily Mass Index: {dailyMassIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MassIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MassIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MedianPrice","kind":"method","name":"MedianPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MedianPrice MedianPrice()","python":"api.Indicators.MedianPrice() -> MedianPrice","summary":"The Median indicator is the average of the high and the low.","remarks":null,"parameters":[],"returns":{"csharpType":"MedianPrice","pythonType":"MedianPrice","summary":"Median indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var medianPrice = Indicators.MedianPrice();\nPrint(\"Median price of the last closed bar: {0}\", medianPrice.Result.Last(1));","python":"medianPrice = api.Indicators.MedianPrice()\napi.Print(f\"Median price of the last closed bar: {medianPrice.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MedianPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MedianPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MedianPrice(cAlgo.API.Bars)","kind":"method","name":"MedianPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MedianPrice MedianPrice(Bars bars)","python":"api.Indicators.MedianPrice(bars: Bars) -> MedianPrice","summary":"The Median indicator is the average of the high and the low.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"MedianPrice","pythonType":"MedianPrice","summary":"Median indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyMedianPrice = Indicators.MedianPrice(dailyBars);\nPrint(\"Median price of the last closed daily bar: {0}\", dailyMedianPrice.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyMedianPrice = api.Indicators.MedianPrice(dailyBars)\napi.Print(f\"Median price of the last closed daily bar: {dailyMedianPrice.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MedianPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MedianPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MomentumOscillator(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"MomentumOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MomentumOscillator MomentumOscillator(DataSeries source, int periods)","python":"api.Indicators.MomentumOscillator(source: DataSeries, periods: int) -> MomentumOscillator","summary":"The Momentum Oscillator measures the momentum of the price.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"MomentumOscillator","pythonType":"MomentumOscillator","summary":"Momentum Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var momentum = Indicators.MomentumOscillator(Bars.ClosePrices, 14);\nPrint(\"Momentum(14): {0}\", momentum.Result.LastValue);","python":"momentum = api.Indicators.MomentumOscillator(api.Bars.ClosePrices, 14)\napi.Print(f\"Momentum(14): {momentum.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MomentumOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MomentumOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MoneyFlowIndex(System.Int32)","kind":"method","name":"MoneyFlowIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MoneyFlowIndex MoneyFlowIndex(int periods)","python":"api.Indicators.MoneyFlowIndex(periods: int) -> MoneyFlowIndex","summary":"The Money Flow Index measures the strength of the money flow.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"MoneyFlowIndex","pythonType":"MoneyFlowIndex","summary":"Money Flow Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var moneyFlowIndex = Indicators.MoneyFlowIndex(14);\nif (moneyFlowIndex.Result.LastValue > 80)\n    Print(\"Money Flow Index is overbought: {0}\", moneyFlowIndex.Result.LastValue);","python":"moneyFlowIndex = api.Indicators.MoneyFlowIndex(14)\nif moneyFlowIndex.Result.LastValue > 80:\n    api.Print(f\"Money Flow Index is overbought: {moneyFlowIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MoneyFlowIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MoneyFlowIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MoneyFlowIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"MoneyFlowIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MoneyFlowIndex MoneyFlowIndex(Bars bars, int periods)","python":"api.Indicators.MoneyFlowIndex(bars: Bars, periods: int) -> MoneyFlowIndex","summary":"The Money Flow Index measures the strength of the money flow.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"MoneyFlowIndex","pythonType":"MoneyFlowIndex","summary":"Money Flow Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyMoneyFlowIndex = Indicators.MoneyFlowIndex(dailyBars, 14);\nPrint(\"Daily Money Flow Index: {0}\", dailyMoneyFlowIndex.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyMoneyFlowIndex = api.Indicators.MoneyFlowIndex(dailyBars, 14)\napi.Print(f\"Daily Money Flow Index: {dailyMoneyFlowIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MoneyFlowIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MoneyFlowIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MovingAverage(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"MovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MovingAverage MovingAverage(DataSeries source, int periods, MovingAverageType maType)","python":"api.Indicators.MovingAverage(source: DataSeries, periods: int, maType: MovingAverageType) -> MovingAverage","summary":"Moving Average indicators are used to smooth data producing trend indicators.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for the MA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Method of calculation of MA."}],"returns":{"csharpType":"MovingAverage","pythonType":"MovingAverage","summary":"Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 50, MovingAverageType.Exponential);\nPrint(\"EMA(50) last value: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 50, MovingAverageType.Exponential)\napi.Print(f\"EMA(50) last value: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/MovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.NegativeVolumeIndex(cAlgo.API.DataSeries)","kind":"method","name":"NegativeVolumeIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"NegativeVolumeIndex NegativeVolumeIndex(DataSeries source)","python":"api.Indicators.NegativeVolumeIndex(source: DataSeries) -> NegativeVolumeIndex","summary":"The Negative Volume Index is a calculation of the percentage change in price on days when trading volume declines.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for the calculation."}],"returns":{"csharpType":"NegativeVolumeIndex","pythonType":"NegativeVolumeIndex","summary":"Negative Volume Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var negativeVolumeIndex = Indicators.NegativeVolumeIndex(Bars.ClosePrices);\nPrint(\"Negative Volume Index: {0}\", negativeVolumeIndex.Result.LastValue);","python":"negativeVolumeIndex = api.Indicators.NegativeVolumeIndex(api.Bars.ClosePrices)\napi.Print(f\"Negative Volume Index: {negativeVolumeIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/NegativeVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/NegativeVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.OnBalanceVolume(cAlgo.API.DataSeries)","kind":"method","name":"OnBalanceVolume","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"OnBalanceVolume OnBalanceVolume(DataSeries source)","python":"api.Indicators.OnBalanceVolume(source: DataSeries) -> OnBalanceVolume","summary":"The On Balance Volume indicator relates price and volume.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for the calculation."}],"returns":{"csharpType":"OnBalanceVolume","pythonType":"OnBalanceVolume","summary":"On Balance Volume indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var onBalanceVolume = Indicators.OnBalanceVolume(Bars.ClosePrices);\nvar isRising = onBalanceVolume.Result.Last(1) > onBalanceVolume.Result.Last(2);\nPrint(\"On Balance Volume: {0}, rising: {1}\", onBalanceVolume.Result.Last(1), isRising);","python":"onBalanceVolume = api.Indicators.OnBalanceVolume(api.Bars.ClosePrices)\nisRising = onBalanceVolume.Result.Last(1) > onBalanceVolume.Result.Last(2)\napi.Print(f\"On Balance Volume: {onBalanceVolume.Result.Last(1)}, rising: {isRising}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/OnBalanceVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/OnBalanceVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.OscillatorMovingAverage(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"OscillatorMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"OscillatorMovingAverage OscillatorMovingAverage(DataSeries source, int periods, MovingAverageType maType)","python":"api.Indicators.OscillatorMovingAverage(source: DataSeries, periods: int, maType: MovingAverageType) -> OscillatorMovingAverage","summary":"The Oscillator of a Moving Average (OsMA) is a technical indicator that shows the difference between an oscillator and its moving average over a given period of time.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The oscillator Data Series used for the OsMA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Moving Average Type"}],"returns":{"csharpType":"OscillatorMovingAverage","pythonType":"OscillatorMovingAverage","summary":"OscillatorMovingAverage","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\nvar rsiOsma = Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple);\nPrint(\"RSI OsMA histogram: {0}\", rsiOsma.Histogram.LastValue);","python":"rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\nrsiOsma = api.Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple)\napi.Print(f\"RSI OsMA histogram: {rsiOsma.Histogram.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/OscillatorMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/OscillatorMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ParabolicSAR(System.Double,System.Double)","kind":"method","name":"ParabolicSAR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ParabolicSAR ParabolicSAR(double minAf, double maxAf)","python":"api.Indicators.ParabolicSAR(minAf: float, maxAf: float) -> ParabolicSAR","summary":"The Parabolic SAR indicator identifies potential reversals in the market direction","remarks":null,"parameters":[{"name":"minAf","csharpType":"double","pythonType":"float","summary":"The minimum accumulation factor"},{"name":"maxAf","csharpType":"double","pythonType":"float","summary":"The maximum accumulation factor"}],"returns":{"csharpType":"ParabolicSAR","pythonType":"ParabolicSAR","summary":"ParabolicSAR indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var parabolicSar = Indicators.ParabolicSAR(0.02, 0.2);\nvar trend = parabolicSar.Result.LastValue < Symbol.Bid ? \"up\" : \"down\";\nPrint(\"Parabolic SAR: {0}, trend: {1}\", parabolicSar.Result.LastValue, trend);","python":"parabolicSar = api.Indicators.ParabolicSAR(0.02, 0.2)\ntrend = \"up\" if parabolicSar.Result.LastValue < api.Symbol.Bid else \"down\"\napi.Print(f\"Parabolic SAR: {parabolicSar.Result.LastValue}, trend: {trend}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ParabolicSAR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ParabolicSAR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ParabolicSAR(cAlgo.API.Bars,System.Double,System.Double)","kind":"method","name":"ParabolicSAR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ParabolicSAR ParabolicSAR(Bars bars, double minAf, double maxAf)","python":"api.Indicators.ParabolicSAR(bars: Bars, minAf: float, maxAf: float) -> ParabolicSAR","summary":"The Parabolic SAR indicator identifies potential reversals in the market direction","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"minAf","csharpType":"double","pythonType":"float","summary":"The minimum accumulation factor"},{"name":"maxAf","csharpType":"double","pythonType":"float","summary":"The maximum accumulation factor"}],"returns":{"csharpType":"ParabolicSAR","pythonType":"ParabolicSAR","summary":"ParabolicSAR indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailySar = Indicators.ParabolicSAR(dailyBars, 0.02, 0.2);\nPrint(\"Daily Parabolic SAR: {0}\", dailySar.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailySar = api.Indicators.ParabolicSAR(dailyBars, 0.02, 0.2)\napi.Print(f\"Daily Parabolic SAR: {dailySar.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ParabolicSAR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/ParabolicSAR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.PolynomialRegressionChannels(System.Int32,System.Int32,System.Double,System.Double)","kind":"method","name":"PolynomialRegressionChannels","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"PolynomialRegressionChannels PolynomialRegressionChannels(int degree, int periods, double standardDeviation, double standardDeviation2)","python":"api.Indicators.PolynomialRegressionChannels(degree: int, periods: int, standardDeviation: float, standardDeviation2: float) -> PolynomialRegressionChannels","summary":"Polynomial Regression Channel (PRC) is an RTX Extension indicator that draws a best fit n-degree polynomial regression line through a recent period of data.","remarks":null,"parameters":[{"name":"degree","csharpType":"int","pythonType":"int","summary":"The degree of PolynomialRegressionChannels"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period of PolynomialRegressionChannels"},{"name":"standardDeviation","csharpType":"double","pythonType":"float","summary":"The first standardDeviation of PolynomialRegressionChannels"},{"name":"standardDeviation2","csharpType":"double","pythonType":"float","summary":"The second standardDeviation of PolynomialRegressionChannels"}],"returns":{"csharpType":"PolynomialRegressionChannels","pythonType":"PolynomialRegressionChannels","summary":"PolynomialRegressionChannels","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nPrint(\"PRC: {0}, upper: {1}, lower: {2}\", prc.Prc.LastValue, prc.Sqh.LastValue, prc.Sql.LastValue);","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\napi.Print(f\"PRC: {prc.Prc.LastValue}, upper: {prc.Sqh.LastValue}, lower: {prc.Sql.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PolynomialRegressionChannels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PolynomialRegressionChannels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.PositiveVolumeIndex(cAlgo.API.DataSeries)","kind":"method","name":"PositiveVolumeIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"PositiveVolumeIndex PositiveVolumeIndex(DataSeries source)","python":"api.Indicators.PositiveVolumeIndex(source: DataSeries) -> PositiveVolumeIndex","summary":"The Positive Volume Index is a calculation of the percentage change in price on days when trading volume increased.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for the calculation."}],"returns":{"csharpType":"PositiveVolumeIndex","pythonType":"PositiveVolumeIndex","summary":"Positive Volume Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var positiveVolumeIndex = Indicators.PositiveVolumeIndex(Bars.ClosePrices);\nPrint(\"Positive Volume Index: {0}\", positiveVolumeIndex.Result.LastValue);","python":"positiveVolumeIndex = api.Indicators.PositiveVolumeIndex(api.Bars.ClosePrices)\napi.Print(f\"Positive Volume Index: {positiveVolumeIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PositiveVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PositiveVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.PriceOscillator(cAlgo.API.DataSeries,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"PriceOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"PriceOscillator PriceOscillator(DataSeries source, int longCycle, int shortCycle, MovingAverageType maType)","python":"api.Indicators.PriceOscillator(source: DataSeries, longCycle: int, shortCycle: int, maType: MovingAverageType) -> PriceOscillator","summary":"The Price Oscillator calculates the difference between two moving averages.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for calculation."},{"name":"longCycle","csharpType":"int","pythonType":"int","summary":"The long period used for calculation."},{"name":"shortCycle","csharpType":"int","pythonType":"int","summary":"The short period used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"PriceOscillator","pythonType":"PriceOscillator","summary":"The Price Oscillator indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var priceOscillator = Indicators.PriceOscillator(Bars.ClosePrices, 26, 12, MovingAverageType.Simple);\nPrint(\"Price Oscillator of the last closed bar: {0}\", priceOscillator.Result.Last(1));","python":"priceOscillator = api.Indicators.PriceOscillator(api.Bars.ClosePrices, 26, 12, MovingAverageType.Simple)\napi.Print(f\"Price Oscillator of the last closed bar: {priceOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.PriceROC(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"PriceROC","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"PriceROC PriceROC(DataSeries source, int periods)","python":"api.Indicators.PriceROC(source: DataSeries, periods: int) -> PriceROC","summary":"The Price Rate of Change indicator is the percentage change of the current price and the price N periods ago.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"PriceROC","pythonType":"PriceROC","summary":"Price Rate of Change indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var priceRoc = Indicators.PriceROC(Bars.ClosePrices, 12);\nPrint(\"Price ROC(12): {0}%\", priceRoc.Result.LastValue);","python":"priceRoc = api.Indicators.PriceROC(api.Bars.ClosePrices, 12)\napi.Print(f\"Price ROC(12): {priceRoc.Result.LastValue}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceROC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceROC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.PriceVolumeTrend(cAlgo.API.DataSeries)","kind":"method","name":"PriceVolumeTrend","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"PriceVolumeTrend PriceVolumeTrend(DataSeries source)","python":"api.Indicators.PriceVolumeTrend(source: DataSeries) -> PriceVolumeTrend","summary":"The Price Volume Trend indicator shows the relationship between price and volume.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for the calculation."}],"returns":{"csharpType":"PriceVolumeTrend","pythonType":"PriceVolumeTrend","summary":"Price Volume Trend indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var priceVolumeTrend = Indicators.PriceVolumeTrend(Bars.ClosePrices);\nPrint(\"Price Volume Trend: {0}\", priceVolumeTrend.Result.LastValue);","python":"priceVolumeTrend = api.Indicators.PriceVolumeTrend(api.Bars.ClosePrices)\napi.Print(f\"Price Volume Trend: {priceVolumeTrend.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceVolumeTrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/PriceVolumeTrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.RainbowOscillator(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"RainbowOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"RainbowOscillator RainbowOscillator(DataSeries source, int levels, MovingAverageType maType)","python":"api.Indicators.RainbowOscillator(source: DataSeries, levels: int, maType: MovingAverageType) -> RainbowOscillator","summary":"The Rainbow Oscillator is a process of repetitive smoothing of simple moving averages resulting in a full spectrum of trends.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for calculation."},{"name":"levels","csharpType":"int","pythonType":"int","summary":"The value of the levels used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"The Moving Average type used for calculation."}],"returns":{"csharpType":"RainbowOscillator","pythonType":"RainbowOscillator","summary":"The Rainbow Oscillator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rainbow = Indicators.RainbowOscillator(Bars.ClosePrices, 9, MovingAverageType.Simple);\nPrint(\"Rainbow Oscillator: {0}\", rainbow.Result.LastValue);","python":"rainbow = api.Indicators.RainbowOscillator(api.Bars.ClosePrices, 9, MovingAverageType.Simple)\napi.Print(f\"Rainbow Oscillator: {rainbow.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RainbowOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RainbowOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.RelativeStrengthIndex(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"RelativeStrengthIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"RelativeStrengthIndex RelativeStrengthIndex(DataSeries source, int periods)","python":"api.Indicators.RelativeStrengthIndex(source: DataSeries, periods: int) -> RelativeStrengthIndex","summary":"The Relative Strength Index indicator measures turns in price by measuring turns in momentum.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"RelativeStrengthIndex","pythonType":"RelativeStrengthIndex","summary":"Relative Strength indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\nif (rsi.Result.LastValue > 70)\n    Print(\"RSI(14) is overbought: {0}\", rsi.Result.LastValue);","python":"rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\nif rsi.Result.LastValue > 70:\n    api.Print(f\"RSI(14) is overbought: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeStrengthIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeStrengthIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.RelativeVigorIndex(System.Int32)","kind":"method","name":"RelativeVigorIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"RelativeVigorIndex RelativeVigorIndex(int periods)","python":"api.Indicators.RelativeVigorIndex(periods: int) -> RelativeVigorIndex","summary":"The Relative Vigor Index is a momentum oscillator, measuring the strength of a trend.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"}],"returns":{"csharpType":"RelativeVigorIndex","pythonType":"RelativeVigorIndex","summary":"RelativeVigorIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rvi = Indicators.RelativeVigorIndex(10);\nif (rvi.Result.HasCrossedAbove(rvi.Signal, 0))\n    Print(\"Relative Vigor Index crossed above its signal line\");","python":"rvi = api.Indicators.RelativeVigorIndex(10)\nif Functions.HasCrossedAbove(rvi.Result, rvi.Signal, 0):\n    api.Print(\"Relative Vigor Index crossed above its signal line\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeVigorIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeVigorIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.RelativeVigorIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"RelativeVigorIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"RelativeVigorIndex RelativeVigorIndex(Bars bars, int periods)","python":"api.Indicators.RelativeVigorIndex(bars: Bars, periods: int) -> RelativeVigorIndex","summary":"The Relative Vigor Index is a momentum oscillator, measuring the strength of a trend.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Moving Average Period"}],"returns":{"csharpType":"RelativeVigorIndex","pythonType":"RelativeVigorIndex","summary":"RelativeVigorIndex","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyRvi = Indicators.RelativeVigorIndex(dailyBars, 10);\nPrint(\"Daily RVI: {0}, signal: {1}\", dailyRvi.Result.LastValue, dailyRvi.Signal.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyRvi = api.Indicators.RelativeVigorIndex(dailyBars, 10)\napi.Print(f\"Daily RVI: {dailyRvi.Result.LastValue}, signal: {dailyRvi.Signal.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeVigorIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/RelativeVigorIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.SimpleMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"SimpleMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"SimpleMovingAverage SimpleMovingAverage(DataSeries source, int periods)","python":"api.Indicators.SimpleMovingAverage(source: DataSeries, periods: int) -> SimpleMovingAverage","summary":"The simple moving average smoothes the price data producing a trend indicator","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for SMA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."}],"returns":{"csharpType":"SimpleMovingAverage","pythonType":"SimpleMovingAverage","summary":"Simple Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var fastSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 10);\nvar slowSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);\nif (fastSma.Result.HasCrossedAbove(slowSma.Result, 0))\n    Print(\"SMA(10) has crossed above SMA(50)\");","python":"fastSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 10)\nslowSma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 50)\nif Functions.HasCrossedAbove(fastSma.Result, slowSma.Result, 0):\n    api.Print(\"SMA(10) has crossed above SMA(50)\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SimpleMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SimpleMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StandardDeviation(cAlgo.API.DataSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"StandardDeviation","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StandardDeviation StandardDeviation(DataSeries source, int periods, MovingAverageType maType)","python":"api.Indicators.StandardDeviation(source: DataSeries, periods: int, maType: MovingAverageType) -> StandardDeviation","summary":"The Standard Deviation indicator shows volatility.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"StandardDeviation","pythonType":"StandardDeviation","summary":"Standard Deviation indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var standardDeviation = Indicators.StandardDeviation(Bars.ClosePrices, 20, MovingAverageType.Simple);\nif (standardDeviation.Result.Last(1) > standardDeviation.Result.Last(2))\n    Print(\"Volatility is increasing: {0}\", standardDeviation.Result.Last(1));","python":"standardDeviation = api.Indicators.StandardDeviation(api.Bars.ClosePrices, 20, MovingAverageType.Simple)\nif standardDeviation.Result.Last(1) > standardDeviation.Result.Last(2):\n    api.Print(f\"Volatility is increasing: {standardDeviation.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StandardDeviation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StandardDeviation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StochasticOscillator(System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"StochasticOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StochasticOscillator StochasticOscillator(int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)","python":"api.Indicators.StochasticOscillator(kPeriods: int, kSlowing: int, dPeriods: int, maType: MovingAverageType) -> StochasticOscillator","summary":"The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.","remarks":null,"parameters":[{"name":"kPeriods","csharpType":"int","pythonType":"int","summary":"The value of the k periods used for calculation."},{"name":"kSlowing","csharpType":"int","pythonType":"int","summary":"The value of the k slowing used for calculation."},{"name":"dPeriods","csharpType":"int","pythonType":"int","summary":"The value of the d periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"StochasticOscillator","pythonType":"StochasticOscillator","summary":"Stochastic Oscillator indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\nif (stochastic.PercentK.LastValue < 20)\n    Print(\"Stochastic %K is oversold: {0}, %D: {1}\", stochastic.PercentK.LastValue, stochastic.PercentD.LastValue);","python":"stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)\nif stochastic.PercentK.LastValue < 20:\n    api.Print(f\"Stochastic %K is oversold: {stochastic.PercentK.LastValue}, %D: {stochastic.PercentD.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StochasticOscillator(System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType,cAlgo.API.StochasticCalculationType)","kind":"method","name":"StochasticOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StochasticOscillator StochasticOscillator(int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType, StochasticCalculationType calculationType)","python":"api.Indicators.StochasticOscillator(kPeriods: int, kSlowing: int, dPeriods: int, maType: MovingAverageType, calculationType: StochasticCalculationType) -> StochasticOscillator","summary":"The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.","remarks":null,"parameters":[{"name":"kPeriods","csharpType":"int","pythonType":"int","summary":"The value of the k periods used for calculation."},{"name":"kSlowing","csharpType":"int","pythonType":"int","summary":"The value of the k slowing used for calculation."},{"name":"dPeriods","csharpType":"int","pythonType":"int","summary":"The value of the d periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."},{"name":"calculationType","csharpType":"StochasticCalculationType","pythonType":"StochasticCalculationType","summary":"Type of calculation."}],"returns":{"csharpType":"StochasticOscillator","pythonType":"StochasticOscillator","summary":"Stochastic Oscillator indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose);\nPrint(\"Stochastic (close/close) %K: {0}, %D: {1}\", stochastic.PercentK.LastValue, stochastic.PercentD.LastValue);","python":"stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose)\napi.Print(f\"Stochastic (close/close) %K: {stochastic.PercentK.LastValue}, %D: {stochastic.PercentD.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StochasticOscillator(cAlgo.API.Bars,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"StochasticOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StochasticOscillator StochasticOscillator(Bars bars, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)","python":"api.Indicators.StochasticOscillator(bars: Bars, kPeriods: int, kSlowing: int, dPeriods: int, maType: MovingAverageType) -> StochasticOscillator","summary":"The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"kPeriods","csharpType":"int","pythonType":"int","summary":"The value of the k periods used for calculation."},{"name":"kSlowing","csharpType":"int","pythonType":"int","summary":"The value of the k slowing used for calculation."},{"name":"dPeriods","csharpType":"int","pythonType":"int","summary":"The value of the d periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."}],"returns":{"csharpType":"StochasticOscillator","pythonType":"StochasticOscillator","summary":"Stochastic Oscillator indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyStochastic = Indicators.StochasticOscillator(dailyBars, 9, 3, 9, MovingAverageType.Simple);\nPrint(\"Daily stochastic %K: {0}, %D: {1}\", dailyStochastic.PercentK.LastValue, dailyStochastic.PercentD.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyStochastic = api.Indicators.StochasticOscillator(dailyBars, 9, 3, 9, MovingAverageType.Simple)\napi.Print(f\"Daily stochastic %K: {dailyStochastic.PercentK.LastValue}, %D: {dailyStochastic.PercentD.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StochasticOscillator(cAlgo.API.Bars,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType,cAlgo.API.StochasticCalculationType)","kind":"method","name":"StochasticOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StochasticOscillator StochasticOscillator(Bars bars, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType, StochasticCalculationType calculationType)","python":"api.Indicators.StochasticOscillator(bars: Bars, kPeriods: int, kSlowing: int, dPeriods: int, maType: MovingAverageType, calculationType: StochasticCalculationType) -> StochasticOscillator","summary":"The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"kPeriods","csharpType":"int","pythonType":"int","summary":"The value of the k periods used for calculation."},{"name":"kSlowing","csharpType":"int","pythonType":"int","summary":"The value of the k slowing used for calculation."},{"name":"dPeriods","csharpType":"int","pythonType":"int","summary":"The value of the d periods used for calculation."},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"Type of the Moving Average."},{"name":"calculationType","csharpType":"StochasticCalculationType","pythonType":"StochasticCalculationType","summary":"Type of calculation."}],"returns":{"csharpType":"StochasticOscillator","pythonType":"StochasticOscillator","summary":"Stochastic Oscillator indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyStochastic = Indicators.StochasticOscillator(dailyBars, 9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh);\nPrint(\"Daily stochastic (low/high) %K: {0}\", dailyStochastic.PercentK.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyStochastic = api.Indicators.StochasticOscillator(dailyBars, 9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh)\napi.Print(f\"Daily stochastic (low/high) %K: {dailyStochastic.PercentK.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Supertrend(System.Int32,System.Double)","kind":"method","name":"Supertrend","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Supertrend Supertrend(int periods, double multiplier)","python":"api.Indicators.Supertrend(periods: int, multiplier: float) -> Supertrend","summary":"Supertrend is one of the most popular trend trading indicators","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"Supertrend Period"},{"name":"multiplier","csharpType":"double","pythonType":"float","summary":"Supertrend Multiplier"}],"returns":{"csharpType":"Supertrend","pythonType":"Supertrend","summary":"Supertrend","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var supertrend = Indicators.Supertrend(10, 3);\n// UpTrend has a value while the trend is up, otherwise it is NaN\nvar isUpTrend = !double.IsNaN(supertrend.UpTrend.Last(1));\nPrint(\"Supertrend up trend: {0}\", isUpTrend);","python":"import math\nsupertrend = api.Indicators.Supertrend(10, 3)\n# UpTrend has a value while the trend is up, otherwise it is NaN\nisUpTrend = not math.isnan(supertrend.UpTrend.Last(1))\napi.Print(f\"Supertrend up trend: {isUpTrend}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Supertrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Supertrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.SwingIndex(System.Int32)","kind":"method","name":"SwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"SwingIndex SwingIndex(int limitMoveValue)","python":"api.Indicators.SwingIndex(limitMoveValue: int) -> SwingIndex","summary":"Returns the Swing Index indicator instance.","remarks":null,"parameters":[{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":"The value of the limit move used for calculation."}],"returns":{"csharpType":"SwingIndex","pythonType":"SwingIndex","summary":"Swing Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var swingIndex = Indicators.SwingIndex(12);\nPrint(\"Swing Index of the last closed bar: {0}\", swingIndex.Result.Last(1));","python":"swingIndex = api.Indicators.SwingIndex(12)\napi.Print(f\"Swing Index of the last closed bar: {swingIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.SwingIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"SwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"SwingIndex SwingIndex(Bars bars, int limitMoveValue)","python":"api.Indicators.SwingIndex(bars: Bars, limitMoveValue: int) -> SwingIndex","summary":"Returns the Swing Index indicator instance.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":"The value of the limit move used for calculation."}],"returns":{"csharpType":"SwingIndex","pythonType":"SwingIndex","summary":"Swing Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailySwingIndex = Indicators.SwingIndex(dailyBars, 12);\nPrint(\"Daily Swing Index: {0}\", dailySwingIndex.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailySwingIndex = api.Indicators.SwingIndex(dailyBars, 12)\napi.Print(f\"Daily Swing Index: {dailySwingIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/SwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TickVolume","kind":"method","name":"TickVolume","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TickVolume TickVolume()","python":"api.Indicators.TickVolume() -> TickVolume","summary":"Tick Volume gives you the number of ticks for each bar.","remarks":null,"parameters":[],"returns":{"csharpType":"TickVolume","pythonType":"TickVolume","summary":"TickVolume","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tickVolume = Indicators.TickVolume();\nPrint(\"Tick volume of the last closed bar: {0}\", tickVolume.Result.Last(1));","python":"tickVolume = api.Indicators.TickVolume()\napi.Print(f\"Tick volume of the last closed bar: {tickVolume.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TimeSeriesMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"TimeSeriesMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TimeSeriesMovingAverage TimeSeriesMovingAverage(DataSeries source, int periods)","python":"api.Indicators.TimeSeriesMovingAverage(source: DataSeries, periods: int) -> TimeSeriesMovingAverage","summary":"The Time Series Moving Average is a moving average based on linear regression","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"Number of periods used for calculation."}],"returns":{"csharpType":"TimeSeriesMovingAverage","pythonType":"TimeSeriesMovingAverage","summary":"Time Series Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tsmaFast = Indicators.TimeSeriesMovingAverage(Bars.ClosePrices, 14);\nvar tsmaSlow = Indicators.TimeSeriesMovingAverage(Bars.ClosePrices, 24);\nif (tsmaFast.Result.LastValue > tsmaSlow.Result.LastValue)\n    Print(\"Fast TSMA is above slow TSMA\");","python":"tsmaFast = api.Indicators.TimeSeriesMovingAverage(api.Bars.ClosePrices, 14)\ntsmaSlow = api.Indicators.TimeSeriesMovingAverage(api.Bars.ClosePrices, 24)\nif tsmaFast.Result.LastValue > tsmaSlow.Result.LastValue:\n    api.Print(\"Fast TSMA is above slow TSMA\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TimeSeriesMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TimeSeriesMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TradeVolumeIndex(cAlgo.API.DataSeries)","kind":"method","name":"TradeVolumeIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TradeVolumeIndex TradeVolumeIndex(DataSeries source)","python":"api.Indicators.TradeVolumeIndex(source: DataSeries) -> TradeVolumeIndex","summary":"Trade Volume Index indicator measures the amount of money flowing in and out of an asset.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The price source data used for the calculation."}],"returns":{"csharpType":"TradeVolumeIndex","pythonType":"TradeVolumeIndex","summary":"Trade Volume Index indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tradeVolumeIndex = Indicators.TradeVolumeIndex(Bars.ClosePrices);\nPrint(\"Trade Volume Index: {0}\", tradeVolumeIndex.Result.LastValue);","python":"tradeVolumeIndex = api.Indicators.TradeVolumeIndex(api.Bars.ClosePrices)\napi.Print(f\"Trade Volume Index: {tradeVolumeIndex.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TradeVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TradeVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TriangularMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"TriangularMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TriangularMovingAverage TriangularMovingAverage(DataSeries source, int periods)","python":"api.Indicators.TriangularMovingAverage(source: DataSeries, periods: int) -> TriangularMovingAverage","summary":"The Triangular Moving Average is averaged twice to produce a double smoothed trend indicator","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for TMA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."}],"returns":{"csharpType":"TriangularMovingAverage","pythonType":"TriangularMovingAverage","summary":"Triangular Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tma = Indicators.TriangularMovingAverage(Bars.ClosePrices, 10);\nPrint(\"TMA(10) last value: {0}\", tma.Result.LastValue);","python":"tma = api.Indicators.TriangularMovingAverage(api.Bars.ClosePrices, 10)\napi.Print(f\"TMA(10) last value: {tma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TriangularMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TriangularMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TripleExponentialMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"TripleExponentialMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TripleExponentialMovingAverage TripleExponentialMovingAverage(DataSeries source, int periods)","python":"api.Indicators.TripleExponentialMovingAverage(source: DataSeries, periods: int) -> TripleExponentialMovingAverage","summary":"The Triple Exponential Moving Average (TEMA) is a technical indicator that provides a smoothed representation of price data by applying three levels of exponential smoothing","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation."}],"returns":{"csharpType":"TripleExponentialMovingAverage","pythonType":"TripleExponentialMovingAverage","summary":"The TEMA indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tema = Indicators.TripleExponentialMovingAverage(Bars.ClosePrices, 20);\nPrint(\"TEMA(20): {0}\", tema.Result.LastValue);","python":"tema = api.Indicators.TripleExponentialMovingAverage(api.Bars.ClosePrices, 20)\napi.Print(f\"TEMA(20): {tema.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TripleExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TripleExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Trix(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"Trix","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Trix Trix(DataSeries source, int periods)","python":"api.Indicators.Trix(source: DataSeries, periods: int) -> Trix","summary":"The Trix indicator shows the slope of a triple-smoothed exponential moving average.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for the calculation."}],"returns":{"csharpType":"Trix","pythonType":"Trix","summary":"The Trix indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trix = Indicators.Trix(Bars.ClosePrices, 15);\nPrint(\"Trix(15) of the last closed bar: {0}\", trix.Result.Last(1));","python":"trix = api.Indicators.Trix(api.Bars.ClosePrices, 15)\napi.Print(f\"Trix(15) of the last closed bar: {trix.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Trix/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Trix/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TrueRange","kind":"method","name":"TrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TrueRange TrueRange()","python":"api.Indicators.TrueRange() -> TrueRange","summary":"Initializes the True Range indicator.","remarks":"The True Range indicator is the daily range plus any gap from the closing price of the previous day","parameters":[],"returns":{"csharpType":"TrueRange","pythonType":"TrueRange","summary":"True Range indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trueRange = Indicators.TrueRange();\nPrint(\"True range of the last closed bar: {0}\", trueRange.Result.Last(1));","python":"trueRange = api.Indicators.TrueRange()\napi.Print(f\"True range of the last closed bar: {trueRange.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TrueRange(cAlgo.API.Bars)","kind":"method","name":"TrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TrueRange TrueRange(Bars bars)","python":"api.Indicators.TrueRange(bars: Bars) -> TrueRange","summary":"Initializes the True Range indicator.","remarks":"The True Range indicator is the daily range plus any gap from the closing price of the previous day","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"TrueRange","pythonType":"TrueRange","summary":"True Range indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyTrueRange = Indicators.TrueRange(dailyBars);\nPrint(\"True range of the last closed daily bar: {0}\", dailyTrueRange.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyTrueRange = api.Indicators.TrueRange(dailyBars)\napi.Print(f\"True range of the last closed daily bar: {dailyTrueRange.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TypicalPrice","kind":"method","name":"TypicalPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TypicalPrice TypicalPrice()","python":"api.Indicators.TypicalPrice() -> TypicalPrice","summary":"The Typical Price indicator is the average of the high, low, and closing prices.","remarks":null,"parameters":[],"returns":{"csharpType":"TypicalPrice","pythonType":"TypicalPrice","summary":"Typical Price indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var typicalPrice = Indicators.TypicalPrice();\nPrint(\"Typical price of the last closed bar: {0}\", typicalPrice.Result.Last(1));","python":"typicalPrice = api.Indicators.TypicalPrice()\napi.Print(f\"Typical price of the last closed bar: {typicalPrice.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TypicalPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TypicalPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TypicalPrice(cAlgo.API.Bars)","kind":"method","name":"TypicalPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TypicalPrice TypicalPrice(Bars bars)","python":"api.Indicators.TypicalPrice(bars: Bars) -> TypicalPrice","summary":"The Typical Price indicator is the average of the high, low, and closing prices.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"TypicalPrice","pythonType":"TypicalPrice","summary":"Typical Price indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyTypicalPrice = Indicators.TypicalPrice(dailyBars);\nPrint(\"Typical price of the last closed daily bar: {0}\", dailyTypicalPrice.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyTypicalPrice = api.Indicators.TypicalPrice(dailyBars)\napi.Print(f\"Typical price of the last closed daily bar: {dailyTypicalPrice.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TypicalPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/TypicalPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.UltimateOscillator(System.Int32,System.Int32,System.Int32)","kind":"method","name":"UltimateOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"UltimateOscillator UltimateOscillator(int cycle1, int cycle2, int cycle3)","python":"api.Indicators.UltimateOscillator(cycle1: int, cycle2: int, cycle3: int) -> UltimateOscillator","summary":"Returns the Ultimate Oscillator indicator instance.","remarks":null,"parameters":[{"name":"cycle1","csharpType":"int","pythonType":"int","summary":"The value of the short periods used for calculation."},{"name":"cycle2","csharpType":"int","pythonType":"int","summary":"The value of the medium periods used for calculation."},{"name":"cycle3","csharpType":"int","pythonType":"int","summary":"The value of the long periods used for calculation."}],"returns":{"csharpType":"UltimateOscillator","pythonType":"UltimateOscillator","summary":"UltimateOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ultimateOscillator = Indicators.UltimateOscillator(7, 14, 28);\nPrint(\"Ultimate Oscillator: {0}\", ultimateOscillator.Result.LastValue);","python":"ultimateOscillator = api.Indicators.UltimateOscillator(7, 14, 28)\napi.Print(f\"Ultimate Oscillator: {ultimateOscillator.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/UltimateOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/UltimateOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.UltimateOscillator(cAlgo.API.Bars,System.Int32,System.Int32,System.Int32)","kind":"method","name":"UltimateOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"UltimateOscillator UltimateOscillator(Bars bars, int cycle1, int cycle2, int cycle3)","python":"api.Indicators.UltimateOscillator(bars: Bars, cycle1: int, cycle2: int, cycle3: int) -> UltimateOscillator","summary":"Returns the Ultimate Oscillator indicator instance.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"cycle1","csharpType":"int","pythonType":"int","summary":"The value of the short periods used for calculation."},{"name":"cycle2","csharpType":"int","pythonType":"int","summary":"The value of the medium periods used for calculation."},{"name":"cycle3","csharpType":"int","pythonType":"int","summary":"The value of the long periods used for calculation."}],"returns":{"csharpType":"UltimateOscillator","pythonType":"UltimateOscillator","summary":"UltimateOscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyUltimateOscillator = Indicators.UltimateOscillator(dailyBars, 7, 14, 28);\nPrint(\"Daily Ultimate Oscillator: {0}\", dailyUltimateOscillator.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyUltimateOscillator = api.Indicators.UltimateOscillator(dailyBars, 7, 14, 28)\napi.Print(f\"Daily Ultimate Oscillator: {dailyUltimateOscillator.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/UltimateOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/UltimateOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VariableIndexDynamicAverage(cAlgo.API.DataSeries,System.Int32,System.Int32)","kind":"method","name":"VariableIndexDynamicAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VariableIndexDynamicAverage VariableIndexDynamicAverage(DataSeries source, int cmoPeriods, int smoothPeriods)","python":"api.Indicators.VariableIndexDynamicAverage(source: DataSeries, cmoPeriods: int, smoothPeriods: int) -> VariableIndexDynamicAverage","summary":"The Variable Index Dynamic Average (VIDYA) indicator is a type of moving average that dynamically adjusts its smoothing period based on market volatility.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"cmoPeriods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for the Chande Momentum Oscillator (CMO) calculation."},{"name":"smoothPeriods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for the volatility smoothing factor calculation."}],"returns":{"csharpType":"VariableIndexDynamicAverage","pythonType":"VariableIndexDynamicAverage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var vidya = Indicators.VariableIndexDynamicAverage(Bars.ClosePrices, 9, 12);\nPrint(\"VIDYA(9, 12): {0}\", vidya.Result.LastValue);","python":"vidya = api.Indicators.VariableIndexDynamicAverage(api.Bars.ClosePrices, 9, 12)\napi.Print(f\"VIDYA(9, 12): {vidya.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VariableIndexDynamicAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VariableIndexDynamicAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VariableIndexDynamicAverage(System.Int32,System.Int32)","kind":"method","name":"VariableIndexDynamicAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VariableIndexDynamicAverage VariableIndexDynamicAverage(int cmoPeriods, int smoothPeriods)","python":"api.Indicators.VariableIndexDynamicAverage(cmoPeriods: int, smoothPeriods: int) -> VariableIndexDynamicAverage","summary":"The Variable Index Dynamic Average (VIDYA) indicator is a type of moving average that dynamically adjusts its smoothing period based on market volatility.","remarks":null,"parameters":[{"name":"cmoPeriods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for the Chande Momentum Oscillator (CMO) calculation."},{"name":"smoothPeriods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for the volatility smoothing factor calculation."}],"returns":{"csharpType":"VariableIndexDynamicAverage","pythonType":"VariableIndexDynamicAverage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var vidya = Indicators.VariableIndexDynamicAverage(9, 12);\nif (Bars.ClosePrices.LastValue > vidya.Result.LastValue)\n    Print(\"Price is above VIDYA {0}\", vidya.Result.LastValue);","python":"vidya = api.Indicators.VariableIndexDynamicAverage(9, 12)\nif api.Bars.ClosePrices.LastValue > vidya.Result.LastValue:\n    api.Print(f\"Price is above VIDYA {vidya.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VariableIndexDynamicAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VariableIndexDynamicAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VerticalHorizontalFilter(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"VerticalHorizontalFilter","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VerticalHorizontalFilter VerticalHorizontalFilter(DataSeries source, int periods)","python":"api.Indicators.VerticalHorizontalFilter(source: DataSeries, periods: int) -> VerticalHorizontalFilter","summary":"The Vertical Horizontal Filter indicator measures the level of trend activity.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used for calculation."}],"returns":{"csharpType":"VerticalHorizontalFilter","pythonType":"VerticalHorizontalFilter","summary":"the Vertical Horizontal Filter indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var verticalHorizontalFilter = Indicators.VerticalHorizontalFilter(Bars.ClosePrices, 28);\nPrint(\"Vertical Horizontal Filter: {0}\", verticalHorizontalFilter.Result.LastValue);","python":"verticalHorizontalFilter = api.Indicators.VerticalHorizontalFilter(api.Bars.ClosePrices, 28)\napi.Print(f\"Vertical Horizontal Filter: {verticalHorizontalFilter.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VerticalHorizontalFilter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VerticalHorizontalFilter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeOscillator(System.Int32,System.Int32)","kind":"method","name":"VolumeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeOscillator VolumeOscillator(int shortTerm, int longTerm)","python":"api.Indicators.VolumeOscillator(shortTerm: int, longTerm: int) -> VolumeOscillator","summary":"The Volume Oscillator indicator is the difference between two moving averages.","remarks":null,"parameters":[{"name":"shortTerm","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"longTerm","csharpType":"int","pythonType":"int","summary":"The slow moving average period"}],"returns":{"csharpType":"VolumeOscillator","pythonType":"VolumeOscillator","summary":"Volume Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeOscillator = Indicators.VolumeOscillator(9, 21);\nPrint(\"Volume Oscillator: {0}\", volumeOscillator.Result.LastValue);","python":"volumeOscillator = api.Indicators.VolumeOscillator(9, 21)\napi.Print(f\"Volume Oscillator: {volumeOscillator.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeOscillator(cAlgo.API.Bars,System.Int32,System.Int32)","kind":"method","name":"VolumeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeOscillator VolumeOscillator(Bars bars, int shortTerm, int longTerm)","python":"api.Indicators.VolumeOscillator(bars: Bars, shortTerm: int, longTerm: int) -> VolumeOscillator","summary":"The Volume Oscillator indicator is the difference between two moving averages.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"shortTerm","csharpType":"int","pythonType":"int","summary":"The fast moving average period"},{"name":"longTerm","csharpType":"int","pythonType":"int","summary":"The slow moving average period"}],"returns":{"csharpType":"VolumeOscillator","pythonType":"VolumeOscillator","summary":"Volume Oscillator indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyVolumeOscillator = Indicators.VolumeOscillator(dailyBars, 9, 21);\nPrint(\"Daily Volume Oscillator: {0}\", dailyVolumeOscillator.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyVolumeOscillator = api.Indicators.VolumeOscillator(dailyBars, 9, 21)\napi.Print(f\"Daily Volume Oscillator: {dailyVolumeOscillator.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeROC(System.Int32)","kind":"method","name":"VolumeROC","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeROC VolumeROC(int periods)","python":"api.Indicators.VolumeROC(periods: int) -> VolumeROC","summary":"Volume Rate of Change Indicator measures the rate of change of the tick volume.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"VolumeROC","pythonType":"VolumeROC","summary":"The Volume ROC indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeRoc = Indicators.VolumeROC(14);\nPrint(\"Volume ROC(14): {0}%\", volumeRoc.Result.LastValue);","python":"volumeRoc = api.Indicators.VolumeROC(14)\napi.Print(f\"Volume ROC(14): {volumeRoc.Result.LastValue}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeROC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeROC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeROC(cAlgo.API.Bars,System.Int32)","kind":"method","name":"VolumeROC","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeROC VolumeROC(Bars bars, int periods)","python":"api.Indicators.VolumeROC(bars: Bars, periods: int) -> VolumeROC","summary":"Volume Rate of Change Indicator measures the rate of change of the tick volume.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for the calculation"}],"returns":{"csharpType":"VolumeROC","pythonType":"VolumeROC","summary":"The Volume ROC indicator instance.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyVolumeRoc = Indicators.VolumeROC(dailyBars, 14);\nPrint(\"Daily Volume ROC(14): {0}%\", dailyVolumeRoc.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyVolumeRoc = api.Indicators.VolumeROC(dailyBars, 14)\napi.Print(f\"Daily Volume ROC(14): {dailyVolumeRoc.Result.LastValue}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeROC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/VolumeROC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WeightedClose","kind":"method","name":"WeightedClose","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WeightedClose WeightedClose()","python":"api.Indicators.WeightedClose() -> WeightedClose","summary":"The WeightedClose indicator is an average of each day's price with extra weight given to the closing price.","remarks":"Similar to the Median Price and Typical Price Indicators","parameters":[],"returns":{"csharpType":"WeightedClose","pythonType":"WeightedClose","summary":"WeightedClose indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var weightedClose = Indicators.WeightedClose();\nPrint(\"Weighted close of the last closed bar: {0}\", weightedClose.Result.Last(1));","python":"weightedClose = api.Indicators.WeightedClose()\napi.Print(f\"Weighted close of the last closed bar: {weightedClose.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedClose/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedClose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WeightedClose(cAlgo.API.Bars)","kind":"method","name":"WeightedClose","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WeightedClose WeightedClose(Bars bars)","python":"api.Indicators.WeightedClose(bars: Bars) -> WeightedClose","summary":"The WeightedClose indicator is an average of each day's price with extra weight given to the closing price.","remarks":"Similar to the Median Price and Typical Price Indicators","parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"WeightedClose","pythonType":"WeightedClose","summary":"WeightedClose indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyWeightedClose = Indicators.WeightedClose(dailyBars);\nPrint(\"Weighted close of the last closed daily bar: {0}\", dailyWeightedClose.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyWeightedClose = api.Indicators.WeightedClose(dailyBars)\napi.Print(f\"Weighted close of the last closed daily bar: {dailyWeightedClose.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedClose/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedClose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WeightedMovingAverage(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"WeightedMovingAverage","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WeightedMovingAverage WeightedMovingAverage(DataSeries source, int periods)","python":"api.Indicators.WeightedMovingAverage(source: DataSeries, periods: int) -> WeightedMovingAverage","summary":"The Weighted Moving Average smoothes the price data producing a trend indicator.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for WMA calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The periods used in the calculation."}],"returns":{"csharpType":"WeightedMovingAverage","pythonType":"WeightedMovingAverage","summary":"Weighted Moving Average indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wma = Indicators.WeightedMovingAverage(Bars.ClosePrices, 20);\nPrint(\"WMA(20) last value: {0}\", wma.Result.LastValue);","python":"wma = api.Indicators.WeightedMovingAverage(api.Bars.ClosePrices, 20)\napi.Print(f\"WMA(20) last value: {wma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WeightedMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WellesWilderSmoothing(cAlgo.API.DataSeries,System.Int32)","kind":"method","name":"WellesWilderSmoothing","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WellesWilderSmoothing WellesWilderSmoothing(DataSeries source, int periods)","python":"api.Indicators.WellesWilderSmoothing(source: DataSeries, periods: int) -> WellesWilderSmoothing","summary":"Welles Wilder Smoothing eliminates noise to identify the trend.","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":"The source data used for calculation."},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The value of the periods used for calculation."}],"returns":{"csharpType":"WellesWilderSmoothing","pythonType":"WellesWilderSmoothing","summary":"Welles Wilder Smoothing indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wellesWilder = Indicators.WellesWilderSmoothing(Bars.ClosePrices, 14);\nPrint(\"Welles Wilder Smoothing(14): {0}\", wellesWilder.Result.LastValue);","python":"wellesWilder = api.Indicators.WellesWilderSmoothing(api.Bars.ClosePrices, 14)\napi.Print(f\"Welles Wilder Smoothing(14): {wellesWilder.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WellesWilderSmoothing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WellesWilderSmoothing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsAccumulationDistribution","kind":"method","name":"WilliamsAccumulationDistribution","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsAccumulationDistribution WilliamsAccumulationDistribution()","python":"api.Indicators.WilliamsAccumulationDistribution() -> WilliamsAccumulationDistribution","summary":"The Williams Accumulation Distribution indicator shows bullish or bearish trends.","remarks":null,"parameters":[],"returns":{"csharpType":"WilliamsAccumulationDistribution","pythonType":"WilliamsAccumulationDistribution","summary":"Williams Accumulation Distribution indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var williamsAd = Indicators.WilliamsAccumulationDistribution();\nPrint(\"Williams A/D: {0}\", williamsAd.Result.LastValue);","python":"williamsAd = api.Indicators.WilliamsAccumulationDistribution()\napi.Print(f\"Williams A/D: {williamsAd.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsAccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsAccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsAccumulationDistribution(cAlgo.API.Bars)","kind":"method","name":"WilliamsAccumulationDistribution","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsAccumulationDistribution WilliamsAccumulationDistribution(Bars bars)","python":"api.Indicators.WilliamsAccumulationDistribution(bars: Bars) -> WilliamsAccumulationDistribution","summary":"The Williams Accumulation Distribution indicator shows bullish or bearish trends.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"}],"returns":{"csharpType":"WilliamsAccumulationDistribution","pythonType":"WilliamsAccumulationDistribution","summary":"Williams Accumulation Distribution indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyWilliamsAd = Indicators.WilliamsAccumulationDistribution(dailyBars);\nPrint(\"Daily Williams A/D: {0}\", dailyWilliamsAd.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyWilliamsAd = api.Indicators.WilliamsAccumulationDistribution(dailyBars)\napi.Print(f\"Daily Williams A/D: {dailyWilliamsAd.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsAccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsAccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsPctR(System.Int32)","kind":"method","name":"WilliamsPctR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsPctR WilliamsPctR(int periods)","python":"api.Indicators.WilliamsPctR(periods: int) -> WilliamsPctR","summary":"The Williams Percent R indicator is a momentum indicator measuring overbought and oversold levels.","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for calculation."}],"returns":{"csharpType":"WilliamsPctR","pythonType":"WilliamsPctR","summary":"The Williams Percent R indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var williamsPctR = Indicators.WilliamsPctR(14);\nif (williamsPctR.Result.Last(1) < -80)\n    Print(\"Williams %R is oversold: {0}\", williamsPctR.Result.Last(1));","python":"williamsPctR = api.Indicators.WilliamsPctR(14)\nif williamsPctR.Result.Last(1) < -80:\n    api.Print(f\"Williams %R is oversold: {williamsPctR.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsPctR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsPctR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsPctR(cAlgo.API.Bars,System.Int32)","kind":"method","name":"WilliamsPctR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsPctR WilliamsPctR(Bars bars, int periods)","python":"api.Indicators.WilliamsPctR(bars: Bars, periods: int) -> WilliamsPctR","summary":"The Williams Percent R indicator is a momentum indicator measuring overbought and oversold levels.","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":"The Bars that will be used by indicator, you can pass another timeframe/symbol bars"},{"name":"periods","csharpType":"int","pythonType":"int","summary":"The period used for calculation."}],"returns":{"csharpType":"WilliamsPctR","pythonType":"WilliamsPctR","summary":"The Williams Percent R indicator instance","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyWilliamsPctR = Indicators.WilliamsPctR(dailyBars, 14);\nPrint(\"Daily Williams %R: {0}\", dailyWilliamsPctR.Result.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyWilliamsPctR = api.Indicators.WilliamsPctR(dailyBars, 14)\napi.Print(f\"Daily Williams %R: {dailyWilliamsPctR.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsPctR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/WilliamsPctR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CommodityChannelIndex(cAlgo.API.Bars,System.Int32)","kind":"method","name":"CommodityChannelIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CommodityChannelIndex CommodityChannelIndex(Bars bars, int periods)","python":"api.Indicators.CommodityChannelIndex(bars: Bars, periods: int) -> CommodityChannelIndex","summary":"","remarks":null,"parameters":[{"name":"bars","csharpType":"Bars","pythonType":"Bars","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"CommodityChannelIndex","pythonType":"CommodityChannelIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with DataSeries parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.GetIndicator``1(cAlgo.API.Internals.MarketSeries,System.Object[])","kind":"method","name":"GetIndicator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TIndicator GetIndicator(MarketSeries marketSeries, object[] parameterValues)","python":"api.Indicators.GetIndicator(marketSeries: MarketSeries, parameterValues: list[object]) -> TIndicator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"parameterValues","csharpType":"object[]","pythonType":"list[object]","summary":""}],"returns":{"csharpType":"TIndicator","pythonType":"TIndicator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.HighMinusLow(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"HighMinusLow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"HighMinusLow HighMinusLow(MarketSeries marketSeries)","python":"api.Indicators.HighMinusLow(marketSeries: MarketSeries) -> HighMinusLow","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"HighMinusLow","pythonType":"HighMinusLow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TrueRange(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"TrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TrueRange TrueRange(MarketSeries marketSeries)","python":"api.Indicators.TrueRange(marketSeries: MarketSeries) -> TrueRange","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"TrueRange","pythonType":"TrueRange","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.SwingIndex(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"SwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"SwingIndex SwingIndex(MarketSeries marketSeries, int limitMoveValue)","python":"api.Indicators.SwingIndex(marketSeries: MarketSeries, limitMoveValue: int) -> SwingIndex","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"SwingIndex","pythonType":"SwingIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AccumulativeSwingIndex(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"AccumulativeSwingIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AccumulativeSwingIndex AccumulativeSwingIndex(MarketSeries marketSeries, int limitMoveValue)","python":"api.Indicators.AccumulativeSwingIndex(marketSeries: MarketSeries, limitMoveValue: int) -> AccumulativeSwingIndex","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"limitMoveValue","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"AccumulativeSwingIndex","pythonType":"AccumulativeSwingIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Aroon(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"Aroon","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Aroon Aroon(MarketSeries marketSeries, int periods)","python":"api.Indicators.Aroon(marketSeries: MarketSeries, periods: int) -> Aroon","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"Aroon","pythonType":"Aroon","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.UltimateOscillator(cAlgo.API.Internals.MarketSeries,System.Int32,System.Int32,System.Int32)","kind":"method","name":"UltimateOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"UltimateOscillator UltimateOscillator(MarketSeries marketSeries, int cycle1, int cycle2, int cycle3)","python":"api.Indicators.UltimateOscillator(marketSeries: MarketSeries, cycle1: int, cycle2: int, cycle3: int) -> UltimateOscillator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"cycle1","csharpType":"int","pythonType":"int","summary":""},{"name":"cycle2","csharpType":"int","pythonType":"int","summary":""},{"name":"cycle3","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"UltimateOscillator","pythonType":"UltimateOscillator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DirectionalMovementSystem(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"DirectionalMovementSystem","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DirectionalMovementSystem DirectionalMovementSystem(MarketSeries marketSeries, int periods)","python":"api.Indicators.DirectionalMovementSystem(marketSeries: MarketSeries, periods: int) -> DirectionalMovementSystem","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"DirectionalMovementSystem","pythonType":"DirectionalMovementSystem","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ParabolicSAR(cAlgo.API.Internals.MarketSeries,System.Double,System.Double)","kind":"method","name":"ParabolicSAR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ParabolicSAR ParabolicSAR(MarketSeries marketSeries, double minAf, double maxAf)","python":"api.Indicators.ParabolicSAR(marketSeries: MarketSeries, minAf: float, maxAf: float) -> ParabolicSAR","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"minAf","csharpType":"double","pythonType":"float","summary":""},{"name":"maxAf","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"ParabolicSAR","pythonType":"ParabolicSAR","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.StochasticOscillator(cAlgo.API.Internals.MarketSeries,System.Int32,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"StochasticOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"StochasticOscillator StochasticOscillator(MarketSeries marketSeries, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)","python":"api.Indicators.StochasticOscillator(marketSeries: MarketSeries, kPeriods: int, kSlowing: int, dPeriods: int, maType: MovingAverageType) -> StochasticOscillator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"kPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"kSlowing","csharpType":"int","pythonType":"int","summary":""},{"name":"dPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""}],"returns":{"csharpType":"StochasticOscillator","pythonType":"StochasticOscillator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MedianPrice(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"MedianPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MedianPrice MedianPrice(MarketSeries marketSeries)","python":"api.Indicators.MedianPrice(marketSeries: MarketSeries) -> MedianPrice","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"MedianPrice","pythonType":"MedianPrice","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsAccumulationDistribution(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"WilliamsAccumulationDistribution","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsAccumulationDistribution WilliamsAccumulationDistribution(MarketSeries marketSeries)","python":"api.Indicators.WilliamsAccumulationDistribution(marketSeries: MarketSeries) -> WilliamsAccumulationDistribution","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"WilliamsAccumulationDistribution","pythonType":"WilliamsAccumulationDistribution","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalChaosBands(System.Int32)","kind":"method","name":"FractalChaosBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalChaosBands FractalChaosBands(int periods)","python":"api.Indicators.FractalChaosBands(periods: int) -> FractalChaosBands","summary":"","remarks":null,"parameters":[{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"FractalChaosBands","pythonType":"FractalChaosBands","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Periods parameter is not used. Use FractalChaosBands() instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalChaosBands(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"FractalChaosBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalChaosBands FractalChaosBands(MarketSeries marketSeries, int periods)","python":"api.Indicators.FractalChaosBands(marketSeries: MarketSeries, periods: int) -> FractalChaosBands","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"FractalChaosBands","pythonType":"FractalChaosBands","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Periods parameter is not used. Use FractalChaosBands(Bars) instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.FractalChaosBands(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"FractalChaosBands","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"FractalChaosBands FractalChaosBands(MarketSeries marketSeries)","python":"api.Indicators.FractalChaosBands(marketSeries: MarketSeries) -> FractalChaosBands","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"FractalChaosBands","pythonType":"FractalChaosBands","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.TypicalPrice(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"TypicalPrice","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"TypicalPrice TypicalPrice(MarketSeries marketSeries)","python":"api.Indicators.TypicalPrice(marketSeries: MarketSeries) -> TypicalPrice","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"TypicalPrice","pythonType":"TypicalPrice","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.CommodityChannelIndex(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"CommodityChannelIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"CommodityChannelIndex CommodityChannelIndex(MarketSeries marketSeries, int periods)","python":"api.Indicators.CommodityChannelIndex(marketSeries: MarketSeries, periods: int) -> CommodityChannelIndex","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"CommodityChannelIndex","pythonType":"CommodityChannelIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MassIndex(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"MassIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MassIndex MassIndex(MarketSeries marketSeries, int periods)","python":"api.Indicators.MassIndex(marketSeries: MarketSeries, periods: int) -> MassIndex","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"MassIndex","pythonType":"MassIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinVolatility(cAlgo.API.Internals.MarketSeries,System.Int32,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"ChaikinVolatility","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinVolatility ChaikinVolatility(MarketSeries marketSeries, int periods, int rateOfChange, MovingAverageType maType)","python":"api.Indicators.ChaikinVolatility(marketSeries: MarketSeries, periods: int, rateOfChange: int, maType: MovingAverageType) -> ChaikinVolatility","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""},{"name":"rateOfChange","csharpType":"int","pythonType":"int","summary":""},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""}],"returns":{"csharpType":"ChaikinVolatility","pythonType":"ChaikinVolatility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WilliamsPctR(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"WilliamsPctR","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WilliamsPctR WilliamsPctR(MarketSeries marketSeries, int periods)","python":"api.Indicators.WilliamsPctR(marketSeries: MarketSeries, periods: int) -> WilliamsPctR","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"WilliamsPctR","pythonType":"WilliamsPctR","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.WeightedClose(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"WeightedClose","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"WeightedClose WeightedClose(MarketSeries marketSeries)","python":"api.Indicators.WeightedClose(marketSeries: MarketSeries) -> WeightedClose","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"WeightedClose","pythonType":"WeightedClose","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.ChaikinMoneyFlow(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"ChaikinMoneyFlow","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"ChaikinMoneyFlow ChaikinMoneyFlow(MarketSeries marketSeries, int periods)","python":"api.Indicators.ChaikinMoneyFlow(marketSeries: MarketSeries, periods: int) -> ChaikinMoneyFlow","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"ChaikinMoneyFlow","pythonType":"ChaikinMoneyFlow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.EaseOfMovement(cAlgo.API.Internals.MarketSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"EaseOfMovement","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"EaseOfMovement EaseOfMovement(MarketSeries marketSeries, int periods, MovingAverageType maType)","python":"api.Indicators.EaseOfMovement(marketSeries: MarketSeries, periods: int, maType: MovingAverageType) -> EaseOfMovement","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""}],"returns":{"csharpType":"EaseOfMovement","pythonType":"EaseOfMovement","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.MoneyFlowIndex(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"MoneyFlowIndex","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"MoneyFlowIndex MoneyFlowIndex(MarketSeries marketSeries, int periods)","python":"api.Indicators.MoneyFlowIndex(marketSeries: MarketSeries, periods: int) -> MoneyFlowIndex","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"MoneyFlowIndex","pythonType":"MoneyFlowIndex","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeOscillator(cAlgo.API.Internals.MarketSeries,System.Int32,System.Int32)","kind":"method","name":"VolumeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeOscillator VolumeOscillator(MarketSeries marketSeries, int shortTerm, int longTerm)","python":"api.Indicators.VolumeOscillator(marketSeries: MarketSeries, shortTerm: int, longTerm: int) -> VolumeOscillator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"shortTerm","csharpType":"int","pythonType":"int","summary":""},{"name":"longTerm","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"VolumeOscillator","pythonType":"VolumeOscillator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.VolumeROC(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"VolumeROC","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"VolumeROC VolumeROC(MarketSeries marketSeries, int periods)","python":"api.Indicators.VolumeROC(marketSeries: MarketSeries, periods: int) -> VolumeROC","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"VolumeROC","pythonType":"VolumeROC","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AverageTrueRange(cAlgo.API.Internals.MarketSeries,System.Int32,cAlgo.API.MovingAverageType)","kind":"method","name":"AverageTrueRange","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AverageTrueRange AverageTrueRange(MarketSeries marketSeries, int periods, MovingAverageType maType)","python":"api.Indicators.AverageTrueRange(marketSeries: MarketSeries, periods: int, maType: MovingAverageType) -> AverageTrueRange","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""}],"returns":{"csharpType":"AverageTrueRange","pythonType":"AverageTrueRange","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.DonchianChannel(cAlgo.API.Internals.MarketSeries,System.Int32)","kind":"method","name":"DonchianChannel","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"DonchianChannel DonchianChannel(MarketSeries marketSeries, int periods)","python":"api.Indicators.DonchianChannel(marketSeries: MarketSeries, periods: int) -> DonchianChannel","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"DonchianChannel","pythonType":"DonchianChannel","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.IchimokuKinkoHyo(cAlgo.API.Internals.MarketSeries,System.Int32,System.Int32,System.Int32)","kind":"method","name":"IchimokuKinkoHyo","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"IchimokuKinkoHyo IchimokuKinkoHyo(MarketSeries marketSeries, int tenkanSenPeriods, int kijunSenPeriods, int senkouSpanBPeriods)","python":"api.Indicators.IchimokuKinkoHyo(marketSeries: MarketSeries, tenkanSenPeriods: int, kijunSenPeriods: int, senkouSpanBPeriods: int) -> IchimokuKinkoHyo","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"tenkanSenPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"kijunSenPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"senkouSpanBPeriods","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"IchimokuKinkoHyo","pythonType":"IchimokuKinkoHyo","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AwesomeOscillator(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"AwesomeOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AwesomeOscillator AwesomeOscillator(MarketSeries marketSeries)","python":"api.Indicators.AwesomeOscillator(marketSeries: MarketSeries) -> AwesomeOscillator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"AwesomeOscillator","pythonType":"AwesomeOscillator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.AcceleratorOscillator(cAlgo.API.Internals.MarketSeries)","kind":"method","name":"AcceleratorOscillator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"AcceleratorOscillator AcceleratorOscillator(MarketSeries marketSeries)","python":"api.Indicators.AcceleratorOscillator(marketSeries: MarketSeries) -> AcceleratorOscillator","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""}],"returns":{"csharpType":"AcceleratorOscillator","pythonType":"AcceleratorOscillator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.KeltnerChannels(cAlgo.API.Internals.MarketSeries,System.Int32,cAlgo.API.MovingAverageType,System.Int32,cAlgo.API.MovingAverageType,System.Double)","kind":"method","name":"KeltnerChannels","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"KeltnerChannels KeltnerChannels(MarketSeries marketSeries, int maPeriod, MovingAverageType maType, int atrPeriod, MovingAverageType atrMaType, double bandDistance)","python":"api.Indicators.KeltnerChannels(marketSeries: MarketSeries, maPeriod: int, maType: MovingAverageType, atrPeriod: int, atrMaType: MovingAverageType, bandDistance: float) -> KeltnerChannels","summary":"","remarks":null,"parameters":[{"name":"marketSeries","csharpType":"MarketSeries","pythonType":"MarketSeries","summary":""},{"name":"maPeriod","csharpType":"int","pythonType":"int","summary":""},{"name":"maType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""},{"name":"atrPeriod","csharpType":"int","pythonType":"int","summary":""},{"name":"atrMaType","csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":""},{"name":"bandDistance","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"KeltnerChannels","pythonType":"KeltnerChannels","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use overload with Bars instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Alligator(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)","kind":"method","name":"Alligator","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Alligator Alligator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift)","python":"api.Indicators.Alligator(jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int) -> Alligator","summary":"","remarks":null,"parameters":[{"name":"jawsPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"jawsShift","csharpType":"int","pythonType":"int","summary":""},{"name":"teethPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"teethShift","csharpType":"int","pythonType":"int","summary":""},{"name":"lipsPeriods","csharpType":"int","pythonType":"int","summary":""},{"name":"lipsShift","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"Alligator","pythonType":"Alligator","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Specify moving average type (Simple or Smoothed)","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.IIndicatorsAccessor.Vidya(cAlgo.API.DataSeries,System.Int32,System.Double)","kind":"method","name":"Vidya","type":"T:cAlgo.API.Internals.IIndicatorsAccessor","namespace":"cAlgo.API.Internals","group":"Indicators","csharp":"Vidya Vidya(DataSeries source, int periods, double r2Scale)","python":"api.Indicators.Vidya(source: DataSeries, periods: int, r2Scale: float) -> Vidya","summary":"","remarks":null,"parameters":[{"name":"source","csharpType":"DataSeries","pythonType":"DataSeries","summary":""},{"name":"periods","csharpType":"int","pythonType":"int","summary":""},{"name":"r2Scale","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"Vidya","pythonType":"Vidya","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VariableIndexDynamicAverage instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.INotifications","kind":"interface","name":"INotifications","type":null,"namespace":"cAlgo.API.Internals","group":"Notifications","csharp":"public interface INotifications","python":"INotifications","summary":"It is an interface that represents all Notifications.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use API notifications to play sound or send an email\n    public partial class NotificationsSample : Indicator\n    {\n        private int _lastNotifiedBarIndex;\n\n        protected override void Initialize()\n        {\n        }\n\n        public override void Calculate(int index)\n        {\n            if (!IsLastBar || _lastNotifiedBarIndex == index) return;\n\n            _lastNotifiedBarIndex = index;\n\n            if (Bars.Last(1).Close > Bars.Last(1).Open)\n            {\n                Notify(\"Up Bar Closed\");\n            }\n            else if (Bars.Last(1).Close < Bars.Last(1).Open)\n            {\n                Notify(\"Down Bar Closed\");\n            }\n        }\n\n        private void Notify(string message)\n        {\n            if (!string.IsNullOrWhiteSpace(SoundFilePath))\n            {\n                Notifications.PlaySound(SoundFilePath);\n            }\n\n            if (!string.IsNullOrWhiteSpace(SenderEmail) && !string.IsNullOrWhiteSpace(ReceiverEmail))\n            {\n                Notifications.SendEmail(SenderEmail, ReceiverEmail, \"Notification\", message);\n            }\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass NotificationsSample():\n    def initialize(self):\n        self.lastNotifiedBarIndex = 0\n\n    def calculate(self, index):\n        if api.IsLastBar == False or self.lastNotifiedBarIndex == index:\n            return\n\n        self.lastNotifiedBarIndex = index\n\n        if api.Bars.Last(1).Close > api.Bars.Last(1).Open:\n            self.notify(\"Up Bar Closed\")\n        elif api.Bars.Last(1).Close < api.Bars.Last(1).Open:\n            self.notify(\"Down Bar Closed\")\n\n    def notify(self, message):\n        if api.SoundFilePath is not None and len(api.SoundFilePath) > 0:\n            api.Notifications.PlaySound(api.SoundFilePath)\n\n        if api.SenderEmail is not None and len(api.SenderEmail) > 0 and api.ReceiverEmail is not None and len(api.ReceiverEmail) > 0:\n            api.Notifications.SendEmail(api.SenderEmail, api.ReceiverEmail, \"Notification\", message)\n\n        if api.ShowPopup:\n            api.Notifications.ShowPopup(\"Notification\", message, PopupNotificationState.Success)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"SoundFilePath\",\n      \"DisplayName\": \"Sound File Path\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"C:\\\\Windows\\\\Media\\\\notify.wav\"\n    },\n    {\n      \"Name\": \"SenderEmail\",\n      \"DisplayName\": \"Sender Email\",\n      \"Type\": \"String\"\n    },\n    {\n      \"Name\": \"ReceiverEmail\",\n      \"DisplayName\": \"Receiver Email\",\n      \"Type\": \"String\"\n    },\n    {\n      \"Name\": \"ShowPopup\",\n      \"DisplayName\": \"Show Popup\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"PlaySound and ShowPopup do nothing in the CLI; SendEmail sends the email as on desktop."},{"name":"Cloud","support":"None","behaviour":"Nothing is played, sent or shown in the cloud, and no error is reported."}]}
{"id":"M:cAlgo.API.Internals.INotifications.PlaySound(System.String)","kind":"method","name":"PlaySound","type":"T:cAlgo.API.Internals.INotifications","namespace":"cAlgo.API.Internals","group":"Notifications","csharp":"void PlaySound(string fileName)","python":"api.Notifications.PlaySound(fileName: str) -> None","summary":"Plays a notification sound.","remarks":"This method doesn't work during backtesting and optimization. In indicators, use it with IsLastBar/IsLastBar, for real-time values.","parameters":[{"name":"fileName","csharpType":"string","pythonType":"str","summary":"The sound file path"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Notifications.PlaySound(@\"C:\\SampleDestination\\SampleSound.mp3\");","python":"api.Notifications.PlaySound(r\"C:\\SampleDestination\\SampleSound.mp3\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/PlaySound/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/PlaySound/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No sound is played. No error is reported."},{"name":"Cloud","support":"None","behaviour":"No sound is played. No error is reported."}]}
{"id":"M:cAlgo.API.Internals.INotifications.PlaySound(cAlgo.API.SoundType)","kind":"method","name":"PlaySound","type":"T:cAlgo.API.Internals.INotifications","namespace":"cAlgo.API.Internals","group":"Notifications","csharp":"void PlaySound(SoundType soundType)","python":"api.Notifications.PlaySound(soundType: SoundType) -> None","summary":"Plays the specified SoundType.","remarks":"This method doesn't work during backtesting and optimization. In indicators, use it with IsLastBar/IsLastBar, for real-time values.","parameters":[{"name":"soundType","csharpType":"SoundType","pythonType":"SoundType","summary":"The SoundType to be played."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Notifications.PlaySound(SoundType.PositiveNotification);","python":"api.Notifications.PlaySound(SoundType.PositiveNotification)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/PlaySound/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/PlaySound/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No sound is played. No error is reported."},{"name":"Cloud","support":"None","behaviour":"No sound is played. No error is reported."}]}
{"id":"M:cAlgo.API.Internals.INotifications.SendEmail(System.String,System.String,System.String,System.String)","kind":"method","name":"SendEmail","type":"T:cAlgo.API.Internals.INotifications","namespace":"cAlgo.API.Internals","group":"Notifications","csharp":"void SendEmail(string from, string to, string subject, string text)","python":"api.Notifications.SendEmail(from: str, to: str, subject: str, text: str) -> None","summary":"Sends a notification email message.","remarks":"This method doesn't work during backtesting and optimization. Use correct settings before trying to send an email notification. You can do that in Preferences -> Email Settings","parameters":[{"name":"from","csharpType":"string","pythonType":"str","summary":"Sender's Address"},{"name":"to","csharpType":"string","pythonType":"str","summary":"Recipient's Address"},{"name":"subject","csharpType":"string","pythonType":"str","summary":"Email Subject"},{"name":"text","csharpType":"string","pythonType":"str","summary":"Email Body"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Notifications.SendEmail(\"from@email.com\", \"to@email.com\",\n            \"Email Notification Subject\", \"Email body\");","python":"api.Notifications.SendEmail(\"from@email.com\", \"to@email.com\",\n            \"Email Notification Subject\", \"Email body\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/SendEmail/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/SendEmail/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No email is sent and nothing is logged. No error is reported."}]}
{"id":"M:cAlgo.API.Internals.INotifications.ShowPopup(System.String,System.String,cAlgo.API.PopupNotificationState)","kind":"method","name":"ShowPopup","type":"T:cAlgo.API.Internals.INotifications","namespace":"cAlgo.API.Internals","group":"Notifications","csharp":"PopupNotification ShowPopup(string caption, string message, PopupNotificationState initialState)","python":"api.Notifications.ShowPopup(caption: str, message: str, initialState: PopupNotificationState) -> PopupNotification","summary":"Shows a popup notification.","remarks":null,"parameters":[{"name":"caption","csharpType":"string","pythonType":"str","summary":"Caption or title."},{"name":"message","csharpType":"string","pythonType":"str","summary":"Message or description."},{"name":"initialState","csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"Initial state of notification."}],"returns":{"csharpType":"PopupNotification","pythonType":"PopupNotification","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        Notifications.ShowPopup(\"Caption\", \"Message\", PopupNotificationState.Success);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.Notifications.ShowPopup(\"Caption\", \"Message\", PopupNotificationState.Success)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/ShowPopup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/ShowPopup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No popup is shown. Returns a PopupNotification whose State is the initial state passed in."},{"name":"Cloud","support":"None","behaviour":"No popup is shown. Returns a PopupNotification whose State is the initial state passed in."}]}
{"id":"T:cAlgo.API.Collections.IReadonlyList`1","kind":"interface","name":"IReadonlyList<T>","type":null,"namespace":"cAlgo.API.Collections","group":"Collections","csharp":"public interface IReadonlyList<T>","python":"IReadonlyList","summary":"Represents a read only collection of a specified type","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"IReadonlyList<RobotType> robots = AlgoRegistry.Robots;\nfor (var i = 0; i < robots.Count; i++)\n    Print(\"cBot {0}: {1}\", i, robots[i].Name);","python":"robots = api.AlgoRegistry.Robots\nfor i in range(robots.Count):\n    api.Print(f\"cBot {i}: {robots[i].Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Collections.IReadonlyList`1.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Collections.IReadonlyList`1","namespace":"cAlgo.API.Collections","group":"Collections","csharp":"int Count {get;}","python":"readonlyList.Count: int","summary":"The total number of elements contained in the collection","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Installed cBots: {0}\", AlgoRegistry.Robots.Count);","python":"api.Print(f\"Installed cBots: {api.AlgoRegistry.Robots.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Collections.IReadonlyList`1.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Collections.IReadonlyList`1","namespace":"cAlgo.API.Collections","group":"Collections","csharp":"T Item {get;}","python":"readonlyList[index: int] -> T","summary":"Represents the item contained in the collection at a specific index","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The position in the collection where the item is contained"}],"returns":{"csharpType":"T","pythonType":"T","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var robots = AlgoRegistry.Robots;\nif (robots.Count > 0)\n    Print(\"First installed cBot: {0}\", robots[0].Name);","python":"robots = api.AlgoRegistry.Robots\nif robots.Count > 0:\n    api.Print(f\"First installed cBot: {robots[0].Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/IReadonlyList/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.IServer","kind":"interface","name":"IServer","type":null,"namespace":"cAlgo.API.Internals","group":"Application","csharp":"public interface IServer","python":"IServer","summary":"Server related information.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Server object to get data related to server and connection\n    public partial class ServerSample : Indicator\n    {\n        private TextBlock _isConnectedTextBlock;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(4, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 5);\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n\n            grid.AddChild(new TextBlock { Text = \"Server Info\", Style = style, HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock { Text = \"Time\", Style = style }, 1, 0);\n            grid.AddChild(new TextBlock { Text = Server.Time.ToString(\"o\"), Style = style }, 1, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Time (UTC)\", Style = style }, 2, 0);\n            grid.AddChild(new TextBlock { Text = Server.TimeInUtc.ToString(\"o\"), Style = style }, 2, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Is Connected\", Style = style }, 3, 0);\n\n            _isConnectedTextBlock = new TextBlock\n            {\n                Text = Server.IsConnected ? \"Yes\" : \"No\",\n                Style = style,\n            };\n\n            Server.Connected += () => _isConnectedTextBlock.Text = \"Yes\";\n            Server.Disconnected += () => _isConnectedTextBlock.Text = \"No\";\n\n            grid.AddChild(_isConnectedTextBlock, 3, 1);\n\n            Chart.AddControl(grid);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass ServerSample():\n    def initialize(self):\n        grid = Grid(4, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 5)\n        self.style.Set(ControlProperty.Margin, 5)\n        self.style.Set(ControlProperty.FontWeight, FontWeight.ExtraBold)\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n\n        titleTextBlock = self.get_text_block(\"Server Info\")\n        titleTextBlock.HorizontalAlignment = HorizontalAlignment.Center\n\n        grid.AddChild(titleTextBlock, 0, 0, 1, 2)\n        grid.AddChild(self.get_text_block(\"Time\"), 1, 0)\n        grid.AddChild(self.get_text_block(str(api.Server.Time)), 1, 1)\n        grid.AddChild(self.get_text_block(\"Time (UTC)\"), 2, 0)\n        grid.AddChild(self.get_text_block(str(api.Server.TimeInUtc)), 2, 1)\n        grid.AddChild(self.get_text_block(\"Is Connected\"), 3, 0)\n\n        self.isConnectedTextBlock = self.get_text_block(\"Yes\" if api.Server.IsConnected else \"No\")\n\n        api.Server.Connected += self.on_server_connected\n        api.Server.Disconnected += self.on_server_disconnected\n\n        grid.AddChild(self.isConnectedTextBlock, 3, 1)\n\n        api.Chart.AddControl(grid)\n\n    def on_server_connected(self):\n        self.isConnectedTextBlock.Text = \"Yes\"\n\n    def on_server_disconnected(self):\n        self.isConnectedTextBlock.Text = \"No\"\n\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IServer.IsConnected","kind":"property","name":"IsConnected","type":"T:cAlgo.API.Internals.IServer","namespace":"cAlgo.API.Internals","group":"Application","csharp":"bool IsConnected {get;}","python":"api.Server.IsConnected: bool","summary":"Indicates current connection status with the server","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Server.IsConnected)\n    Print(\"Connected to the server, server time: {0}\", Server.Time);\nelse\n    Print(\"Not connected to the server\");","python":"if api.Server.IsConnected:\n    api.Print(f\"Connected to the server, server time: {api.Server.Time}\")\nelse:\n    api.Print(\"Not connected to the server\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/IsConnected/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/IsConnected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IServer.Time","kind":"property","name":"Time","type":"T:cAlgo.API.Internals.IServer","namespace":"cAlgo.API.Internals","group":"Application","csharp":"DateTime Time {get;}","python":"api.Server.Time: DateTime","summary":"Returns the server time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The Server Time is: {0}\", Server.Time);\n}","python":"def on_tick(self):\n    api.Print(f\"The Server Time is: {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.IServer.TimeInUtc","kind":"property","name":"TimeInUtc","type":"T:cAlgo.API.Internals.IServer","namespace":"cAlgo.API.Internals","group":"Application","csharp":"DateTime TimeInUtc {get;}","python":"api.Server.TimeInUtc: DateTime","summary":"Returns the server time in UTC.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The Server Time in UTC is: {0}\", Server.TimeInUtc);\n}","python":"def on_tick(self):\n    api.Print(f\"The Server Time in UTC is: {api.Server.TimeInUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/TimeInUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/TimeInUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Internals.IServer.Connected","kind":"event","name":"Connected","type":"T:cAlgo.API.Internals.IServer","namespace":"cAlgo.API.Internals","group":"Application","csharp":"event Action Connected;","python":"api.Server.Connected += handler  # handler()","summary":"Event raised when successfully connected with the server","remarks":null,"parameters":[],"returns":{"csharpType":"Action","pythonType":"Action","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Server.Connected += OnServerConnected;\n}\n\nprivate void OnServerConnected()\n{\n    Print(\"Connection restored at {0}\", Server.Time);\n}","python":"def on_start(self):\n    api.Server.Connected += self.on_server_connected\n\ndef on_server_connected(self):\n    api.Print(f\"Connection restored at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Connected/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Connected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Internals.IServer.Disconnected","kind":"event","name":"Disconnected","type":"T:cAlgo.API.Internals.IServer","namespace":"cAlgo.API.Internals","group":"Application","csharp":"event Action Disconnected;","python":"api.Server.Disconnected += handler  # handler()","summary":"Disconnected - Event raised when connection with the server is lost","remarks":null,"parameters":[],"returns":{"csharpType":"Action","pythonType":"Action","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Server.Disconnected += OnServerDisconnected;\n}\n\nprivate void OnServerDisconnected()\n{\n    Print(\"Connection lost at {0}\", Server.Time);\n}","python":"def on_start(self):\n    api.Server.Disconnected += self.on_server_disconnected\n\ndef on_server_disconnected(self):\n    api.Print(f\"Connection lost at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Disconnected/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/IServer/Disconnected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","kind":"interface","name":"IchimokuKinkoHyo","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface IchimokuKinkoHyo","python":"IchimokuKinkoHyo","summary":"Ichimoku Kinko Hyo Indicator.","remarks":"Ichimoku is a moving average based trend identification system. It contains more data points than standard candlestick charts and thus provides a clearer picture of potential price action.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate IchimokuKinkoHyo ichimokuKinkoHyo;\n//...\nprotected override void OnStart()\n{\n    ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\n}\nprotected override void OnBar()\n{\n    Print(\"ChikouSpan Value = {0}\", ichimokuKinkoHyo.ChikouSpan.LastValue);\n    Print(\"KijunSen Value = {0}\", ichimokuKinkoHyo.KijunSen.LastValue);\n    Print(\"SenkouSpanA Value = {0}\", ichimokuKinkoHyo.SenkouSpanA.LastValue);\n    Print(\"SenkouSpanB Value = {0}\", ichimokuKinkoHyo.SenkouSpanB.LastValue);\n    Print(\"TenkanSen Value = {0}\", ichimokuKinkoHyo.TenkanSen.LastValue);\n\n    //...\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\nimport math\n\nclass Test():\n    def on_start(self):\n        self.ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\n\n    def on_bar(self):\n        api.Print(f\"ChikouSpan Value = {self.ichimokuKinkoHyo.ChikouSpan.LastValue}\")\n        api.Print(f\"KijunSen Value = {self.ichimokuKinkoHyo.KijunSen.LastValue}\")\n        api.Print(f\"SenkouSpanA Value = {self.ichimokuKinkoHyo.SenkouSpanA.LastValue}\")\n        api.Print(f\"SenkouSpanB Value = {self.ichimokuKinkoHyo.SenkouSpanB.LastValue}\")\n        api.Print(f\"TenkanSen Value = {self.ichimokuKinkoHyo.TenkanSen.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Ichimoku Kinko Hyo indicator\n    public partial class IchimokuKinkoHyoSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private IchimokuKinkoHyo _ichimokuKinkoHyo;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _ichimokuKinkoHyo.SenkouSpanB.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (_ichimokuKinkoHyo.TenkanSen.Last(1) > _ichimokuKinkoHyo.KijunSen.Last(1) && _ichimokuKinkoHyo.TenkanSen.Last(2) <= _ichimokuKinkoHyo.KijunSen.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _ichimokuKinkoHyo.SenkouSpanA.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (_ichimokuKinkoHyo.TenkanSen.Last(1) < _ichimokuKinkoHyo.KijunSen.Last(1) && _ichimokuKinkoHyo.TenkanSen.Last(2) >= _ichimokuKinkoHyo.KijunSen.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass IchimokuKinkoHyoSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.ichimokuKinkoHyo.SenkouSpanB.Last(0):\n            self.close_positions(TradeType.Sell)\n            if self.ichimokuKinkoHyo.TenkanSen.Last(0) > self.ichimokuKinkoHyo.KijunSen.Last(0) and self.ichimokuKinkoHyo.TenkanSen.Last(1) <= self.ichimokuKinkoHyo.KijunSen.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.ichimokuKinkoHyo.SenkouSpanA.Last(0):\n            self.close_positions(TradeType.Buy)\n            if self.ichimokuKinkoHyo.TenkanSen.Last(0) < self.ichimokuKinkoHyo.KijunSen.Last(0) and self.ichimokuKinkoHyo.TenkanSen.Last(1) >= self.ichimokuKinkoHyo.KijunSen.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.IchimokuKinkoHyo.ChikouSpan","kind":"property","name":"ChikouSpan","type":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries ChikouSpan {get; set;}","python":"ichimokuKinkoHyo.ChikouSpan: IndicatorDataSeries","summary":"It is used as a support-resistance aid.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\nPrint(\"ChikouSpan Value 26 bars ago = {0}\", ichimokuKinkoHyo.ChikouSpan.Last(26));","python":"ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\napi.Print(f\"ChikouSpan Value 26 bars ago = {ichimokuKinkoHyo.ChikouSpan.Last(26)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/ChikouSpan/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/ChikouSpan/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.IchimokuKinkoHyo.KijunSen","kind":"property","name":"KijunSen","type":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries KijunSen {get; set;}","python":"ichimokuKinkoHyo.KijunSen: IndicatorDataSeries","summary":"This is a confirmation line, a support-resistance line, and can be used as a trailing stop line.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\nPrint(\"KijunSen Value = {0}\", ichimokuKinkoHyo.KijunSen.LastValue);","python":"ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\napi.Print(f\"KijunSen Value = {ichimokuKinkoHyo.KijunSen.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/KijunSen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/KijunSen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.IchimokuKinkoHyo.SenkouSpanA","kind":"property","name":"SenkouSpanA","type":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries SenkouSpanA {get; set;}","python":"ichimokuKinkoHyo.SenkouSpanA: IndicatorDataSeries","summary":"Leading span 1, this line forms one edge of the kumo, or cloud. If the price is above the Senkou span, the top line serves as the first support level while the bottom line serves as the second support level.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\nvar cloudTop = Math.Max(ichimokuKinkoHyo.SenkouSpanA.Last(1), ichimokuKinkoHyo.SenkouSpanB.Last(1));\nif (Bars.ClosePrices.Last(1) > cloudTop)\n    Print(\"Price is above the cloud, SenkouSpanA = {0}\", ichimokuKinkoHyo.SenkouSpanA.Last(1));","python":"ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\ncloudTop = max(ichimokuKinkoHyo.SenkouSpanA.Last(1), ichimokuKinkoHyo.SenkouSpanB.Last(1))\nif api.Bars.ClosePrices.Last(1) > cloudTop:\n    api.Print(f\"Price is above the cloud, SenkouSpanA = {ichimokuKinkoHyo.SenkouSpanA.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/SenkouSpanA/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/SenkouSpanA/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.IchimokuKinkoHyo.SenkouSpanB","kind":"property","name":"SenkouSpanB","type":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries SenkouSpanB {get; set;}","python":"ichimokuKinkoHyo.SenkouSpanB: IndicatorDataSeries","summary":"Leading span 2, this line forms the other edge of the kumo.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\nPrint(\"SenkouSpanB Value = {0}\", ichimokuKinkoHyo.SenkouSpanB.Last(1));","python":"ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\napi.Print(f\"SenkouSpanB Value = {ichimokuKinkoHyo.SenkouSpanB.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/SenkouSpanB/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/SenkouSpanB/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.IchimokuKinkoHyo.TenkanSen","kind":"property","name":"TenkanSen","type":"T:cAlgo.API.Indicators.IchimokuKinkoHyo","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries TenkanSen {get; set;}","python":"ichimokuKinkoHyo.TenkanSen: IndicatorDataSeries","summary":"It is primarily used as a signal line and a minor support-resistance line.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);\nif (ichimokuKinkoHyo.TenkanSen.Last(1) > ichimokuKinkoHyo.KijunSen.Last(1) && ichimokuKinkoHyo.TenkanSen.Last(2) <= ichimokuKinkoHyo.KijunSen.Last(2))\n    Print(\"TenkanSen crossed above KijunSen: {0}\", ichimokuKinkoHyo.TenkanSen.Last(1));","python":"ichimokuKinkoHyo = api.Indicators.IchimokuKinkoHyo(9, 26, 52)\nif ichimokuKinkoHyo.TenkanSen.Last(1) > ichimokuKinkoHyo.KijunSen.Last(1) and ichimokuKinkoHyo.TenkanSen.Last(2) <= ichimokuKinkoHyo.KijunSen.Last(2):\n    api.Print(f\"TenkanSen crossed above KijunSen: {ichimokuKinkoHyo.TenkanSen.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/TenkanSen/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/IchimokuKinkoHyo/TenkanSen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Image","kind":"class","name":"Image","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class Image : ControlBase","python":"Image","summary":"Represents the image chart control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.IO;\n\nnamespace cAlgo\n{\n    public partial class ImageSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            if (!System.IO.File.Exists(ImageFilePath))\n            {\n                Print($\"Image not found: {ImageFilePath}\");\n\n                return;\n            }\n\n            var imageBytes = System.IO.File.ReadAllBytes(ImageFilePath);\n\n            var image = new Image\n            {\n                Source = imageBytes,\n                Width = 200,\n                Height = 200,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            Chart.AddControl(image);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"from System.IO import File\n\nif not File.Exists(api.ImageFilePath):\n    api.Print(f\"Image not found: {api.ImageFilePath}\")\nelse:\n    image = Image()\n    image.Source = File.ReadAllBytes(api.ImageFilePath)\n    image.Width = 200\n    image.Height = 200\n    image.HorizontalAlignment = HorizontalAlignment.Center\n    image.VerticalAlignment = VerticalAlignment.Center\n    api.Chart.AddControl(image)","config":"{\n  \"AccessRights\": \"FullAccess\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"ImageFilePath\",\n      \"DisplayName\": \"Image File Path\",\n      \"Type\": \"String\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    private const string SVG = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\";\n\n    protected override void OnStart()\n    {\n        var svgImage = new Image\n        {\n            Source = new SvgIcon(SVG),\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n        };\n\n        Chart.AddControl(svgImage);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    SVG = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\"\n    def on_start(self):\n        svgImage = Image()\n        svgImage.Source = SvgIcon(self.SVG)\n        svgImage.HorizontalAlignment = HorizontalAlignment.Center\n        svgImage.VerticalAlignment = VerticalAlignment.Center\n\n        api.Chart.AddControl(svgImage)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Image.#ctor","kind":"constructor","name":"Image","type":"T:cAlgo.API.Image","namespace":"cAlgo.API","group":"Controls","csharp":"public Image()","python":"Image()","summary":"Initializes a new instance of the Image class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var image = new Image { Width = 32, Height = 32 };\nimage.Source = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#2F4BFF'/></svg>\");\nChart.AddControl(image);","python":"image = Image()\nimage.Width = 32\nimage.Height = 32\nimage.Source = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#2F4BFF'/></svg>\")\napi.Chart.AddControl(image)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Image.Source","kind":"property","name":"Source","type":"T:cAlgo.API.Image","namespace":"cAlgo.API","group":"Controls","csharp":"public object Source {get; set;}","python":"image.Source: object","summary":"Gets or sets the source of the image.","remarks":"You can set source to Bitmap, bytes array of a bitmap, or SvgIcon","parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>\");\nvar image = new Image { Source = icon, Width = 24, Height = 24 };\nChart.AddControl(image);\nPrint(\"Source type: {0}\", image.Source.GetType().Name);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>\")\nimage = Image()\nimage.Source = icon\nimage.Width = 24\nimage.Height = 24\napi.Chart.AddControl(image)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Source/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Source/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Image.Stretch","kind":"property","name":"Stretch","type":"T:cAlgo.API.Image","namespace":"cAlgo.API","group":"Controls","csharp":"public Stretch Stretch {get; set;}","python":"image.Stretch: Stretch","summary":"Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var image = new Image { Width = 200, Height = 50, Stretch = Stretch.Fill };\nimage.Source = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>\");\nChart.AddControl(image);","python":"image = Image()\nimage.Width = 200\nimage.Height = 50\nimage.Stretch = Stretch.Fill\nimage.Source = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>\")\napi.Chart.AddControl(image)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Image.StretchDirection","kind":"property","name":"StretchDirection","type":"T:cAlgo.API.Image","namespace":"cAlgo.API","group":"Controls","csharp":"public StretchDirection StretchDirection {get; set;}","python":"image.StretchDirection: StretchDirection","summary":"Gets or sets a value that indicates how the image is scaled.","remarks":null,"parameters":[],"returns":{"csharpType":"StretchDirection","pythonType":"StretchDirection","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var image = new Image { Width = 300, Height = 300, StretchDirection = StretchDirection.DownOnly };\nimage.Source = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>\");\nChart.AddControl(image);","python":"image = Image()\nimage.Width = 300\nimage.Height = 300\nimage.StretchDirection = StretchDirection.DownOnly\nimage.Source = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>\")\napi.Chart.AddControl(image)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/StretchDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Image/StretchDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicator","kind":"class","name":"Indicator","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public abstract class Indicator : Algo","python":"Indicator","summary":"Base class for Indicators.","remarks":"Contains all necessary market information, provides access to built-in indicators and provides framework for convenient indicators' creation.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo;\n\npublic partial class MedianPriceAverage : Indicator\n{\n    private SimpleMovingAverage _sma;\n    private IndicatorDataSeries _medianPrices;\n\n    protected override void Initialize()\n    {\n        _medianPrices = CreateDataSeries();\n        _sma = Indicators.SimpleMovingAverage(_medianPrices, Periods);\n    }\n\n    public override void Calculate(int index)\n    {\n        _medianPrices[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;\n        Result[index] = _sma.Result[index];\n\n        if (IsLastBar)\n            Print(\"Last value: {0}\", Result[index]);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\nfrom cAlgo.API import *\n\nclass MedianPriceAverage():\n    def initialize(self):\n        self.medianPrices = api.CreateDataSeries()\n        self.sma = api.Indicators.SimpleMovingAverage(self.medianPrices, api.Periods)\n\n    def calculate(self, index):\n        self.medianPrices[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index]) / 2\n        api.Result[index] = self.sma.Result[index]\n        if api.IsLastBar:\n            api.Print(f\"Last value: {api.Result[index]}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"DodgerBlue\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.AddToChart","kind":"method","name":"AddToChart","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public ChartIndicator AddToChart()","python":"api.AddToChart() -> ChartIndicator","summary":"Adds current indicator to chart if not added yet.","remarks":"If Indicator with same parameter values already added then it will return existing indicator instance.","parameters":[],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"Chart Indicator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\n// HighLowMiddle and HighLowMiddleBot are separate algo projects: the config.json tab is the HighLowMiddle\n// indicator's, and the cBot references the HighLowMiddle project\npublic partial class HighLowMiddle : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;\n    }\n}\n\npublic partial class HighLowMiddleBot : Robot\n{\n    protected override void OnStart()\n    {\n        var indicator = Indicators.GetIndicator<HighLowMiddle>();\n        var chartIndicator = indicator.AddToChart();\n        if (chartIndicator != null)\n            Print(\"Added {0} to the chart\", chartIndicator.Name);\n    }\n}","python":"# The HighLowMiddle indicator project must be referenced by this cBot; the config.json tab is HighLowMiddle's\nindicator = api.GetIndicator(\"HighLowMiddle\")\nchartIndicator = indicator.AddToChart()\nif chartIndicator is not None:\n    api.Print(f\"Added {chartIndicator.Name} to the chart\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/AddToChart/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/AddToChart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.Calculate(System.Int32)","kind":"method","name":"Calculate","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public abstract void Calculate(int index)","python":"api.Calculate(index: int) -> None","summary":"Calculate the value(s) of indicator for the given index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The index of calculated value."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class MedianPriceIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index]) / 2","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Calculate/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Calculate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.CancelPendingOrder(cAlgo.API.PendingOrder)","kind":"method","name":"CancelPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult CancelPendingOrder(PendingOrder pendingOrder)","python":"api.CancelPendingOrder(pendingOrder: PendingOrder) -> TradeResult","summary":"Cancel a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrder(PendingOrders[0]);","python":"api.CancelPendingOrder(api.PendingOrders[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/CancelPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/CancelPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.CancelPendingOrderAsync(cAlgo.API.PendingOrder,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"CancelPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation CancelPendingOrderAsync(PendingOrder pendingOrder, Action<TradeResult> callback)","python":"api.CancelPendingOrderAsync(pendingOrder: PendingOrder, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Cancel a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to cancel"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when pending order is cancelled"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrderAsync(PendingOrders[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.CancelPendingOrderAsync(api.PendingOrders[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/CancelPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/CancelPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePosition(cAlgo.API.Position)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position)","python":"api.ClosePosition(position: Position) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePosition(cAlgo.API.Position,System.Int64)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, long volume)","python":"api.ClosePosition(position: Position, volume: int) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"},{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, double volume)","python":"api.ClosePosition(position: Position, volume: float) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"},{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePositionAsync(cAlgo.API.Position,System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, long volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ClosePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.Initialize","kind":"method","name":"Initialize","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected internal void Initialize()","python":"api.Initialize() -> None","summary":"Custom initialization for the Indicator. This method is invoked when an indicator is launched.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private RelativeStrengthIndex _rsi;\n\nprotected override void Initialize()\n{\n    _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n}\n\npublic override void Calculate(int index)\n{\n    Print(\"RSI: {0}\", _rsi.Result[index]);\n}","python":"def initialize(self):\n    self.rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n\ndef calculate(self, index):\n    api.Print(f\"RSI: {self.rsi.Result[index]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Initialize/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Initialize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"},{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"},{"csharp":"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)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double volume)","python":"api.ModifyPosition(position: Position, volume: float) -> TradeResult","summary":"Modify the volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss price"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit price"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.OnDestroy","kind":"method","name":"OnDestroy","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnDestroy()","python":"api.OnDestroy() -> None","summary":"Called when Indicator is destroyed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnDestroy()\n{\n    Print(\"Indicator destroyed after {0} bars\", Bars.Count);\n}\n\npublic override void Calculate(int index)\n{\n}","python":"def on_destroy(self):\n    api.Print(f\"Indicator destroyed after {api.Bars.Count} bars\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/OnDestroy/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/OnDestroy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 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));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ReversePosition(cAlgo.API.Position)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position)","python":"api.ReversePosition(position: Position) -> TradeResult","summary":"Modify the direction of trade at position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0]);","python":"api.ReversePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ReversePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position, double volume)","python":"api.ReversePosition(position: Position, volume: float) -> TradeResult","summary":"Modify the direction of trade and volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0]);","python":"api.ReversePosition(api.Positions[0])"},{"csharp":"ReversePosition(Positions[0], 10000);","python":"api.ReversePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ReversePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to reverse"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ReversePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ReversePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetBarColor(cAlgo.API.IndicatorBarOutput,System.Int32,cAlgo.API.Color)","kind":"method","name":"SetBarColor","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetBarColor(IndicatorBarOutput barOutput, int barIndex, Color outlineColor)","python":"api.SetBarColor(barOutput: IndicatorBarOutput, barIndex: int, outlineColor: Color) -> None","summary":"Sets appearance of an indicator bar output from startIndex to last index.","remarks":null,"parameters":[{"name":"barOutput","csharpType":"IndicatorBarOutput","pythonType":"IndicatorBarOutput","summary":"Indicator Bar Output"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"},{"name":"outlineColor","csharpType":"Color","pythonType":"Color","summary":"Outline Color"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class ColoredBars : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        var outlineColor = bar.Close >= bar.Open ? Color.Green : Color.Red;\n        SetBarColor(Result.Output, index, outlineColor);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    outlineColor = Color.Green if bar.Close >= bar.Open else Color.Red\n    api.SetBarColor(api.Result.Output, index, outlineColor)","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."}]}
{"id":"M:cAlgo.API.Indicator.SetBarColor(cAlgo.API.IndicatorBarOutput,System.Int32,cAlgo.API.Color,cAlgo.API.Color)","kind":"method","name":"SetBarColor","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetBarColor(IndicatorBarOutput barOutput, int barIndex, Color outlineColor, Color fillColor)","python":"api.SetBarColor(barOutput: IndicatorBarOutput, barIndex: int, outlineColor: Color, fillColor: Color) -> None","summary":"Sets appearance of an indicator bar output from startIndex to startIndex + count.","remarks":null,"parameters":[{"name":"barOutput","csharpType":"IndicatorBarOutput","pythonType":"IndicatorBarOutput","summary":"Indicator Bar Output"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"},{"name":"outlineColor","csharpType":"Color","pythonType":"Color","summary":"Outline Color"},{"name":"fillColor","csharpType":"Color","pythonType":"Color","summary":"Fill Color"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class ColoredBars : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        var color = bar.Close >= bar.Open ? Color.Green : Color.Red;\n        SetBarColor(Result.Output, index, color, Color.FromArgb(80, color));\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    color = Color.Green if bar.Close >= bar.Open else Color.Red\n    api.SetBarColor(api.Result.Output, index, color, Color.FromArgb(80, color))","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."}]}
{"id":"M:cAlgo.API.Indicator.SetBarColor(cAlgo.API.IndicatorBarOutput,System.Int32,cAlgo.API.Color,cAlgo.API.Color,cAlgo.API.Color)","kind":"method","name":"SetBarColor","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetBarColor(IndicatorBarOutput barOutput, int barIndex, Color outlineColor, Color fillColor, Color volumeColor)","python":"api.SetBarColor(barOutput: IndicatorBarOutput, barIndex: int, outlineColor: Color, fillColor: Color, volumeColor: Color) -> None","summary":"Sets appearance of an indicator bar output from startIndex to last index.","remarks":null,"parameters":[{"name":"barOutput","csharpType":"IndicatorBarOutput","pythonType":"IndicatorBarOutput","summary":"Indicator Bar Output"},{"name":"barIndex","csharpType":"int","pythonType":"int","summary":"Bar Index"},{"name":"outlineColor","csharpType":"Color","pythonType":"Color","summary":"Outline Color"},{"name":"fillColor","csharpType":"Color","pythonType":"Color","summary":"Fill Color"},{"name":"volumeColor","csharpType":"Color","pythonType":"Color","summary":"Volume color"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class ColoredBars : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        var color = bar.Close >= bar.Open ? Color.Green : Color.Red;\n        SetBarColor(Result.Output, index, color, Color.FromArgb(80, color), Color.Gray);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    color = Color.Green if bar.Close >= bar.Open else Color.Red\n    api.SetBarColor(api.Result.Output, index, color, Color.FromArgb(80, color), Color.Gray)","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetBarColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException when all colours are null)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,cAlgo.API.Color)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, Color color)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, color: Color) -> None","summary":"Sets appearance of an indicator line output from startIndex to last index.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nvar color = Bars.ClosePrices[index] >= Bars.OpenPrices[index] ? Color.Green : Color.Red;\nSetLineAppearance(Result.LineOutput, index, color);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    color = Color.Green if api.Bars.ClosePrices[index] >= api.Bars.OpenPrices[index] else Color.Red\n    api.SetLineAppearance(api.Result.LineOutput, index, color)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,cAlgo.API.Color,System.Int32)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, Color color, int thickness)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, color: Color, thickness: int) -> None","summary":"Sets appearance of an indicator line output from startIndex to last index.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"Thickness"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nvar color = Bars.ClosePrices[index] >= Bars.OpenPrices[index] ? Color.Green : Color.Red;\nSetLineAppearance(Result.LineOutput, index, color, 3);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    color = Color.Green if api.Bars.ClosePrices[index] >= api.Bars.OpenPrices[index] else Color.Red\n    api.SetLineAppearance(api.Result.LineOutput, index, color, 3)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, Color color, int thickness, LineStyle lineStyle)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, color: Color, thickness: int, lineStyle: LineStyle) -> None","summary":"Sets appearance of an indicator line output from startIndex to last index.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"Thickness"},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"LineStyle"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nif (Bars.ClosePrices[index] < Bars.OpenPrices[index])\n    SetLineAppearance(Result.LineOutput, index, Color.Red, 2, LineStyle.Dots);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    if api.Bars.ClosePrices[index] < api.Bars.OpenPrices[index]:\n        api.SetLineAppearance(api.Result.LineOutput, index, Color.Red, 2, LineStyle.Dots)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,System.Int32,cAlgo.API.Color)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, int count, Color color)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, count: int, color: Color) -> None","summary":"Sets appearance of an indicator line output from startIndex to startIndex + count.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"count","csharpType":"int","pythonType":"int","summary":"Index count"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nif (IsLastBar)\n    SetLineAppearance(Result.LineOutput, Math.Max(0, index - 10), 10, Color.Orange);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    if api.IsLastBar:\n        api.SetLineAppearance(api.Result.LineOutput, max(0, index - 10), 10, Color.Orange)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,System.Int32,cAlgo.API.Color,System.Int32)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, int count, Color color, int thickness)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, count: int, color: Color, thickness: int) -> None","summary":"Sets appearance of an indicator line output from startIndex to startIndex + count.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"count","csharpType":"int","pythonType":"int","summary":"Index count"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"Thickness"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nif (IsLastBar)\n    SetLineAppearance(Result.LineOutput, Math.Max(0, index - 10), 10, Color.Orange, 3);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    if api.IsLastBar:\n        api.SetLineAppearance(api.Result.LineOutput, max(0, index - 10), 10, Color.Orange, 3)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLineOutput,System.Int32,System.Int32,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLineOutput lineOutput, int startIndex, int count, Color color, int thickness, LineStyle lineStyle)","python":"api.SetLineAppearance(lineOutput: IndicatorLineOutput, startIndex: int, count: int, color: Color, thickness: int, lineStyle: LineStyle) -> None","summary":"Sets appearance of an indicator line output from startIndex to startIndex + count.","remarks":null,"parameters":[{"name":"lineOutput","csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"Indicator Line Output"},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":"Start Index"},{"name":"count","csharpType":"int","pythonType":"int","summary":"Index count"},{"name":"color","csharpType":"Color","pythonType":"Color","summary":"Color"},{"name":"thickness","csharpType":"int","pythonType":"int","summary":"Thickness"},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":"LineStyle"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nif (IsLastBar)\n    SetLineAppearance(Result.LineOutput, Math.Max(0, index - 10), 10, Color.Orange, 2, LineStyle.DotsRare);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    if api.IsLastBar:\n        api.SetLineAppearance(api.Result.LineOutput, max(0, index - 10), 10, Color.Orange, 2, LineStyle.DotsRare)","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/SetLineAppearance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."},{"name":"Cloud","support":"None","behaviour":"No effect; arguments are still validated (ArgumentException on bad count or all-null values)."}]}
{"id":"P:cAlgo.API.Indicator.Account","kind":"property","name":"Account","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public IAccount Account {get;}","python":"api.Account: IAccount","summary":"Contains information of the current account.","remarks":null,"parameters":[],"returns":{"csharpType":"IAccount","pythonType":"IAccount","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.Balance < 10000)\n    Print(\"Account balance is low: {0} {1}\", Account.Balance, Account.Asset.Name);","python":"if api.Account.Balance < 10000:\n    api.Print(f\"Account balance is low: {api.Account.Balance} {api.Account.Asset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Account/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Account/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicator.IndicatorArea","kind":"property","name":"IndicatorArea","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public IndicatorArea IndicatorArea {get;}","python":"api.IndicatorArea: IndicatorArea","summary":"Defines the area where the indicator is placed.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorArea","pythonType":"IndicatorArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (IndicatorArea != null)\n{\n    IndicatorArea.DrawHorizontalLine(\"overbought\", 70, Color.Red);\n    IndicatorArea.DrawHorizontalLine(\"oversold\", 30, Color.Green);\n}","python":"if api.IndicatorArea is not None:\n    api.IndicatorArea.DrawHorizontalLine(\"overbought\", 70, Color.Red)\n    api.IndicatorArea.DrawHorizontalLine(\"oversold\", 30, Color.Green)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/IndicatorArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/IndicatorArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicator.IsLastBar","kind":"property","name":"IsLastBar","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public bool IsLastBar {get;}","python":"api.IsLastBar: bool","summary":"Returns true, if Calculate is invoked for the last bar","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (IsLastBar)\n    Print(\"Last bar index {0}, close {1}\", index, Bars.ClosePrices[index]);","python":"def calculate(self, index):\n    if api.IsLastBar:\n        api.Print(f\"Last bar index {index}, close {api.Bars.ClosePrices[index]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/IsLastBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/IsLastBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicator.LastResult","kind":"property","name":"LastResult","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult LastResult {get;}","python":"api.LastResult: TradeResult","summary":"The latest trade result","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (!IsLastBar)\n    return;\nExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\nif (LastResult.IsSuccessful)\n    Print(\"Position opened at {0}\", LastResult.Position.EntryPrice);\nelse\n    Print(\"Order failed: {0}\", LastResult.Error);","python":"def calculate(self, index):\n    if not api.IsLastBar:\n        return\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\n    if api.LastResult.IsSuccessful:\n        api.Print(f\"Position opened at {api.LastResult.Position.EntryPrice}\")\n    else:\n        api.Print(f\"Order failed: {api.LastResult.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/LastResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/LastResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicator.Permissions","kind":"property","name":"Permissions","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public Permissions Permissions {get;}","python":"api.Permissions: Permissions","summary":"Contains all Permissions information","remarks":null,"parameters":[],"returns":{"csharpType":"Permissions","pythonType":"Permissions","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Trading permission: {0}\", Permissions.TradingPermission);\nPrint(\"Clipboard permission: {0}\", Permissions.ClipboardPermission);","python":"api.Print(f\"Trading permission: {api.Permissions.TradingPermission}\")\napi.Print(f\"Clipboard permission: {api.Permissions.ClipboardPermission}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Permissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/Permissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,cAlgo.API.Color)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, Color color)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, color: Color) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,cAlgo.API.Color,System.Int32)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, Color color, int thickness)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, color: Color, thickness: int) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""},{"name":"thickness","csharpType":"int","pythonType":"int","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, Color color, int thickness, LineStyle lineStyle)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, color: Color, thickness: int, lineStyle: LineStyle) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""},{"name":"thickness","csharpType":"int","pythonType":"int","summary":""},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,System.Int32,cAlgo.API.Color)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, int count, Color color)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, count: int, color: Color) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"count","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,System.Int32,cAlgo.API.Color,System.Int32)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, int count, Color color, int thickness)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, count: int, color: Color, thickness: int) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"count","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""},{"name":"thickness","csharpType":"int","pythonType":"int","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.SetLineAppearance(cAlgo.API.IndicatorLine,System.Int32,System.Int32,cAlgo.API.Color,System.Int32,cAlgo.API.LineStyle)","kind":"method","name":"SetLineAppearance","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"protected void SetLineAppearance(IndicatorLine line, int startIndex, int count, Color color, int thickness, LineStyle lineStyle)","python":"api.SetLineAppearance(line: IndicatorLine, startIndex: int, count: int, color: Color, thickness: int, lineStyle: LineStyle) -> None","summary":"","remarks":null,"parameters":[{"name":"line","csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":""},{"name":"startIndex","csharpType":"int","pythonType":"int","summary":""},{"name":"count","csharpType":"int","pythonType":"int","summary":""},{"name":"color","csharpType":"Color","pythonType":"Color","summary":""},{"name":"thickness","csharpType":"int","pythonType":"int","summary":""},{"name":"lineStyle","csharpType":"LineStyle","pythonType":"LineStyle","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Use overload with IndicatorLineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Indicator.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicator.IsRealTime","kind":"property","name":"IsRealTime","type":"T:cAlgo.API.Indicator","namespace":"cAlgo.API","group":"General","csharp":"public bool IsRealTime {get;}","python":"api.IsRealTime: bool","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use IsLastBar property instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorArea","kind":"interface","name":"IndicatorArea","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public interface IndicatorArea","python":"IndicatorArea","summary":"Represents the area where the Indicator is placed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use IndicatorArea\n    public partial class IndicatorAreaSample : Indicator\n    {\n        private TextBlock _indicatorAreaNumberTextBlock;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(1, 2)\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n                Width = 200\n            };\n\n            grid.AddChild(new TextBlock { Text = \"Indicator Area #\", Margin = 5, FontWeight = FontWeight.ExtraBold, ForegroundColor = Color.Black }, 0, 0);\n\n            _indicatorAreaNumberTextBlock = new TextBlock\n            {\n                Margin = 5,\n                Text = Chart.IndicatorAreas.Count.ToString(),\n                FontWeight = FontWeight.ExtraBold,\n                ForegroundColor = Color.Black\n            };\n\n            grid.AddChild(_indicatorAreaNumberTextBlock, 0, 1);\n\n            IndicatorArea.AddControl(grid);\n\n            Chart.IndicatorAreaAdded += Chart_IndicatorAreaAdded;\n            Chart.IndicatorAreaRemoved += Chart_IndicatorAreaRemoved;\n        }\n\n        private void Chart_IndicatorAreaRemoved(IndicatorAreaRemovedEventArgs obj)\n        {\n            _indicatorAreaNumberTextBlock.Text = Chart.IndicatorAreas.Count.ToString();\n        }\n\n        private void Chart_IndicatorAreaAdded(IndicatorAreaAddedEventArgs obj)\n        {\n            _indicatorAreaNumberTextBlock.Text = Chart.IndicatorAreas.Count.ToString();\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Margin = Thickness(5)\n        textBlock.Text = text\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Black\n        return textBlock\n\n    def update_indicators_area_count(self):\n        self.indicatorAreaNumberTextBlock.Text = str(api.Chart.IndicatorAreas.Count)\n\n    def initialize(self):\n        grid = Grid(1, 2)\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.7\n        grid.Width = 200\n\n        grid.AddChild(self.get_text_block(\"Indicator Area #\"), 0, 0)\n\n        self.indicatorAreaNumberTextBlock = self.get_text_block(str(api.Chart.IndicatorAreas.Count))\n\n        grid.AddChild(self.indicatorAreaNumberTextBlock, 0, 1)\n\n        api.IndicatorArea.AddControl(grid)\n\n        api.Chart.IndicatorAreaAdded += lambda _: self.update_indicators_area_count()\n        api.Chart.IndicatorAreaRemoved += lambda _: self.update_indicators_area_count()","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/IndicatorArea/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/IndicatorArea/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorAreaAddedEventArgs","kind":"class","name":"IndicatorAreaAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class IndicatorAreaAddedEventArgs : IndicatorAreaEventArgs","python":"IndicatorAreaAddedEventArgs","summary":"Provides data for the indicator area adding event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the IndicatorAreaAddedEventArgs\n    public partial class IndicatorAreaAddedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            ShowIndicatorAreasCount();\n\n            Chart.IndicatorAreaAdded += Chart_IndicatorAreaAdded;\n        }\n\n        private void Chart_IndicatorAreaAdded(IndicatorAreaAddedEventArgs obj)\n        {\n            Print(\"A new indicator area has been added\");\n\n            ShowIndicatorAreasCount();\n        }\n\n        private void ShowIndicatorAreasCount()\n        {\n            var text = string.Format(\"Indicator Areas #: {0}\", Chart.IndicatorAreas.Count);\n\n            Chart.DrawStaticText(\"text\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.show_indicator_areas_count()\n        api.Chart.IndicatorAreaAdded += self.on_chart_indicator_area_added\n\n    def on_chart_indicator_area_added(self, args):\n        print(\"A new indicator area has been added\")\n        self.show_indicator_areas_count()\n\n    def show_indicator_areas_count(self):\n        api.Chart.DrawStaticText(\"text\", f\"Indicator Areas #: {api.Chart.IndicatorAreas.Count}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorAreaEventArgs","kind":"class","name":"IndicatorAreaEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public abstract class IndicatorAreaEventArgs","python":"IndicatorAreaEventArgs","summary":"The arguments for the indicator area event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the IndicatorAreaEventArgs\n    // IndicatorAreaEventArgs is the base class of IndicatorAreaAddedEventArgs and IndicatorAreaRemovedEventArgs\n    public partial class IndicatorAreaEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.IndicatorAreaAdded += Chart_IndicatorAreaAdded;\n            Chart.IndicatorAreaRemoved += Chart_IndicatorAreaRemoved;\n        }\n\n        private void Chart_IndicatorAreaRemoved(IndicatorAreaRemovedEventArgs obj)\n        {\n            var indicatorAreaEventArgs = obj as IndicatorAreaEventArgs;\n        }\n\n        private void Chart_IndicatorAreaAdded(IndicatorAreaAddedEventArgs obj)\n        {\n            var indicatorAreaEventArgs = obj as IndicatorAreaEventArgs;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Chart.IndicatorAreaAdded += self.on_chart_indicator_area_added\n        api.Chart.IndicatorAreaRemoved += self.on_chart_indicator_area_removed\n\n    def on_chart_indicator_area_added(self, args):\n        print(f\"Indicator area added\")\n\n    def on_chart_indicator_area_removed(self, args):\n        print(f\"Indicator area removed\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAreaEventArgs.Area","kind":"property","name":"Area","type":"T:cAlgo.API.IndicatorAreaEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public IndicatorArea Area {get;}","python":"indicatorAreaEventArgs.Area: IndicatorArea","summary":"Gets the area.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorArea","pythonType":"IndicatorArea","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.IndicatorAreaAdded += OnIndicatorAreaAdded;\n}\n\nprivate void OnIndicatorAreaAdded(IndicatorAreaAddedEventArgs args)\n{\n    args.Area.DrawStaticText(\"areaInfo\", \"New indicator area\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray);\n}","python":"def on_start(self):\n    api.Chart.IndicatorAreaAdded += self.on_indicator_area_added\n\ndef on_indicator_area_added(self, args):\n    args.Area.DrawStaticText(\"areaInfo\", \"New indicator area\", VerticalAlignment.Top, HorizontalAlignment.Left, Color.Gray)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/Area/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/Area/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAreaEventArgs.Chart","kind":"property","name":"Chart","type":"T:cAlgo.API.IndicatorAreaEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Chart Chart {get;}","python":"indicatorAreaEventArgs.Chart: Chart","summary":"Gets the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Chart","pythonType":"Chart","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Chart.IndicatorAreaAdded += OnIndicatorAreaAdded;\n}\n\nprivate void OnIndicatorAreaAdded(IndicatorAreaAddedEventArgs args)\n{\n    Print(\"Chart {0} now has {1} indicator areas\", args.Chart.SymbolName, args.Chart.IndicatorAreas.Count);\n}","python":"def on_start(self):\n    api.Chart.IndicatorAreaAdded += self.on_indicator_area_added\n\ndef on_indicator_area_added(self, args):\n    api.Print(f\"Chart {args.Chart.SymbolName} now has {args.Chart.IndicatorAreas.Count} indicator areas\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/Chart/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaEventArgs/Chart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorAreaRemovedEventArgs","kind":"class","name":"IndicatorAreaRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class IndicatorAreaRemovedEventArgs : IndicatorAreaEventArgs","python":"IndicatorAreaRemovedEventArgs","summary":"Provides data for the indicator area removing event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the IndicatorAreaRemovedEventArgs\n    public partial class IndicatorAreaRemovedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            ShowIndicatorAreasCount();\n\n            Chart.IndicatorAreaRemoved += Chart_IndicatorAreaRemoved;\n        }\n\n        private void Chart_IndicatorAreaRemoved(IndicatorAreaRemovedEventArgs obj)\n        {\n            Print(\"An indicator area has been removed\");\n\n            ShowIndicatorAreasCount();\n        }\n\n        private void ShowIndicatorAreasCount()\n        {\n            var text = string.Format(\"Indicator Areas #: {0}\", Chart.IndicatorAreas.Count);\n\n            Chart.DrawStaticText(\"text\", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.show_indicator_areas_count()\n        api.Chart.IndicatorAreaRemoved += self.on_chart_indicator_area_removed\n\n    def on_chart_indicator_area_removed(self, args):\n        print(\"A new indicator area has been removed\")\n        self.show_indicator_areas_count()\n\n    def show_indicator_areas_count(self):\n        api.Chart.DrawStaticText(\"text\", f\"Indicator Areas #: {api.Chart.IndicatorAreas.Count}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/IndicatorAreaRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorAttribute","kind":"class","name":"IndicatorAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class IndicatorAttribute : Attribute","python":"IndicatorAttribute","summary":"Indicator Attribute. Applies metadata to enable the indicator plot.","remarks":"To make it effective apply enclosed in square brackets, e.g. [Indicator] before the indicator class declaration. Cannot be omitted.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Indicators\n{\n    public partial class SampleIndicator : Indicator\n    {\n        public override void Calculate(int index)\n        {\n            Result[index] = Bars.ClosePrices[index] - Bars.OpenPrices[index];\n        }\n    }\n}","python":"class SampleIndicator():\n    def calculate(self, index):\n        api.Result[index] = api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"ScalePrecision\": 5,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.IndicatorAttribute.#ctor","kind":"constructor","name":"IndicatorAttribute","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public IndicatorAttribute()","python":"IndicatorAttribute()","summary":"Initializes a new instance of the IndicatorAttribute","remarks":"To make it effective apply enclosed in square brackets, e.g. [Indicator] before the indicator class declaration. The name is displayed on the top left of the indicator panel.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.AccessRights","kind":"property","name":"AccessRights","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public AccessRights AccessRights {get; set;}","python":"indicatorAttribute.AccessRights: AccessRights","summary":"Gets or sets the access rights required for Indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleIndicator : Indicator\n{\n    protected override void Initialize()\n    {\n        Print(\"Indicator with full access rights initialized\");\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"def initialize(self):\n    api.Print(\"Indicator with full access rights initialized\")","config":"{\n  \"AccessRights\": \"FullAccess\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.AdditionalInfoUrl","kind":"property","name":"AdditionalInfoUrl","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string AdditionalInfoUrl {get; set;}","python":"indicatorAttribute.AdditionalInfoUrl: str","summary":"Gets or sets additional info url.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class AdditionalInfoUrlExampleIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n    }\n}","python":"def calculate(self, index):\n    pass","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"AdditionalInfoUrl\": \"https://ctrader.com/\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AdditionalInfoUrl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AdditionalInfoUrl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.AutoRescale","kind":"property","name":"AutoRescale","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool AutoRescale {get; set;}","python":"indicatorAttribute.AutoRescale: bool","summary":"Indicates whether this instance automatically rescales the chart or not. Default value is true.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.HighPrices[index] + 50 * Symbol.PipSize;\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.HighPrices[index] + 50 * api.Symbol.PipSize","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"AutoRescale\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AutoRescale/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/AutoRescale/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.IsOverlay","kind":"property","name":"IsOverlay","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsOverlay {get; set;}","python":"indicatorAttribute.IsOverlay: bool","summary":"Indicates whether this instance is overlayed on the chart or plotted on a separate indicator panel","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"The IsOverlay property sets the value true if this Indicator should be plotted on the chart panel; false if the indicator should be plotted on a separate Indicator Panel","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class MedianPriceSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Median[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;\n    }\n}","python":"def calculate(self, index):\n    api.Median[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index]) / 2","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Median\",\n      \"Color\": \"Orange\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/IsOverlay/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/IsOverlay/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.IsPercentage","kind":"property","name":"IsPercentage","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsPercentage {get; set;}","python":"indicatorAttribute.IsPercentage: bool","summary":"Gets or sets whether the indicator is a percentage indicator. If one or more percentage indicators are added to the same panel, they will share the same scale. The default value is false .","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class PercentageChangeSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = (Bars.ClosePrices[index] - Bars.OpenPrices[index]) / Bars.OpenPrices[index] * 100;\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = (api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]) / api.Bars.OpenPrices[index] * 100","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"IsPercentage\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Change %\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/IsPercentage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/IsPercentage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.Name","kind":"property","name":"Name","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Name {get;}","python":"indicatorAttribute.Name: str","summary":"The name of the Indicator.","remarks":"The name is displayed to the left of the indicator panel.","parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NameSample : Indicator\n{\n    protected override void Initialize()\n    {\n        var attribute = (IndicatorAttribute)Attribute.GetCustomAttribute(GetType(), typeof(IndicatorAttribute));\n        Print(\"Indicator name: {0}\", attribute.Name ?? GetType().Name);\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"def initialize(self):\n    api.Print(\"Indicator initialized\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.ScalePrecision","kind":"property","name":"ScalePrecision","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public int ScalePrecision {get; set;}","python":"indicatorAttribute.ScalePrecision: int","summary":"The price scale precision.","remarks":"The number of decimals displayed on the price scale of the indicator panel","parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleIndicator : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index] - Bars.OpenPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"ScalePrecision\": 5,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/ScalePrecision/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/ScalePrecision/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorAttribute.TimeZone","kind":"property","name":"TimeZone","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string TimeZone {get; set;}","python":"indicatorAttribute.TimeZone: str","summary":"Gets or sets the chart timezone of the displayed indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleIndicator : Indicator\n{\n    protected override void Initialize()\n    {\n        Print(\"Indicator time zone: {0}, last bar opened at {1}\", TimeZone.DisplayName, Bars.LastBar.OpenTime);\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"def initialize(self):\n    api.Print(f\"Indicator time zone: {api.TimeZone.DisplayName}, last bar opened at {api.Bars.LastBar.OpenTime}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Eastern Standard Time\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/TimeZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/TimeZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.IndicatorAttribute.#ctor(System.String)","kind":"constructor","name":"IndicatorAttribute","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public IndicatorAttribute(string name)","python":"IndicatorAttribute(name: str)","summary":"","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.IndicatorAttribute.UnspecifiedScalePrecision","kind":"field","name":"UnspecifiedScalePrecision","type":"T:cAlgo.API.IndicatorAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public static int UnspecifiedScalePrecision;","python":"IndicatorAttribute.UnspecifiedScalePrecision: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorBarOutput","kind":"interface","name":"IndicatorBarOutput","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public interface IndicatorBarOutput","python":"IndicatorBarOutput","summary":"The interface representing an indicator bars output. Provides properties that allow for accessing various information about a bars output.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartIndicator in ChartIndicators)\n       {\n            Print($\"Name: {chartIndicator.Name} | | Bar Outputs #: {chartIndicator.BarOutputs.Count}\");\n\n            foreach (var barOutput in chartIndicator.BarOutputs)\n            {\n                Print($\"Name: {barOutput.Name}\");\n            }\n       }\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartIndicator in api.ChartIndicators:\n            print(f\"Name: {chartIndicator.Name} | | Bar Outputs #: {chartIndicator.BarOutputs.Count}\")\n            for barOutput in chartIndicator.BarOutputs:\n                print(f\"Name: {barOutput.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.AreaChartFillColor","kind":"property","name":"AreaChartFillColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color AreaChartFillColor {get; set;}","python":"indicatorBarOutput.AreaChartFillColor: Color","summary":"Gets or sets the color of the area chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.AreaChartFillColor = Color.FromArgb(80, Color.SteelBlue);\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.AreaChartFillColor = Color.FromArgb(80, Color.SteelBlue)\n        api.Print(f\"{barOutput.Name} area fill: {barOutput.AreaChartFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/AreaChartFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/AreaChartFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.BearFillColor","kind":"property","name":"BearFillColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color BearFillColor {get; set;}","python":"indicatorBarOutput.BearFillColor: Color","summary":"Gets or sets the color of the bear candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.BearFillColor = Color.OrangeRed;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.BearFillColor = Color.OrangeRed\n        api.Print(f\"{barOutput.Name} bear fill: {barOutput.BearFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BearFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BearFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.BearOutlineColor","kind":"property","name":"BearOutlineColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color BearOutlineColor {get; set;}","python":"indicatorBarOutput.BearOutlineColor: Color","summary":"Gets or sets the color of the bear candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.BearOutlineColor = Color.Red;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.BearOutlineColor = Color.Red\n        api.Print(f\"{barOutput.Name} bear outline: {barOutput.BearOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BearOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BearOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.BullFillColor","kind":"property","name":"BullFillColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color BullFillColor {get; set;}","python":"indicatorBarOutput.BullFillColor: Color","summary":"Gets or sets the color of the bull candle fill.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.BullFillColor = Color.LimeGreen;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.BullFillColor = Color.LimeGreen\n        api.Print(f\"{barOutput.Name} bull fill: {barOutput.BullFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BullFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BullFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.BullOutlineColor","kind":"property","name":"BullOutlineColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color BullOutlineColor {get; set;}","python":"indicatorBarOutput.BullOutlineColor: Color","summary":"Gets or sets the color of the bull candle or bar outline.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.BullOutlineColor = Color.Green;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.BullOutlineColor = Color.Green\n        api.Print(f\"{barOutput.Name} bull outline: {barOutput.BullOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BullOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/BullOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.ChartType","kind":"property","name":"ChartType","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"ChartType ChartType {get; set;}","python":"indicatorBarOutput.ChartType: ChartType","summary":"Gets or sets the type of the chart - Bar, Candlesticks, Line or Dots chart.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.ChartType = ChartType.Candlesticks;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.ChartType = ChartType.Candlesticks\n        api.Print(f\"{barOutput.Name} chart type: {barOutput.ChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/ChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/ChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.DotChartColor","kind":"property","name":"DotChartColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color DotChartColor {get; set;}","python":"indicatorBarOutput.DotChartColor: Color","summary":"Gets or sets the color of the dot chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.DotChartColor = Color.Gold;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.DotChartColor = Color.Gold\n        api.Print(f\"{barOutput.Name} dot color: {barOutput.DotChartColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/DotChartColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/DotChartColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"bool IsVisible {get; set;}","python":"indicatorBarOutput.IsVisible: bool","summary":"Gets or sets the visibility of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.IsVisible = false;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.IsVisible = False\n        api.Print(f\"{barOutput.Name} visible: {barOutput.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.Name","kind":"property","name":"Name","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"string Name {get;}","python":"indicatorBarOutput.Name: str","summary":"Gets the name of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        Print(\"{0} bar output name: {1}\", indicator.Name, barOutput.Name);\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        api.Print(f\"{indicator.Name} bar output name: {barOutput.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBarOutput.TickVolumeColor","kind":"property","name":"TickVolumeColor","type":"T:cAlgo.API.IndicatorBarOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color TickVolumeColor {get; set;}","python":"indicatorBarOutput.TickVolumeColor: Color","summary":"Gets or sets the color of the tick volume bars.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var barOutput in indicator.BarOutputs)\n        barOutput.TickVolumeColor = Color.Gray;\n}","python":"for indicator in api.ChartIndicators:\n    for barOutput in indicator.BarOutputs:\n        barOutput.TickVolumeColor = Color.Gray\n        api.Print(f\"{barOutput.Name} tick volume color: {barOutput.TickVolumeColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/TickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorBarOutput/TickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorBars","kind":"interface","name":"IndicatorBars","type":null,"namespace":"cAlgo.API","group":"Data Series","csharp":"public interface IndicatorBars","python":"IndicatorBars","summary":"The interface representing an indicator bars that are displayed as an output.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class HeikinAshiBars : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        var close = (bar.Open + bar.High + bar.Low + bar.Close) / 4;\n        var open = index == 0 ? bar.Open : (Result.OpenPrices[index - 1] + Result.ClosePrices[index - 1]) / 2;\n        var high = Math.Max(bar.High, Math.Max(open, close));\n        var low = Math.Min(bar.Low, Math.Min(open, close));\n        Result[index] = new OhlcvBar(open, high, low, close, bar.TickVolume);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    closePrice = (bar.Open + bar.High + bar.Low + bar.Close) / 4\n    openPrice = bar.Open if index == 0 else (api.Result.OpenPrices[index - 1] + api.Result.ClosePrices[index - 1]) / 2\n    highPrice = max(bar.High, openPrice, closePrice)\n    lowPrice = min(bar.Low, openPrice, closePrice)\n    api.Result[index] = OhlcvBar(openPrice, highPrice, lowPrice, closePrice, bar.TickVolume)","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Heikin Ashi\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.ClosePrices","kind":"property","name":"ClosePrices","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"DataSeries ClosePrices {get;}","python":"indicatorBars.ClosePrices: DataSeries","summary":"Gets the Close price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Last output close price: {0}\", Result.ClosePrices.LastValue);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Last output close price: {api.Result.ClosePrices.LastValue}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/ClosePrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/ClosePrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.Count","kind":"property","name":"Count","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"int Count {get;}","python":"indicatorBars.Count: int","summary":"Gets the number of bars.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Output bars count: {0}\", Result.Count);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Output bars count: {api.Result.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.HighPrices","kind":"property","name":"HighPrices","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"DataSeries HighPrices {get;}","python":"indicatorBars.HighPrices: DataSeries","summary":"Gets the High price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Highest output high of 20 bars: {0}\", Result.HighPrices.Maximum(20));\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Highest output high of 20 bars: {Functions.Maximum(api.Result.HighPrices, 20)}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/HighPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/HighPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"OhlcvBar Item {get; set;}","python":"indicatorBars[index: int] -> OhlcvBar","summary":"Gets or sets a bar based on it is index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The bar index"}],"returns":{"csharpType":"OhlcvBar","pythonType":"OhlcvBar","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Last output bar: {0}\", Result[index]);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Last output bar: {api.Result[index]}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.LowPrices","kind":"property","name":"LowPrices","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"DataSeries LowPrices {get;}","python":"indicatorBars.LowPrices: DataSeries","summary":"Gets the Low price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Lowest output low of 20 bars: {0}\", Result.LowPrices.Minimum(20));\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Lowest output low of 20 bars: {Functions.Minimum(api.Result.LowPrices, 20)}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/LowPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/LowPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.OpenPrices","kind":"property","name":"OpenPrices","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"DataSeries OpenPrices {get;}","python":"indicatorBars.OpenPrices: DataSeries","summary":"Gets the Open price bars data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Last output open price: {0}\", Result.OpenPrices.LastValue);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Last output open price: {api.Result.OpenPrices.LastValue}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/OpenPrices/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/OpenPrices/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.Output","kind":"property","name":"Output","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"IndicatorBarOutput Output {get;}","python":"indicatorBars.Output: IndicatorBarOutput","summary":"Gets the indicator output.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorBarOutput","pythonType":"IndicatorBarOutput","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Bar output {0}, chart type {1}\", Result.Output.Name, Result.Output.ChartType);\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Bar output {api.Result.Output.Name}, chart type {api.Result.Output.ChartType}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Output/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/Output/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorBars.TickVolumes","kind":"property","name":"TickVolumes","type":"T:cAlgo.API.IndicatorBars","namespace":"cAlgo.API","group":"Data Series","csharp":"DataSeries TickVolumes {get;}","python":"indicatorBars.TickVolumes: DataSeries","summary":"Gets the Tick volumes data.","remarks":null,"parameters":[],"returns":{"csharpType":"DataSeries","pythonType":"DataSeries","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class BarsCopy : Indicator\n{\n    public override void Calculate(int index)\n    {\n        var bar = Bars[index];\n        Result[index] = new OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume);\n        if (IsLastBar)\n            Print(\"Tick volume of the last 10 output bars: {0}\", Result.TickVolumes.Sum(10));\n    }\n}","python":"def calculate(self, index):\n    bar = api.Bars[index]\n    api.Result[index] = OhlcvBar(bar.Open, bar.High, bar.Low, bar.Close, bar.TickVolume)\n    if api.IsLastBar:\n        api.Print(f\"Tick volume of the last 10 output bars: {Functions.Sum(api.Result.TickVolumes, 10)}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"BarOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/TickVolumes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorBars/TickVolumes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorDataSeries","kind":"interface","name":"IndicatorDataSeries","type":null,"namespace":"cAlgo.API","group":"Data Series","csharp":"public interface IndicatorDataSeries","python":"IndicatorDataSeries","summary":"Represents a mutable array of values. An extension of DataSeries used to represent indicator values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class MedianPriceSma : Indicator\n{\n    private IndicatorDataSeries _medianPrices;\n    private SimpleMovingAverage _sma;\n\n    protected override void Initialize()\n    {\n        // A data series that is not an output in config.json must be created with CreateDataSeries\n        _medianPrices = CreateDataSeries();\n        _sma = Indicators.SimpleMovingAverage(_medianPrices, 14);\n    }\n\n    public override void Calculate(int index)\n    {\n        _medianPrices[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;\n        Result[index] = _sma.Result[index];\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass MedianPriceSma():\n    def initialize(self):\n        self.medianPrices = api.CreateDataSeries()\n        self.sma = api.Indicators.SimpleMovingAverage(self.medianPrices, 14)\n\n    def calculate(self, index):\n        self.medianPrices[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index]) / 2\n        api.Result[index] = self.sma.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"Orange\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorDataSeries.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.IndicatorDataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"double Item {get; set;}","python":"indicatorDataSeries[index: int] -> float","summary":"Gets or sets the value at the specified index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class BarRange : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.HighPrices[index] - Bars.LowPrices[index];\n\n        if (index > 0 && Result[index] > Result[index - 1] * 2)\n            Print(\"Bar range doubled at index {0}\", index);\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.HighPrices[index] - api.Bars.LowPrices[index]\n    if index > 0 and api.Result[index] > api.Result[index - 1] * 2:\n        api.Print(f\"Bar range doubled at index {index}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorDataSeries.LineOutput","kind":"property","name":"LineOutput","type":"T:cAlgo.API.IndicatorDataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"IndicatorLineOutput LineOutput {get;}","python":"indicatorDataSeries.LineOutput: IndicatorLineOutput","summary":"Gets the indicator line output.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorLineOutput","pythonType":"IndicatorLineOutput","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Result[index] = Bars.ClosePrices[index];\nif (IsLastBar)\n    Print(\"Line output {0}, color {1}, thickness {2}\", Result.LineOutput.Name, Result.LineOutput.Color, Result.LineOutput.Thickness);","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    if api.IsLastBar:\n        api.Print(f\"Line output {api.Result.LineOutput.Name}, color {api.Result.LineOutput.Color}, thickness {api.Result.LineOutput.Thickness}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/LineOutput/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/LineOutput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorDataSeries.Line","kind":"property","name":"Line","type":"T:cAlgo.API.IndicatorDataSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"IndicatorLine Line {get;}","python":"indicatorDataSeries.Line: IndicatorLine","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorLine","pythonType":"IndicatorLine","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use LineOutput instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorLineOutput","kind":"interface","name":"IndicatorLineOutput","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public interface IndicatorLineOutput","python":"IndicatorLineOutput","summary":"The interface representing an indicator line. Provides properties that allow for accessing various information about a line.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartIndicator in ChartIndicators)\n       {\n            Print($\"Name: {chartIndicator.Name} | | Line Outputs #: {chartIndicator.LineOutputs.Count}\");\n\n            foreach (var lineOutput in chartIndicator.LineOutputs)\n            {\n                Print($\"Name: {lineOutput.Name}\");\n            }\n       }\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartIndicator in api.ChartIndicators:\n            print(f\"Name: {chartIndicator.Name} | | Line Outputs #: {chartIndicator.LineOutputs.Count}\")\n            for lineOutput in chartIndicator.LineOutputs:\n                print(f\"Name: {lineOutput.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.Color","kind":"property","name":"Color","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"Color Color {get; set;}","python":"indicatorLineOutput.Color: Color","summary":"Gets or sets the Color of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar line = sma.LineOutputs[0];\nline.Color = Color.Orange;\nPrint(\"{0} line color: {1}\", line.Name, line.Color);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nline = sma.LineOutputs[0]\nline.Color = Color.Orange\napi.Print(f\"{line.Name} line color: {line.Color}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Color/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Color/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"bool IsVisible {get; set;}","python":"indicatorLineOutput.IsVisible: bool","summary":"Gets or sets the visibility of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bands = ChartIndicators.Add(\"Bollinger Bands\", Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nforeach (var lineOutput in bands.LineOutputs)\n    lineOutput.IsVisible = lineOutput.Name != \"Main\";\nPrint(\"Bollinger Bands main line hidden\");","python":"bands = api.ChartIndicators.Add(\"Bollinger Bands\", api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nfor lineOutput in bands.LineOutputs:\n    lineOutput.IsVisible = lineOutput.Name != \"Main\"\napi.Print(\"Bollinger Bands main line hidden\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"LineStyle LineStyle {get; set;}","python":"indicatorLineOutput.LineStyle: LineStyle","summary":"Gets or sets the LineStyle of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar line = sma.LineOutputs[0];\nline.LineStyle = LineStyle.Dots;\nPrint(\"{0} line style: {1}\", line.Name, line.LineStyle);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nline = sma.LineOutputs[0]\nline.LineStyle = LineStyle.Dots\napi.Print(f\"{line.Name} line style: {line.LineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.Name","kind":"property","name":"Name","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"string Name {get;}","python":"indicatorLineOutput.Name: str","summary":"Gets the name of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bands = ChartIndicators.Add(\"Bollinger Bands\", Bars.ClosePrices, 20, 2, MovingAverageType.Simple);\nforeach (var lineOutput in bands.LineOutputs)\n    Print(\"Line output name: {0}\", lineOutput.Name);","python":"bands = api.ChartIndicators.Add(\"Bollinger Bands\", api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)\nfor lineOutput in bands.LineOutputs:\n    api.Print(f\"Line output name: {lineOutput.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.PlotType","kind":"property","name":"PlotType","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"PlotType PlotType {get;}","python":"indicatorLineOutput.PlotType: PlotType","summary":"Gets the PlotType of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var lineOutput in indicator.LineOutputs)\n        Print(\"{0}.{1} plot type: {2}\", indicator.Name, lineOutput.Name, lineOutput.PlotType);\n}","python":"for indicator in api.ChartIndicators:\n    for lineOutput in indicator.LineOutputs:\n        api.Print(f\"{indicator.Name}.{lineOutput.Name} plot type: {lineOutput.PlotType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.StickToBottom","kind":"property","name":"StickToBottom","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"bool StickToBottom {get; set;}","python":"indicatorLineOutput.StickToBottom: bool","summary":"Gets or sets whether line should stick to bottom of it's panel or not similar to Tick Volume (Default: false).","remarks":"StickToBottom works only if PlotType is Histogram.","parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicator in ChartIndicators)\n{\n    foreach (var lineOutput in indicator.LineOutputs)\n    {\n        if (lineOutput.PlotType == PlotType.Histogram)\n            lineOutput.StickToBottom = true;\n    }\n}","python":"for indicator in api.ChartIndicators:\n    for lineOutput in indicator.LineOutputs:\n        if lineOutput.PlotType == PlotType.Histogram:\n            lineOutput.StickToBottom = True\n            api.Print(f\"{lineOutput.Name} sticks to bottom: {lineOutput.StickToBottom}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/StickToBottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/StickToBottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorLineOutput.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.IndicatorLineOutput","namespace":"cAlgo.API","group":"Indicators","csharp":"float Thickness {get; set;}","python":"indicatorLineOutput.Thickness: float","summary":"Gets or sets the thickness of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"float","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var sma = ChartIndicators.Add(\"Simple Moving Average\", Bars.ClosePrices, 20);\nvar line = sma.LineOutputs[0];\nline.Thickness = 2;\nPrint(\"{0} line thickness: {1}\", line.Name, line.Thickness);","python":"sma = api.ChartIndicators.Add(\"Simple Moving Average\", api.Bars.ClosePrices, 20)\nline = sma.LineOutputs[0]\nline.Thickness = 2\napi.Print(f\"{line.Name} line thickness: {line.Thickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Indicators/IndicatorLineOutput/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorType","kind":"interface","name":"IndicatorType","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface IndicatorType","python":"IndicatorType","summary":"Represents an indicator algorithm type.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is IndicatorType smaIndicatorType)\n            Print($\"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n        if indicatorType is not None:\n            smaIndicatorType = IndicatorType(indicatorType)\n            print(f\"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorType.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.IndicatorType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<IndicatorTypeBarOutput> Bars {get;}","python":"indicatorType.Bars: IReadonlyList[IndicatorTypeBarOutput]","summary":"Gets collection of indicator bar outputs.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorTypeBarOutput>","pythonType":"IReadonlyList[IndicatorTypeBarOutput]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bar output: {1}\", indicatorType.Name, barOutput.Name);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{indicatorType.Name} bar output: {barOutput.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorType.Lines","kind":"property","name":"Lines","type":"T:cAlgo.API.IndicatorType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<IndicatorTypeLineOutput> Lines {get;}","python":"indicatorType.Lines: IReadonlyList[IndicatorTypeLineOutput]","summary":"Gets collection of indicator line outputs.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorTypeLineOutput>","pythonType":"IReadonlyList[IndicatorTypeLineOutput]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is IndicatorType indicatorType)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"Line output: {0}\", line.Name);\n}","python":"algoType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\nif algoType is not None:\n    for line in IndicatorType(algoType).Lines:\n        api.Print(f\"Line output: {line.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Lines/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Lines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorType.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.IndicatorType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<AlgoParameter> Parameters {get;}","python":"indicatorType.Parameters: IReadonlyList[AlgoParameter]","summary":"Gets collection of indicator parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<AlgoParameter>","pythonType":"IReadonlyList[AlgoParameter]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is IndicatorType indicatorType)\n{\n    foreach (var parameter in indicatorType.Parameters)\n        Print(\"{0} default: {1}\", parameter.Name, parameter.DefaultValue);\n}","python":"algoType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\nif algoType is not None:\n    for parameter in IndicatorType(algoType).Parameters:\n        api.Print(f\"{parameter.Name} default: {parameter.DefaultValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorType.Outputs","kind":"property","name":"Outputs","type":"T:cAlgo.API.IndicatorType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<IndicatorOutput> Outputs {get;}","python":"indicatorType.Outputs: IReadonlyList[IndicatorOutput]","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<IndicatorOutput>","pythonType":"IReadonlyList[IndicatorOutput]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Lines instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorTypeBarOutput","kind":"interface","name":"IndicatorTypeBarOutput","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface IndicatorTypeBarOutput","python":"IndicatorTypeBarOutput","summary":"Represents an indicator type bar output.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is not IndicatorType smaIndicatorType)\n            return;\n\n        foreach (var barOutput in smaIndicatorType.Bars)\n        {\n            Print($\"Name: {barOutput.Name}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n        if indicatorType is not None:\n            smaIndicatorType = IndicatorType(indicatorType)\n            for barOutput in smaIndicatorType.Bars:\n                print(f\"Name: {barOutput.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultAreaChartFillColor","kind":"property","name":"DefaultAreaChartFillColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultAreaChartFillColor {get;}","python":"indicatorTypeBarOutput.DefaultAreaChartFillColor: Color","summary":"Gets default color of the area chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} area chart fill color: {1}\", barOutput.Name, barOutput.DefaultAreaChartFillColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} area chart fill color: {barOutput.DefaultAreaChartFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultAreaChartFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultAreaChartFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultBearFillColor","kind":"property","name":"DefaultBearFillColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultBearFillColor {get;}","python":"indicatorTypeBarOutput.DefaultBearFillColor: Color","summary":"Gets default bear fill color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bear fill color: {1}\", barOutput.Name, barOutput.DefaultBearFillColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} bear fill color: {barOutput.DefaultBearFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBearFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBearFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultBearOutlineColor","kind":"property","name":"DefaultBearOutlineColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultBearOutlineColor {get;}","python":"indicatorTypeBarOutput.DefaultBearOutlineColor: Color","summary":"Gets default bear outline color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bear outline color: {1}\", barOutput.Name, barOutput.DefaultBearOutlineColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} bear outline color: {barOutput.DefaultBearOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBearOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBearOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultBullFillColor","kind":"property","name":"DefaultBullFillColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultBullFillColor {get;}","python":"indicatorTypeBarOutput.DefaultBullFillColor: Color","summary":"Gets default bull fill color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bull fill color: {1}\", barOutput.Name, barOutput.DefaultBullFillColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} bull fill color: {barOutput.DefaultBullFillColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBullFillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBullFillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultBullOutlineColor","kind":"property","name":"DefaultBullOutlineColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultBullOutlineColor {get;}","python":"indicatorTypeBarOutput.DefaultBullOutlineColor: Color","summary":"Gets default bull outline color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bull outline color: {1}\", barOutput.Name, barOutput.DefaultBullOutlineColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} bull outline color: {barOutput.DefaultBullOutlineColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBullOutlineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultBullOutlineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultChartType","kind":"property","name":"DefaultChartType","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"ChartType DefaultChartType {get;}","python":"indicatorTypeBarOutput.DefaultChartType: ChartType","summary":"Gets default chart type.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartType","pythonType":"ChartType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} default chart type: {1}\", barOutput.Name, barOutput.DefaultChartType);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} default chart type: {barOutput.DefaultChartType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultChartType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultChartType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultDotChartColor","kind":"property","name":"DefaultDotChartColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultDotChartColor {get;}","python":"indicatorTypeBarOutput.DefaultDotChartColor: Color","summary":"Gets default color of the dot chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} dot chart color: {1}\", barOutput.Name, barOutput.DefaultDotChartColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} dot chart color: {barOutput.DefaultDotChartColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultDotChartColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultDotChartColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.DefaultTickVolumeColor","kind":"property","name":"DefaultTickVolumeColor","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultTickVolumeColor {get;}","python":"indicatorTypeBarOutput.DefaultTickVolumeColor: Color","summary":"Gets default tick volume color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} tick volume color: {1}\", barOutput.Name, barOutput.DefaultTickVolumeColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{barOutput.Name} tick volume color: {barOutput.DefaultTickVolumeColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultTickVolumeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/DefaultTickVolumeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeBarOutput.Name","kind":"property","name":"Name","type":"T:cAlgo.API.IndicatorTypeBarOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string Name {get;}","python":"indicatorTypeBarOutput.Name: str","summary":"Gets output name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var barOutput in indicatorType.Bars)\n        Print(\"{0} bar output: {1}\", indicatorType.Name, barOutput.Name);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for barOutput in indicatorType.Bars:\n        api.Print(f\"{indicatorType.Name} bar output: {barOutput.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeBarOutput/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.IndicatorTypeLineOutput","kind":"interface","name":"IndicatorTypeLineOutput","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface IndicatorTypeLineOutput","python":"IndicatorTypeLineOutput","summary":"Represents an indicator type line output.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator) is not IndicatorType smaIndicatorType)\n            return;\n\n        foreach (var lineOutput in smaIndicatorType.Lines)\n        {\n            Print($\"Name: {lineOutput.Name}\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        indicatorType = api.AlgoRegistry.Get(\"Simple Moving Average\", AlgoKind.StandardIndicator)\n        if indicatorType is not None:\n            smaIndicatorType = IndicatorType(indicatorType)\n            for line in smaIndicatorType.Lines:\n                print(f\"Name: {line.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeLineOutput.DefaultColor","kind":"property","name":"DefaultColor","type":"T:cAlgo.API.IndicatorTypeLineOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"Color DefaultColor {get;}","python":"indicatorTypeLineOutput.DefaultColor: Color","summary":"Gets default color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"{0} default color: {1}\", line.Name, line.DefaultColor);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for line in indicatorType.Lines:\n        api.Print(f\"{line.Name} default color: {line.DefaultColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeLineOutput.DefaultLineStyle","kind":"property","name":"DefaultLineStyle","type":"T:cAlgo.API.IndicatorTypeLineOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"LineStyle DefaultLineStyle {get;}","python":"indicatorTypeLineOutput.DefaultLineStyle: LineStyle","summary":"Gets default line style.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"{0} default line style: {1}\", line.Name, line.DefaultLineStyle);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for line in indicatorType.Lines:\n        api.Print(f\"{line.Name} default line style: {line.DefaultLineStyle}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultLineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultLineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeLineOutput.DefaultPlotType","kind":"property","name":"DefaultPlotType","type":"T:cAlgo.API.IndicatorTypeLineOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"PlotType DefaultPlotType {get;}","python":"indicatorTypeLineOutput.DefaultPlotType: PlotType","summary":"Gets the PlotType .","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"{0} default plot type: {1}\", line.Name, line.DefaultPlotType);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for line in indicatorType.Lines:\n        api.Print(f\"{line.Name} default plot type: {line.DefaultPlotType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultPlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultPlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeLineOutput.DefaultThickness","kind":"property","name":"DefaultThickness","type":"T:cAlgo.API.IndicatorTypeLineOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"float DefaultThickness {get;}","python":"indicatorTypeLineOutput.DefaultThickness: float","summary":"Gets default thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"float","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"{0} default thickness: {1}\", line.Name, line.DefaultThickness);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for line in indicatorType.Lines:\n        api.Print(f\"{line.Name} default thickness: {line.DefaultThickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/DefaultThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.IndicatorTypeLineOutput.Name","kind":"property","name":"Name","type":"T:cAlgo.API.IndicatorTypeLineOutput","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"string Name {get;}","python":"indicatorTypeLineOutput.Name: str","summary":"Gets output name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var indicatorType in AlgoRegistry.Indicators)\n{\n    foreach (var line in indicatorType.Lines)\n        Print(\"{0} line output: {1}\", indicatorType.Name, line.Name);\n}","python":"for indicatorType in api.AlgoRegistry.Indicators:\n    for line in indicatorType.Lines:\n        api.Print(f\"{indicatorType.Name} line output: {line.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/IndicatorTypeLineOutput/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.InstallationError","kind":"enum","name":"InstallationError","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public enum InstallationError","python":"InstallationError","summary":"Represents the predefined algo installation errors.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var result = AlgoRegistry.Install(\"path/to-algo-file.algo\");\n\n        if (!result.Succeeded)\n            Print($\"Algo installation failed with error: {result.Error}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        result = api.AlgoRegistry.Install(\"path/to-algo-file.algo\")\n        if result.Succeeded == False:\n            print(f\"Algo installation failed with error: {result.Error}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.Forbidden","kind":"enum value","name":"Forbidden","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.Forbidden;","python":"InstallationError.Forbidden","summary":"Installation error due to lack of permission by user.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.InvalidFile","kind":"enum value","name":"InvalidFile","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.InvalidFile;","python":"InstallationError.InvalidFile","summary":"Installation error due to algo file being invalid.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.FileNotFound","kind":"enum value","name":"FileNotFound","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.FileNotFound;","python":"InstallationError.FileNotFound","summary":"Installation error due to algo file not found in provided path (Only for file path based installations).","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.DownloadError","kind":"enum value","name":"DownloadError","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.DownloadError;","python":"InstallationError.DownloadError","summary":"Installation error due to algo file downloading error (Only for URI based installations).","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.Canceled","kind":"enum value","name":"Canceled","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.Canceled;","python":"InstallationError.Canceled","summary":"When user cancels installation dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.InstallationError.Unknown","kind":"enum value","name":"Unknown","type":"T:cAlgo.API.InstallationError","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"InstallationError.Unknown;","python":"InstallationError.Unknown","summary":"Unknown or unrecognized error.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError","pythonType":"InstallationError","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.InstallationOperation","kind":"class","name":"InstallationOperation","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public class InstallationOperation","python":"InstallationOperation","summary":"Provides access to the properties describing an asynchronous algo installation operation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var operation = AlgoRegistry.InstallAsync(\"path/to-algo-file.algo\", result =>\n        {\n            if (!result.Succeeded)\n                Print(result.Error);\n        });\n\n        Print($\"Is Executing: {operation.IsExecuting}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nfrom System import Action\n\nclass Test():\n    def on_start(self):\n        operation = api.AlgoRegistry.InstallAsync(\"path/to-algo-file.algo\", Action[InstallationResult](self.on_installation_operation_completed))\n\n        print(f\"Is Executing: {operation.IsExecuting}\")\n\n    def on_installation_operation_completed(self, result):\n        if result.Succeeded == False:\n            print(result.Error)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.InstallationOperation.IsExecuting","kind":"property","name":"IsExecuting","type":"T:cAlgo.API.InstallationOperation","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public bool IsExecuting {get;}","python":"installationOperation.IsExecuting: bool","summary":"True if installation operation is being executed, false if it completed.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = AlgoRegistry.InstallAsync(@\"C:\\Algos\\Sample cBot.algo\", result => Print(\"Installed: {0}\", result.Succeeded));\nPrint(\"Installation is running: {0}\", operation.IsExecuting);","python":"operation = api.AlgoRegistry.InstallAsync(r\"C:\\Algos\\Sample cBot.algo\", lambda result: api.Print(f\"Installed: {result.Succeeded}\"))\napi.Print(f\"Installation is running: {operation.IsExecuting}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/IsExecuting/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/IsExecuting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.InstallationOperation.Result","kind":"property","name":"Result","type":"T:cAlgo.API.InstallationOperation","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public InstallationResult Result {get;}","python":"installationOperation.Result: InstallationResult","summary":"The result of installation operation.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationResult","pythonType":"InstallationResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var operation = AlgoRegistry.InstallAsync(@\"C:\\Algos\\Sample cBot.algo\");\nif (!operation.IsExecuting && operation.Result != null)\n    Print(\"Installation succeeded: {0}\", operation.Result.Succeeded);","python":"operation = api.AlgoRegistry.InstallAsync(r\"C:\\Algos\\Sample cBot.algo\")\nif not operation.IsExecuting and operation.Result is not None:\n    api.Print(f\"Installation succeeded: {operation.Result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationOperation/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.InstallationPermission","kind":"interface","name":"InstallationPermission","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface InstallationPermission","python":"InstallationPermission","summary":"Algo Installation Permission","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (Permissions.InstallationPermission.Request())\n{\n    var result = AlgoRegistry.Install(@\"C:\\Algos\\Sample cBot.algo\");\n    Print(\"Installed: {0}\", result.Succeeded);\n}","python":"if api.Permissions.InstallationPermission.Request():\n    result = api.AlgoRegistry.Install(r\"C:\\Algos\\Sample cBot.algo\")\n    api.Print(f\"Installed: {result.Succeeded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/InstallationPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/InstallationPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.InstallationResult","kind":"class","name":"InstallationResult","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public class InstallationResult","python":"InstallationResult","summary":"The result of an algo installation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var result = AlgoRegistry.Install(\"path/to-algo-file.algo\");\n\n        if (!result.Succeeded)\n            Print($\"Algo installation failed with error: {result.Error}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        result = api.AlgoRegistry.Install(\"path/to-algo-file.algo\")\n        if result.Succeeded == False:\n            print(f\"Algo installation failed with error: {result.Error}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.InstallationResult.Error","kind":"property","name":"Error","type":"T:cAlgo.API.InstallationResult","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public InstallationError? Error {get;}","python":"installationResult.Error: InstallationError | None","summary":"Returns algo installation error if algo installation failed otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationError?","pythonType":"InstallationError | None","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = AlgoRegistry.Install(@\"C:\\Algos\\Sample cBot.algo\");\nif (result.Error == InstallationError.FileNotFound)\n    Print(\"The algo file was not found\");","python":"result = api.AlgoRegistry.Install(r\"C:\\Algos\\Sample cBot.algo\")\nif result.Error == InstallationError.FileNotFound:\n    api.Print(\"The algo file was not found\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/Error/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/Error/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.InstallationResult.Succeeded","kind":"property","name":"Succeeded","type":"T:cAlgo.API.InstallationResult","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public bool Succeeded {get;}","python":"installationResult.Succeeded: bool","summary":"Returns True if algo installation succeeded otherwise false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = AlgoRegistry.Install(@\"C:\\Algos\\Sample cBot.algo\");\nif (result.Succeeded)\n    Print(\"Algo installed\");\nelse\n    Print(\"Installation failed: {0}\", result.Error);","python":"result = api.AlgoRegistry.Install(r\"C:\\Algos\\Sample cBot.algo\")\nif result.Succeeded:\n    api.Print(\"Algo installed\")\nelse:\n    api.Print(f\"Installation failed: {result.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/Succeeded/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/InstallationResult/Succeeded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.KaufmanAdaptiveMovingAverage","kind":"interface","name":"KaufmanAdaptiveMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface KaufmanAdaptiveMovingAverage","python":"KaufmanAdaptiveMovingAverage","summary":"The Kaufman's Adaptive Moving Average (KAMA) indicator is a type of adaptive moving average designed to adjust its smoothing factor based on market volatility","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private KaufmanAdaptiveMovingAverage _kama;\n\nprotected override void OnStart()\n{\n    _kama = Indicators.KaufmanAdaptiveMovingAverage(Bars.ClosePrices, 10, 2, 30);\n}\n\nprotected override void OnBar()\n{\n    if (Bars.ClosePrices.Last(1) > _kama.Result.Last(1))\n        Print(\"Close is above KAMA: {0}\", _kama.Result.Last(1));\n}","python":"def on_start(self):\n    self.kama = api.Indicators.KaufmanAdaptiveMovingAverage(api.Bars.ClosePrices, 10, 2, 30)\n\ndef on_bar(self):\n    if api.Bars.ClosePrices.Last(1) > self.kama.Result.Last(1):\n        api.Print(f\"Close is above KAMA: {self.kama.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/KaufmanAdaptiveMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/KaufmanAdaptiveMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.KeltnerChannels","kind":"interface","name":"KeltnerChannels","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface KeltnerChannels","python":"KeltnerChannels","summary":"The Keltner Channels are volatility-based envelopes set above and below an exponential moving average.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var keltnerChannels = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nPrint(\"Top: {0}, Main: {1}, Bottom: {2}\", keltnerChannels.Top.Last(1), keltnerChannels.Main.Last(1), keltnerChannels.Bottom.Last(1));","python":"keltnerChannels = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\napi.Print(f\"Top: {keltnerChannels.Top.Last(1)}, Main: {keltnerChannels.Main.Last(1)}, Bottom: {keltnerChannels.Bottom.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Keltner Channels indicator\n    public partial class KeltnerChannelsSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private KeltnerChannels _keltnerChannels;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _keltnerChannels = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.LowPrices.Last(1) <= _keltnerChannels.Bottom.Last(1) && Bars.LowPrices.Last(2) > _keltnerChannels.Bottom.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label);\n            }\n            else if (Bars.HighPrices.Last(1) >= _keltnerChannels.Top.Last(1) && Bars.HighPrices.Last(2) < _keltnerChannels.Top.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass KeltnerChannelsSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.keltnerChannels = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\n\n    def on_bar_closed(self):\n        if api.Bars.LowPrices.Last(0) <= self.keltnerChannels.Bottom.Last(0) and api.Bars.LowPrices.Last(1) > self.keltnerChannels.Bottom.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif api.Bars.HighPrices.Last(0) >= self.keltnerChannels.Top.Last(0) and api.Bars.HighPrices.Last(1) < self.keltnerChannels.Top.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    },\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.KeltnerChannels.Bottom","kind":"property","name":"Bottom","type":"T:cAlgo.API.Indicators.KeltnerChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Bottom {get;}","python":"keltnerChannels.Bottom: IndicatorDataSeries","summary":"Moving Average - ATR * BandDistance","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var keltnerChannels = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nif (Bars.LowPrices.Last(1) <= keltnerChannels.Bottom.Last(1))\n    Print(\"Price touched the lower Keltner band: {0}\", keltnerChannels.Bottom.Last(1));","python":"keltnerChannels = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\nif api.Bars.LowPrices.Last(1) <= keltnerChannels.Bottom.Last(1):\n    api.Print(f\"Price touched the lower Keltner band: {keltnerChannels.Bottom.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Bottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Bottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.KeltnerChannels.Main","kind":"property","name":"Main","type":"T:cAlgo.API.Indicators.KeltnerChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Main {get;}","python":"keltnerChannels.Main: IndicatorDataSeries","summary":"Moving Average Line","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var keltnerChannels = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nvar trend = Bars.ClosePrices.Last(1) > keltnerChannels.Main.Last(1) ? \"above\" : \"below\";\nPrint(\"Close is {0} the Keltner middle line {1}\", trend, keltnerChannels.Main.Last(1));","python":"keltnerChannels = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\ntrend = \"above\" if api.Bars.ClosePrices.Last(1) > keltnerChannels.Main.Last(1) else \"below\"\napi.Print(f\"Close is {trend} the Keltner middle line {keltnerChannels.Main.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Main/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Main/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.KeltnerChannels.Top","kind":"property","name":"Top","type":"T:cAlgo.API.Indicators.KeltnerChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Top {get;}","python":"keltnerChannels.Top: IndicatorDataSeries","summary":"Moving Average + ATR * BandDistance","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var keltnerChannels = Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2);\nif (Bars.HighPrices.Last(1) >= keltnerChannels.Top.Last(1))\n    Print(\"Price touched the upper Keltner band: {0}\", keltnerChannels.Top.Last(1));","python":"keltnerChannels = api.Indicators.KeltnerChannels(20, MovingAverageType.Exponential, 10, MovingAverageType.Simple, 2)\nif api.Bars.HighPrices.Last(1) >= keltnerChannels.Top.Last(1):\n    api.Print(f\"Price touched the upper Keltner band: {keltnerChannels.Top.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/KeltnerChannels/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Key","kind":"enum","name":"Key","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public enum Key","python":"Key","summary":"Specifies the possible key values on a keyboard.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.AddHotkey(() => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin), Key.B, ModifierKeys.Control);\nChart.AddHotkey(() => ExecuteMarketOrder(TradeType.Sell, SymbolName, Symbol.VolumeInUnitsMin), Key.S, ModifierKeys.Control);\nPrint(\"Press Ctrl+B to buy and Ctrl+S to sell {0}\", SymbolName);","python":"from System import Action\n\ndef buy():\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\n\ndef sell():\n    api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, api.Symbol.VolumeInUnitsMin)\n\napi.Chart.AddHotkey(Action(buy), Key.B, ModifierKeys.Control)\napi.Chart.AddHotkey(Action(sell), Key.S, ModifierKeys.Control)\napi.Print(f\"Press Ctrl+B to buy and Ctrl+S to sell {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.None","kind":"enum value","name":"None","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.None;","python":"Key.None","summary":"No key pressed.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Cancel","kind":"enum value","name":"Cancel","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Cancel;","python":"Key.Cancel","summary":"The Cancel key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Back","kind":"enum value","name":"Back","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Back;","python":"Key.Back","summary":"The Backspace key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Tab","kind":"enum value","name":"Tab","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Tab;","python":"Key.Tab","summary":"The Tab key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LineFeed","kind":"enum value","name":"LineFeed","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LineFeed;","python":"Key.LineFeed","summary":"The Linefeed key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Clear","kind":"enum value","name":"Clear","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Clear;","python":"Key.Clear","summary":"The Clear key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Enter","kind":"enum value","name":"Enter","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Enter;","python":"Key.Enter","summary":"The Enter key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Pause","kind":"enum value","name":"Pause","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Pause;","python":"Key.Pause","summary":"The Pause key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.CapsLock","kind":"enum value","name":"CapsLock","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.CapsLock;","python":"Key.CapsLock","summary":"The Caps Lock key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.KanaMode","kind":"enum value","name":"KanaMode","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.KanaMode;","python":"Key.KanaMode","summary":"The IME Kana mode key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.JunjaMode","kind":"enum value","name":"JunjaMode","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.JunjaMode;","python":"Key.JunjaMode","summary":"The IME Junja mode key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.FinalMode","kind":"enum value","name":"FinalMode","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.FinalMode;","python":"Key.FinalMode","summary":"The IME Final mode key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.HanjaMode","kind":"enum value","name":"HanjaMode","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.HanjaMode;","python":"Key.HanjaMode","summary":"The IME Hanja mode key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Escape","kind":"enum value","name":"Escape","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Escape;","python":"Key.Escape","summary":"The ESC key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ImeConvert","kind":"enum value","name":"ImeConvert","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ImeConvert;","python":"Key.ImeConvert","summary":"The IME Convert key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ImeNonConvert","kind":"enum value","name":"ImeNonConvert","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ImeNonConvert;","python":"Key.ImeNonConvert","summary":"The IME NonConvert key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ImeAccept","kind":"enum value","name":"ImeAccept","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ImeAccept;","python":"Key.ImeAccept","summary":"The IME Accept key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ImeModeChange","kind":"enum value","name":"ImeModeChange","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ImeModeChange;","python":"Key.ImeModeChange","summary":"The IME Mode change request.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Space","kind":"enum value","name":"Space","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Space;","python":"Key.Space","summary":"The Spacebar key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.PageUp","kind":"enum value","name":"PageUp","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.PageUp;","python":"Key.PageUp","summary":"The Page Up key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.PageDown","kind":"enum value","name":"PageDown","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.PageDown;","python":"Key.PageDown","summary":"The Page Down key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.End","kind":"enum value","name":"End","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.End;","python":"Key.End","summary":"The End key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Home","kind":"enum value","name":"Home","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Home;","python":"Key.Home","summary":"The Home key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Left","kind":"enum value","name":"Left","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Left;","python":"Key.Left","summary":"The Left Arrow key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Up","kind":"enum value","name":"Up","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Up;","python":"Key.Up","summary":"The Up Arrow key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Right","kind":"enum value","name":"Right","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Right;","python":"Key.Right","summary":"The Right Arrow key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Down","kind":"enum value","name":"Down","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Down;","python":"Key.Down","summary":"The Down Arrow key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Select","kind":"enum value","name":"Select","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Select;","python":"Key.Select","summary":"The Select key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Print","kind":"enum value","name":"Print","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Print;","python":"Key.Print","summary":"The Print key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Execute","kind":"enum value","name":"Execute","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Execute;","python":"Key.Execute","summary":"The Execute key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.PrintScreen","kind":"enum value","name":"PrintScreen","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.PrintScreen;","python":"Key.PrintScreen","summary":"The Print Screen key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Insert","kind":"enum value","name":"Insert","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Insert;","python":"Key.Insert","summary":"The Insert key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Delete","kind":"enum value","name":"Delete","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Delete;","python":"Key.Delete","summary":"The Delete key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Help","kind":"enum value","name":"Help","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Help;","python":"Key.Help","summary":"The Help key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D0","kind":"enum value","name":"D0","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D0;","python":"Key.D0","summary":"The 0 (zero) key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D1","kind":"enum value","name":"D1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D1;","python":"Key.D1","summary":"The 1 (one) key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D2","kind":"enum value","name":"D2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D2;","python":"Key.D2","summary":"The 2 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D3","kind":"enum value","name":"D3","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D3;","python":"Key.D3","summary":"The 3 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D4","kind":"enum value","name":"D4","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D4;","python":"Key.D4","summary":"The 4 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D5","kind":"enum value","name":"D5","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D5;","python":"Key.D5","summary":"The 5 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D6","kind":"enum value","name":"D6","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D6;","python":"Key.D6","summary":"The 6 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D7","kind":"enum value","name":"D7","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D7;","python":"Key.D7","summary":"The 7 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D8","kind":"enum value","name":"D8","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D8;","python":"Key.D8","summary":"The 8 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D9","kind":"enum value","name":"D9","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D9;","python":"Key.D9","summary":"The 9 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.A","kind":"enum value","name":"A","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.A;","python":"Key.A","summary":"The A key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.B","kind":"enum value","name":"B","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.B;","python":"Key.B","summary":"The B key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.C","kind":"enum value","name":"C","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.C;","python":"Key.C","summary":"The C key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.D","kind":"enum value","name":"D","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.D;","python":"Key.D","summary":"The D key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.E","kind":"enum value","name":"E","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.E;","python":"Key.E","summary":"The E key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F","kind":"enum value","name":"F","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F;","python":"Key.F","summary":"The F key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.G","kind":"enum value","name":"G","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.G;","python":"Key.G","summary":"The G key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.H","kind":"enum value","name":"H","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.H;","python":"Key.H","summary":"The H key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.I","kind":"enum value","name":"I","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.I;","python":"Key.I","summary":"The I key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.J","kind":"enum value","name":"J","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.J;","python":"Key.J","summary":"The J key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.K","kind":"enum value","name":"K","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.K;","python":"Key.K","summary":"The K key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.L","kind":"enum value","name":"L","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.L;","python":"Key.L","summary":"The L key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.M","kind":"enum value","name":"M","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.M;","python":"Key.M","summary":"The M key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.N","kind":"enum value","name":"N","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.N;","python":"Key.N","summary":"The N key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.O","kind":"enum value","name":"O","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.O;","python":"Key.O","summary":"The O key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.P","kind":"enum value","name":"P","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.P;","python":"Key.P","summary":"The P key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Q","kind":"enum value","name":"Q","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Q;","python":"Key.Q","summary":"The Q key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.R","kind":"enum value","name":"R","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.R;","python":"Key.R","summary":"The R key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.S","kind":"enum value","name":"S","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.S;","python":"Key.S","summary":"The S key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.T","kind":"enum value","name":"T","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.T;","python":"Key.T","summary":"The T key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.U","kind":"enum value","name":"U","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.U;","python":"Key.U","summary":"The U key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.V","kind":"enum value","name":"V","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.V;","python":"Key.V","summary":"The V key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.W","kind":"enum value","name":"W","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.W;","python":"Key.W","summary":"The W key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.X","kind":"enum value","name":"X","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.X;","python":"Key.X","summary":"The X key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Y","kind":"enum value","name":"Y","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Y;","python":"Key.Y","summary":"The Y key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Z","kind":"enum value","name":"Z","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Z;","python":"Key.Z","summary":"The Z key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LWin","kind":"enum value","name":"LWin","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LWin;","python":"Key.LWin","summary":"The left Windows logo key (Microsoft Natural Keyboard).","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.RWin","kind":"enum value","name":"RWin","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.RWin;","python":"Key.RWin","summary":"The right Windows logo key (Microsoft Natural Keyboard).","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Apps","kind":"enum value","name":"Apps","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Apps;","python":"Key.Apps","summary":"The Application key (Microsoft Natural Keyboard).","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Sleep","kind":"enum value","name":"Sleep","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Sleep;","python":"Key.Sleep","summary":"The Computer Sleep key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad0","kind":"enum value","name":"NumPad0","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad0;","python":"Key.NumPad0","summary":"The 0 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad1","kind":"enum value","name":"NumPad1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad1;","python":"Key.NumPad1","summary":"The 1 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad2","kind":"enum value","name":"NumPad2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad2;","python":"Key.NumPad2","summary":"The 2 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad3","kind":"enum value","name":"NumPad3","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad3;","python":"Key.NumPad3","summary":"The 3 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad4","kind":"enum value","name":"NumPad4","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad4;","python":"Key.NumPad4","summary":"The 4 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad5","kind":"enum value","name":"NumPad5","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad5;","python":"Key.NumPad5","summary":"The 5 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad6","kind":"enum value","name":"NumPad6","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad6;","python":"Key.NumPad6","summary":"The 6 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad7","kind":"enum value","name":"NumPad7","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad7;","python":"Key.NumPad7","summary":"The 7 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad8","kind":"enum value","name":"NumPad8","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad8;","python":"Key.NumPad8","summary":"The 8 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumPad9","kind":"enum value","name":"NumPad9","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumPad9;","python":"Key.NumPad9","summary":"The 9 key on the numeric keypad.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Multiply","kind":"enum value","name":"Multiply","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Multiply;","python":"Key.Multiply","summary":"The Multiply key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Add","kind":"enum value","name":"Add","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Add;","python":"Key.Add","summary":"The Add key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Separator","kind":"enum value","name":"Separator","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Separator;","python":"Key.Separator","summary":"The Separator key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Subtract","kind":"enum value","name":"Subtract","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Subtract;","python":"Key.Subtract","summary":"The Subtract key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Decimal","kind":"enum value","name":"Decimal","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Decimal;","python":"Key.Decimal","summary":"The Decimal key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Divide","kind":"enum value","name":"Divide","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Divide;","python":"Key.Divide","summary":"The Divide key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F1","kind":"enum value","name":"F1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F1;","python":"Key.F1","summary":"The F1 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F2","kind":"enum value","name":"F2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F2;","python":"Key.F2","summary":"The F2 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F3","kind":"enum value","name":"F3","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F3;","python":"Key.F3","summary":"The F3 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F4","kind":"enum value","name":"F4","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F4;","python":"Key.F4","summary":"The F4 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F5","kind":"enum value","name":"F5","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F5;","python":"Key.F5","summary":"The F5 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F6","kind":"enum value","name":"F6","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F6;","python":"Key.F6","summary":"The F6 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F7","kind":"enum value","name":"F7","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F7;","python":"Key.F7","summary":"The F7 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F8","kind":"enum value","name":"F8","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F8;","python":"Key.F8","summary":"The F8 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F9","kind":"enum value","name":"F9","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F9;","python":"Key.F9","summary":"The F9 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F10","kind":"enum value","name":"F10","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F10;","python":"Key.F10","summary":"The F10 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F11","kind":"enum value","name":"F11","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F11;","python":"Key.F11","summary":"The F11 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F12","kind":"enum value","name":"F12","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F12;","python":"Key.F12","summary":"The F12 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F13","kind":"enum value","name":"F13","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F13;","python":"Key.F13","summary":"The F13 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F14","kind":"enum value","name":"F14","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F14;","python":"Key.F14","summary":"The F14 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F15","kind":"enum value","name":"F15","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F15;","python":"Key.F15","summary":"The F15 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F16","kind":"enum value","name":"F16","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F16;","python":"Key.F16","summary":"The F16 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F17","kind":"enum value","name":"F17","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F17;","python":"Key.F17","summary":"The F17 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F18","kind":"enum value","name":"F18","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F18;","python":"Key.F18","summary":"The F18 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F19","kind":"enum value","name":"F19","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F19;","python":"Key.F19","summary":"The F19 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F20","kind":"enum value","name":"F20","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F20;","python":"Key.F20","summary":"The F20 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F21","kind":"enum value","name":"F21","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F21;","python":"Key.F21","summary":"The F21 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F22","kind":"enum value","name":"F22","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F22;","python":"Key.F22","summary":"The F22 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F23","kind":"enum value","name":"F23","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F23;","python":"Key.F23","summary":"The F23 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.F24","kind":"enum value","name":"F24","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.F24;","python":"Key.F24","summary":"The F24 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NumLock","kind":"enum value","name":"NumLock","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NumLock;","python":"Key.NumLock","summary":"The Num Lock key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Scroll","kind":"enum value","name":"Scroll","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Scroll;","python":"Key.Scroll","summary":"The Scroll Lock key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LeftShift","kind":"enum value","name":"LeftShift","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LeftShift;","python":"Key.LeftShift","summary":"The left Shift key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.RightShift","kind":"enum value","name":"RightShift","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.RightShift;","python":"Key.RightShift","summary":"The right Shift key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LeftCtrl","kind":"enum value","name":"LeftCtrl","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LeftCtrl;","python":"Key.LeftCtrl","summary":"The left CTRL key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.RightCtrl","kind":"enum value","name":"RightCtrl","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.RightCtrl;","python":"Key.RightCtrl","summary":"The right CTRL key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LeftAlt","kind":"enum value","name":"LeftAlt","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LeftAlt;","python":"Key.LeftAlt","summary":"The left ALT key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.RightAlt","kind":"enum value","name":"RightAlt","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.RightAlt;","python":"Key.RightAlt","summary":"The right ALT key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserBack","kind":"enum value","name":"BrowserBack","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserBack;","python":"Key.BrowserBack","summary":"The Browser Back key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserForward","kind":"enum value","name":"BrowserForward","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserForward;","python":"Key.BrowserForward","summary":"The Browser Forward key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserRefresh","kind":"enum value","name":"BrowserRefresh","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserRefresh;","python":"Key.BrowserRefresh","summary":"The Browser Refresh key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserStop","kind":"enum value","name":"BrowserStop","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserStop;","python":"Key.BrowserStop","summary":"The Browser Stop key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserSearch","kind":"enum value","name":"BrowserSearch","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserSearch;","python":"Key.BrowserSearch","summary":"The Browser Search key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserFavorites","kind":"enum value","name":"BrowserFavorites","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserFavorites;","python":"Key.BrowserFavorites","summary":"The Browser Favorites key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.BrowserHome","kind":"enum value","name":"BrowserHome","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.BrowserHome;","python":"Key.BrowserHome","summary":"The Browser Home key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.VolumeMute","kind":"enum value","name":"VolumeMute","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.VolumeMute;","python":"Key.VolumeMute","summary":"The Volume Mute key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.VolumeDown","kind":"enum value","name":"VolumeDown","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.VolumeDown;","python":"Key.VolumeDown","summary":"The Volume Down key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.VolumeUp","kind":"enum value","name":"VolumeUp","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.VolumeUp;","python":"Key.VolumeUp","summary":"The Volume Up key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.MediaNextTrack","kind":"enum value","name":"MediaNextTrack","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.MediaNextTrack;","python":"Key.MediaNextTrack","summary":"The Media Next Track key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.MediaPreviousTrack","kind":"enum value","name":"MediaPreviousTrack","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.MediaPreviousTrack;","python":"Key.MediaPreviousTrack","summary":"The Media Previous Track key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.MediaStop","kind":"enum value","name":"MediaStop","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.MediaStop;","python":"Key.MediaStop","summary":"The Media Stop key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.MediaPlayPause","kind":"enum value","name":"MediaPlayPause","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.MediaPlayPause;","python":"Key.MediaPlayPause","summary":"The Media Play Pause key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LaunchMail","kind":"enum value","name":"LaunchMail","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LaunchMail;","python":"Key.LaunchMail","summary":"The Launch Mail key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.SelectMedia","kind":"enum value","name":"SelectMedia","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.SelectMedia;","python":"Key.SelectMedia","summary":"The Select Media key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LaunchApplication1","kind":"enum value","name":"LaunchApplication1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LaunchApplication1;","python":"Key.LaunchApplication1","summary":"The Launch Application1 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.LaunchApplication2","kind":"enum value","name":"LaunchApplication2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.LaunchApplication2;","python":"Key.LaunchApplication2","summary":"The Launch Application2 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem1","kind":"enum value","name":"Oem1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem1;","python":"Key.Oem1","summary":"The OEM 1 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemPlus","kind":"enum value","name":"OemPlus","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemPlus;","python":"Key.OemPlus","summary":"The OEM Addition key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemComma","kind":"enum value","name":"OemComma","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemComma;","python":"Key.OemComma","summary":"The OEM Comma key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemMinus","kind":"enum value","name":"OemMinus","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemMinus;","python":"Key.OemMinus","summary":"The OEM Minus key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemPeriod","kind":"enum value","name":"OemPeriod","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemPeriod;","python":"Key.OemPeriod","summary":"The OEM Period key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem2","kind":"enum value","name":"Oem2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem2;","python":"Key.Oem2","summary":"The OEM 2 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem3","kind":"enum value","name":"Oem3","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem3;","python":"Key.Oem3","summary":"The OEM 3 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.AbntC1","kind":"enum value","name":"AbntC1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.AbntC1;","python":"Key.AbntC1","summary":"The ABNT_C1 (Brazilian) key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.AbntC2","kind":"enum value","name":"AbntC2","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.AbntC2;","python":"Key.AbntC2","summary":"The ABNT_C2 (Brazilian) key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem4","kind":"enum value","name":"Oem4","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem4;","python":"Key.Oem4","summary":"The OEM 4 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem5","kind":"enum value","name":"Oem5","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem5;","python":"Key.Oem5","summary":"The OEM 5 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem6","kind":"enum value","name":"Oem6","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem6;","python":"Key.Oem6","summary":"The OEM 6 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem7","kind":"enum value","name":"Oem7","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem7;","python":"Key.Oem7","summary":"The OEM 7 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem8","kind":"enum value","name":"Oem8","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem8;","python":"Key.Oem8","summary":"The OEM 8 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Oem102","kind":"enum value","name":"Oem102","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Oem102;","python":"Key.Oem102","summary":"The OEM 102 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ImeProcessed","kind":"enum value","name":"ImeProcessed","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ImeProcessed;","python":"Key.ImeProcessed","summary":"A special key masking the real key being processed by an IME.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.System","kind":"enum value","name":"System","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.System;","python":"Key.System","summary":"A special key masking the real key being processed as a system key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemAttn","kind":"enum value","name":"OemAttn","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemAttn;","python":"Key.OemAttn","summary":"The OEM ATTN key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemFinish","kind":"enum value","name":"OemFinish","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemFinish;","python":"Key.OemFinish","summary":"The OEM FINISH key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemCopy","kind":"enum value","name":"OemCopy","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemCopy;","python":"Key.OemCopy","summary":"The OEM COPY key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemAuto","kind":"enum value","name":"OemAuto","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemAuto;","python":"Key.OemAuto","summary":"The OEM AUTO key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemEnlw","kind":"enum value","name":"OemEnlw","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemEnlw;","python":"Key.OemEnlw","summary":"The OEM ENLW key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemBackTab","kind":"enum value","name":"OemBackTab","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemBackTab;","python":"Key.OemBackTab","summary":"The OEM BACKTAB key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Attn","kind":"enum value","name":"Attn","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Attn;","python":"Key.Attn","summary":"The ATTN key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.CrSel","kind":"enum value","name":"CrSel","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.CrSel;","python":"Key.CrSel","summary":"The CRSEL key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.ExSel","kind":"enum value","name":"ExSel","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.ExSel;","python":"Key.ExSel","summary":"The EXSEL key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.EraseEof","kind":"enum value","name":"EraseEof","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.EraseEof;","python":"Key.EraseEof","summary":"The ERASE EOF key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Play","kind":"enum value","name":"Play","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Play;","python":"Key.Play","summary":"The PLAY key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Zoom","kind":"enum value","name":"Zoom","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Zoom;","python":"Key.Zoom","summary":"The ZOOM key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.NoName","kind":"enum value","name":"NoName","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.NoName;","python":"Key.NoName","summary":"A constant reserved for future use.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.Pa1","kind":"enum value","name":"Pa1","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.Pa1;","python":"Key.Pa1","summary":"The PA1 key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.OemClear","kind":"enum value","name":"OemClear","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.OemClear;","python":"Key.OemClear","summary":"The OEM Clear key.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Key.DeadCharProcessed","kind":"enum value","name":"DeadCharProcessed","type":"T:cAlgo.API.Key","namespace":"cAlgo.API","group":"Utility","csharp":"Key.DeadCharProcessed;","python":"Key.DeadCharProcessed","summary":"The key is used with another key to create a single combined character.","remarks":null,"parameters":[],"returns":{"csharpType":"Key","pythonType":"Key","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/Key/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Language","kind":"interface","name":"Language","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public interface Language","python":"Language","summary":"Represents the application language.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var language = Application.Language;\nPrint(\"Language: {0} | Culture: {1}\", language.TwoLetterCode, language.CultureName);","python":"language = api.Application.Language\napi.Print(f\"Language: {language.TwoLetterCode} | Culture: {language.CultureName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Language/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Language/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Language.CultureName","kind":"property","name":"CultureName","type":"T:cAlgo.API.Language","namespace":"cAlgo.API","group":"Application","csharp":"string CultureName {get;}","python":"language.CultureName: str","summary":"Gets the culture name of the language.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var culture = new System.Globalization.CultureInfo(Application.Language.CultureName);\nPrint(\"Balance: {0}\", Account.Balance.ToString(\"N2\", culture));","python":"from System.Globalization import CultureInfo\n\nculture = CultureInfo(api.Application.Language.CultureName)\napi.Print(f\"Culture: {culture.DisplayName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Language/CultureName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Language/CultureName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Language.TwoLetterCode","kind":"property","name":"TwoLetterCode","type":"T:cAlgo.API.Language","namespace":"cAlgo.API","group":"Application","csharp":"string TwoLetterCode {get;}","python":"language.TwoLetterCode: str","summary":"Gets the two-letter code of the language.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var message = Application.Language.TwoLetterCode == \"de\" ? \"Willkommen\" : \"Welcome\";\nPrint(message);","python":"message = \"Willkommen\" if api.Application.Language.TwoLetterCode == \"de\" else \"Welcome\"\napi.Print(message)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/Language/TwoLetterCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/Language/TwoLetterCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.LanguageChangedEventArgs","kind":"class","name":"LanguageChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class LanguageChangedEventArgs","python":"LanguageChangedEventArgs","summary":"Provides data for the language changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.LanguageChanged += OnLanguageChanged;\n}\n\nprivate void OnLanguageChanged(LanguageChangedEventArgs args)\n{\n    Print(\"Platform language changed to {0}\", args.Language.CultureName);\n}","python":"def on_start(self):\n    api.Application.LanguageChanged += self.on_language_changed\n\ndef on_language_changed(self, args):\n    api.Print(f\"Platform language changed to {args.Language.CultureName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/LanguageChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/LanguageChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.LanguageChangedEventArgs.Language","kind":"property","name":"Language","type":"T:cAlgo.API.LanguageChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Language Language {get;}","python":"languageChangedEventArgs.Language: Language","summary":"Gets the language.","remarks":null,"parameters":[],"returns":{"csharpType":"Language","pythonType":"Language","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.LanguageChanged += OnLanguageChanged;\n}\n\nprivate void OnLanguageChanged(LanguageChangedEventArgs args)\n{\n    var buttonText = args.Language.CultureName.StartsWith(\"es\") ? \"Comprar\" : \"Buy\";\n    Print(\"Using button text: {0}\", buttonText);\n}","python":"def on_start(self):\n    api.Application.LanguageChanged += self.on_language_changed\n\ndef on_language_changed(self, args):\n    button_text = \"Comprar\" if args.Language.CultureName.startswith(\"es\") else \"Buy\"\n    api.Print(f\"Using button text: {button_text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/LanguageChangedEventArgs/Language/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/LanguageChangedEventArgs/Language/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.LevelsAttribute","kind":"class","name":"LevelsAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class LevelsAttribute : Attribute","python":"LevelsAttribute","summary":"Levels Attribute. Applies metadata to enable the plot of level lines.","remarks":"Represents level lines. It is commonly used in Oscillators, for instance to add a zero line. C# and Python indicators declare their levels the same way, with the Levels entry of config.json.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    // This sample indicator sets levels on its outputs with the Levels entry of config.json\n    public partial class LevelsSample : Indicator\n    {\n        private RelativeStrengthIndex _rsi;\n\n        protected override void Initialize()\n        {\n            _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n        }\n\n        public override void Calculate(int index)\n        {\n            Result[index] = _rsi.Result[index];\n        }\n    }\n}","python":"class LevelsSample():\n    def initialize(self):\n        self.rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        api.Result[index] = self.rsi.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ],\n  \"Levels\": [\n    30,\n    70\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.LevelsAttribute.#ctor(System.Double[])","kind":"constructor","name":"LevelsAttribute","type":"T:cAlgo.API.LevelsAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public LevelsAttribute(double[] levels)","python":"LevelsAttribute(levels: list[float])","summary":"Initializes a new LevelsAttribute instance","remarks":"Draws level (horizontal) lines at a fixed position when the plot is on the indicator panel below the chart. To make it effective apply enclosed in square brackets, e.g. [Levels(0)], before the Indicator atribute declaration.","parameters":[{"name":"levels","csharpType":"double[]","pythonType":"list[float]","summary":"The price values that the level lines are representing"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class MomentumSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index] - Bars.ClosePrices[index - 10];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index] - api.Bars.ClosePrices[index - 10]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ],\n  \"Levels\": [\n    0\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.LevelsAttribute.Levels","kind":"property","name":"Levels","type":"T:cAlgo.API.LevelsAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public double[] Levels {get; set;}","python":"levelsAttribute.Levels: list[float]","summary":"The array of price values that are ploted as level lines","remarks":null,"parameters":[],"returns":{"csharpType":"double[]","pythonType":"list[float]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class StochasticLevelsSample : Indicator\n{\n    private StochasticOscillator _stochastic;\n\n    protected override void Initialize()\n    {\n        _stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\n    }\n\n    public override void Calculate(int index)\n    {\n        Result[index] = _stochastic.PercentK[index];\n    }\n}","python":"class StochasticLevelsSample():\n    def initialize(self):\n        self.stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        api.Result[index] = self.stochastic.PercentK[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ],\n  \"Levels\": [\n    20.0,\n    50.0,\n    80.5\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/Levels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/LevelsAttribute/Levels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.LeverageTier","kind":"interface","name":"LeverageTier","type":null,"namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"public interface LeverageTier","python":"LeverageTier","summary":"Tier of dynamic leverage.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.DynamicLeverage.Count > 0)\n{\n    var firstTier = Symbol.DynamicLeverage[0];\n    Print(\"Leverage for volume up to {0} is {1}\", firstTier.Volume, firstTier.Leverage);\n}","python":"if api.Symbol.DynamicLeverage.Count > 0:\n    firstTier = api.Symbol.DynamicLeverage[0]\n    api.Print(f\"Leverage for volume up to {firstTier.Volume} is {firstTier.Leverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.LeverageTier.Leverage","kind":"property","name":"Leverage","type":"T:cAlgo.API.Internals.LeverageTier","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Leverage {get;}","python":"leverageTier.Leverage: float","summary":"Leverage of dynamic leverage tier.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var tier in Symbol.DynamicLeverage)\n    Print(\"Up to {0}: leverage 1:{1}\", tier.Volume, tier.Leverage);","python":"for tier in api.Symbol.DynamicLeverage:\n    api.Print(f\"Up to {tier.Volume}: leverage 1:{tier.Leverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/Leverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/Leverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.LeverageTier.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.Internals.LeverageTier","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Volume {get;}","python":"leverageTier.Volume: float","summary":"Volume of dynamic leverage tier.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var tier in Symbol.DynamicLeverage)\n    Print(\"Tier volume limit: {0}\", tier.Volume);","python":"for tier in api.Symbol.DynamicLeverage:\n    api.Print(f\"Tier volume limit: {tier.Volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/LeverageTier/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Line","kind":"class","name":"Line","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Line : Shape","python":"Line","summary":"Represents the line shape.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to draw a line shape on your chart\n    public partial class LineShapeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var xCenter = Chart.Width / 2;\n            var yCenter = Chart.Height / 2;\n\n            var line = new Line\n            {\n                X1 = xCenter,\n                X2 = xCenter + 100,\n                Y1 = yCenter,\n                Y2 = yCenter + 100,\n                StrokeColor = Color.Red,\n                StrokeThickness = 2\n            };\n\n            Chart.AddControl(line);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        xCenter = api.Chart.Width / 2\n        yCenter = api.Chart.Height / 2\n\n        line = Line()\n        line.X1 = xCenter\n        line.X2 = xCenter + 100\n        line.Y1 = yCenter\n        line.Y2 = yCenter + 100\n        line.StrokeColor = Color.Red\n        line.StrokeThickness = 2\n\n        api.Chart.AddControl(line)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Line.#ctor","kind":"constructor","name":"Line","type":"T:cAlgo.API.Line","namespace":"cAlgo.API","group":"Shapes","csharp":"public Line()","python":"Line()","summary":"Initializes a new instance of the Line class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 10, Y1 = 10, X2 = 200, Y2 = 10, StrokeColor = Color.Yellow, StrokeThickness = 2 };\nvar canvas = new Canvas();\ncanvas.AddChild(line);\nChart.AddControl(canvas);","python":"line = Line()\nline.X1 = 10\nline.Y1 = 10\nline.X2 = 200\nline.Y2 = 10\nline.StrokeColor = Color.Yellow\nline.StrokeThickness = 2\ncanvas = Canvas()\ncanvas.AddChild(line)\napi.Chart.AddControl(canvas)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Line.X1","kind":"property","name":"X1","type":"T:cAlgo.API.Line","namespace":"cAlgo.API","group":"Shapes","csharp":"public double X1 {get; set;}","python":"line.X1: float","summary":"Gets or sets x-axis point 1 data.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 20, Y1 = 50, X2 = 220, Y2 = 50, StrokeColor = Color.Red };\nChart.AddControl(line);\nPrint(\"Line starts at x: {0}\", line.X1);","python":"line = Line()\nline.X1 = 20\nline.Y1 = 50\nline.X2 = 220\nline.Y2 = 50\nline.StrokeColor = Color.Red\napi.Chart.AddControl(line)\napi.Print(f\"Line starts at x: {line.X1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/X1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/X1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Line.X2","kind":"property","name":"X2","type":"T:cAlgo.API.Line","namespace":"cAlgo.API","group":"Shapes","csharp":"public double X2 {get; set;}","python":"line.X2: float","summary":"Gets or sets the x-axis point 2 data.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 20, Y1 = 100, X2 = 300, Y2 = 100, StrokeColor = Color.Gray };\nline.X2 = Chart.Width / 2;\nChart.AddControl(line);\nPrint(\"Line ends at x: {0}\", line.X2);","python":"line = Line()\nline.X1 = 20\nline.Y1 = 100\nline.X2 = api.Chart.Width / 2\nline.Y2 = 100\nline.StrokeColor = Color.Gray\napi.Chart.AddControl(line)\napi.Print(f\"Line ends at x: {line.X2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/X2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/X2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Line.Y1","kind":"property","name":"Y1","type":"T:cAlgo.API.Line","namespace":"cAlgo.API","group":"Shapes","csharp":"public double Y1 {get; set;}","python":"line.Y1: float","summary":"Gets or sets the y-axis point 2 data.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 50, Y1 = 20, X2 = 50, Y2 = 220, StrokeColor = Color.Red };\nChart.AddControl(line);\nPrint(\"Line starts at y: {0}\", line.Y1);","python":"line = Line()\nline.X1 = 50\nline.Y1 = 20\nline.X2 = 50\nline.Y2 = 220\nline.StrokeColor = Color.Red\napi.Chart.AddControl(line)\napi.Print(f\"Line starts at y: {line.Y1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Y1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Y1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Line.Y2","kind":"property","name":"Y2","type":"T:cAlgo.API.Line","namespace":"cAlgo.API","group":"Shapes","csharp":"public double Y2 {get; set;}","python":"line.Y2: float","summary":"Gets or sets the y-axis point 2 data.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 100, Y1 = 20, X2 = 100, Y2 = 300, StrokeColor = Color.Gray };\nline.Y2 = Chart.Height / 2;\nChart.AddControl(line);\nPrint(\"Line ends at y: {0}\", line.Y2);","python":"line = Line()\nline.X1 = 100\nline.Y1 = 20\nline.X2 = 100\nline.Y2 = api.Chart.Height / 2\nline.StrokeColor = Color.Gray\napi.Chart.AddControl(line)\napi.Print(f\"Line ends at y: {line.Y2}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Y2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/Y2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.LineStackingStrategy","kind":"enum","name":"LineStackingStrategy","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum LineStackingStrategy","python":"LineStackingStrategy","summary":"Describes a mechanism by which a line box is determined for each line.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Text;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use different Line Stacking Strategies on a TextBlock\n    public partial class LineStackingStrategySample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                Orientation = Orientation.Vertical,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            var stringBuilder = new StringBuilder();\n\n            stringBuilder.AppendLine(\"First line of text\");\n            stringBuilder.AppendLine(\"Second line of text\");\n            stringBuilder.AppendLine(\"Third line of text\");\n            stringBuilder.AppendLine(\"Fourth line of text\");\n            stringBuilder.AppendLine(\"Fifth line of text\");\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Margin = 5,\n                Text = \"LineStackingStrategy = BlockLineHeight:\\n\" + stringBuilder.ToString(),\n                LineStackingStrategy = LineStackingStrategy.BlockLineHeight,\n                FontWeight = FontWeight.Bold,\n                ForegroundColor = Color.Black\n            });\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Margin = 5,\n                Text = \"LineStackingStrategy = MaxHeight:\\n\" + stringBuilder.ToString(),\n                LineStackingStrategy = LineStackingStrategy.MaxHeight,\n                FontWeight = FontWeight.Bold,\n                ForegroundColor = Color.Black\n            });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text, lineStackingStrategy):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.FontWeight = FontWeight.Bold\n        textBlock.ForegroundColor = Color.Black\n        textBlock.Margin = Thickness(5)\n        textBlock.LineStackingStrategy = lineStackingStrategy\n        return textBlock\n\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.Orientation = Orientation.Vertical\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.6\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n\n        lines = \"\"\"\n        First line of text\n        Second line of text\n        Third line of text\n        Fourth line of text\n        Fifth line of text\"\"\"\n\n        stackPanel.AddChild(self.get_text_block(f\"LineStackingStrategy = BlockLineHeight:\\n{lines}\", LineStackingStrategy.BlockLineHeight))\n        stackPanel.AddChild(self.get_text_block(f\"LineStackingStrategy = MaxHeight:\\n{lines}\", LineStackingStrategy.MaxHeight))\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStackingStrategy.BlockLineHeight","kind":"enum value","name":"BlockLineHeight","type":"T:cAlgo.API.LineStackingStrategy","namespace":"cAlgo.API","group":"Controls","csharp":"LineStackingStrategy.BlockLineHeight;","python":"LineStackingStrategy.BlockLineHeight","summary":"The stack height is determined by the block element line-height property value.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStackingStrategy","pythonType":"LineStackingStrategy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStackingStrategy.MaxHeight","kind":"enum value","name":"MaxHeight","type":"T:cAlgo.API.LineStackingStrategy","namespace":"cAlgo.API","group":"Controls","csharp":"LineStackingStrategy.MaxHeight;","python":"LineStackingStrategy.MaxHeight","summary":"The stack height is the smallest value that containing all the inline elements on that line when those elements are properly aligned.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStackingStrategy","pythonType":"LineStackingStrategy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/LineStackingStrategy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.LineStyle","kind":"enum","name":"LineStyle","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum LineStyle","python":"LineStyle","summary":"An enumeration of different stroke styles used to render lines.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use different line styles\n    public partial class LineStyleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.DrawVerticalLine(\"Dots\", Chart.LastVisibleBarIndex, Color.Red, 3, LineStyle.Dots);\n            Chart.DrawVerticalLine(\"DotsRare\", Chart.LastVisibleBarIndex - 2, Color.Yellow, 3, LineStyle.DotsRare);\n            Chart.DrawVerticalLine(\"DotsVeryRare\", Chart.LastVisibleBarIndex - 4, Color.Green, 3, LineStyle.DotsVeryRare);\n            Chart.DrawVerticalLine(\"Lines\", Chart.LastVisibleBarIndex - 6, Color.Blue, 3, LineStyle.Lines);\n            Chart.DrawVerticalLine(\"LinesDots\", Chart.LastVisibleBarIndex - 8, Color.Magenta, 3, LineStyle.LinesDots);\n            Chart.DrawVerticalLine(\"Solid\", Chart.LastVisibleBarIndex - 10, Color.Brown, 3, LineStyle.Solid);\n        }\n\n        public override void Calculate(int index)\n        {\n            Result[index] = Bars.ClosePrices[index];\n        }\n    }\n}","python":"class LineStyleSample():\n    def initialize(self):\n        api.Chart.DrawVerticalLine(\"Dots\", api.Chart.LastVisibleBarIndex, Color.Red, 3, LineStyle.Dots)\n        api.Chart.DrawVerticalLine(\"DotsRare\", api.Chart.LastVisibleBarIndex - 2, Color.Yellow, 3, LineStyle.DotsRare)\n        api.Chart.DrawVerticalLine(\"DotsVeryRare\", api.Chart.LastVisibleBarIndex - 4, Color.Green, 3, LineStyle.DotsVeryRare)\n        api.Chart.DrawVerticalLine(\"Lines\", api.Chart.LastVisibleBarIndex - 6, Color.Blue, 3, LineStyle.Lines)\n        api.Chart.DrawVerticalLine(\"LinesDots\", api.Chart.LastVisibleBarIndex - 8, Color.Magenta, 3, LineStyle.LinesDots)\n        api.Chart.DrawVerticalLine(\"Solid\", api.Chart.LastVisibleBarIndex - 10, Color.Brown, 3, LineStyle.Solid)\n\n    def calculate(self, index):\n        api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"Red\",\n      \"Style\": \"Dots\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.Solid","kind":"enum value","name":"Solid","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.Solid;","python":"LineStyle.Solid","summary":"A solid line: -----","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"solid\", Bars.ClosePrices.LastValue, Color.Red, 2, LineStyle.Solid);","python":"api.Chart.DrawHorizontalLine(\"solid\", api.Bars.ClosePrices.LastValue, Color.Red, 2, LineStyle.Solid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.Dots","kind":"enum value","name":"Dots","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.Dots;","python":"LineStyle.Dots","summary":"A dotted line: .....","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"dots\", Bars.HighPrices.LastValue, Color.Green, 2, LineStyle.Dots);","python":"api.Chart.DrawHorizontalLine(\"dots\", api.Bars.HighPrices.LastValue, Color.Green, 2, LineStyle.Dots)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.DotsRare","kind":"enum value","name":"DotsRare","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.DotsRare;","python":"LineStyle.DotsRare","summary":"A dotted line, large gap between dots: . . . .","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"dotsRare\", Bars.LowPrices.LastValue, Color.Blue, 2, LineStyle.DotsRare);","python":"api.Chart.DrawHorizontalLine(\"dotsRare\", api.Bars.LowPrices.LastValue, Color.Blue, 2, LineStyle.DotsRare)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.DotsVeryRare","kind":"enum value","name":"DotsVeryRare","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.DotsVeryRare;","python":"LineStyle.DotsVeryRare","summary":"A dotted line, extra large gap between dots: . . . .","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"dotsVeryRare\", Bars.OpenPrices.LastValue, Color.Gray, 2, LineStyle.DotsVeryRare);","python":"api.Chart.DrawHorizontalLine(\"dotsVeryRare\", api.Bars.OpenPrices.LastValue, Color.Gray, 2, LineStyle.DotsVeryRare)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.LinesDots","kind":"enum value","name":"LinesDots","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.LinesDots;","python":"LineStyle.LinesDots","summary":"A mixed line / dot style is used to render the line: - . - . - .","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawVerticalLine(\"linesDots\", Bars.OpenTimes.LastValue, Color.Orange, 2, LineStyle.LinesDots);","python":"api.Chart.DrawVerticalLine(\"linesDots\", api.Bars.OpenTimes.LastValue, Color.Orange, 2, LineStyle.LinesDots)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LineStyle.Lines","kind":"enum value","name":"Lines","type":"T:cAlgo.API.LineStyle","namespace":"cAlgo.API","group":"Chart","csharp":"LineStyle.Lines;","python":"LineStyle.Lines","summary":"Lines with gaps are used to render the line: - - - -","remarks":null,"parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawHorizontalLine(\"lines\", Bars.ClosePrices.LastValue, Color.Yellow, 1, LineStyle.Lines);","python":"api.Chart.DrawHorizontalLine(\"lines\", api.Bars.ClosePrices.LastValue, Color.Yellow, 1, LineStyle.Lines)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.LinearRegressionForecast","kind":"interface","name":"LinearRegressionForecast","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface LinearRegressionForecast","python":"LinearRegressionForecast","summary":"Linear Regression Forecast is one of the indicators calculated by the Linear Regression approach.","remarks":"The Linear Regression Forecast is used for identifying trends and trend direction, and shows the statistical trend of a financial instrument over a specified time period. The calculation uses a Linear Regression Line.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private LinearRegressionForecast _linearRegressionForecast;\n\nprotected override void Initialize()\n{\n    // initialize a new instance of LinearRegressionForecastIndicator class\n    _linearRegressionForecast = Indicators.LinearRegressionForecast(Bars.ClosePrices, Period);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.linearRegressionForecast = api.Indicators.LinearRegressionForecast(api.Bars.ClosePrices, api.Period)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Linear Regression Forecast indicator\n    public partial class LinearRegressionForecastSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private LinearRegressionForecast _linearRegressionForecast;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _linearRegressionForecast = Indicators.LinearRegressionForecast(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _linearRegressionForecast.Result.Last(1) && Bars.ClosePrices.Last(2) <= _linearRegressionForecast.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _linearRegressionForecast.Result.Last(1) && Bars.ClosePrices.Last(2) >= _linearRegressionForecast.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass LinearRegressionForecastSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.linearRegressionForecast = api.Indicators.LinearRegressionForecast(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.linearRegressionForecast.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.linearRegressionForecast.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.linearRegressionForecast.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.linearRegressionForecast.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionForecast/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionForecast/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.LinearRegressionForecast.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.LinearRegressionForecast","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"linearRegressionForecast.Result: IndicatorDataSeries","summary":"The Result Series of the Linear Regression Forecast Indicator","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var linearRegressionForecast = Indicators.LinearRegressionForecast(Bars.ClosePrices, 14);\nPrint(\"Linear Regression Forecast of the last closed bar = {0}\", linearRegressionForecast.Result.Last(1));","python":"linearRegressionForecast = api.Indicators.LinearRegressionForecast(api.Bars.ClosePrices, 14)\napi.Print(f\"Linear Regression Forecast of the last closed bar = {linearRegressionForecast.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionForecast/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionForecast/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.LinearRegressionIntercept","kind":"interface","name":"LinearRegressionIntercept","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface LinearRegressionIntercept","python":"LinearRegressionIntercept","summary":"Linear Regression Intercept is one of the indicators calculated by the Linear Regression approach.","remarks":"Linear regression is a statistical tool used to predict the future from past data.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private LinearRegressionIntercept _linearRegressionIntercept;\n\nprotected override void OnStart()\n{\n    // initialize a new instance of LinearRegressionIntercept indicator class\n    _linearRegressionIntercept = Indicators.LinearRegressionIntercept(Bars.ClosePrices, Period);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.linearRegressionIntercept = api.Indicators.LinearRegressionIntercept(api.Bars.ClosePrices, api.Period)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Linear Regression Intercept indicator\n    public partial class LinearRegressionInterceptSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private LinearRegressionIntercept _linearRegressionIntercept;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _linearRegressionIntercept = Indicators.LinearRegressionIntercept(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _linearRegressionIntercept.Result.Last(1) && Bars.ClosePrices.Last(2) <= _linearRegressionIntercept.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _linearRegressionIntercept.Result.Last(1) && Bars.ClosePrices.Last(2) >= _linearRegressionIntercept.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass LinearRegressionInterceptSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.linearRegressionIntercept = api.Indicators.LinearRegressionIntercept(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.linearRegressionIntercept.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.linearRegressionIntercept.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.linearRegressionIntercept.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.linearRegressionIntercept.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionIntercept/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionIntercept/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.LinearRegressionIntercept.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.LinearRegressionIntercept","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"linearRegressionIntercept.Result: IndicatorDataSeries","summary":"The Result Series of the Linear Regression Intercept Indicator","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var linearRegressionIntercept = Indicators.LinearRegressionIntercept(Bars.ClosePrices, 14);\nvar result = linearRegressionIntercept.Result.Last(1);\nPrint(\"Linear Regression Intercept of the last closed bar is = {0}\", result);","python":"linearRegressionIntercept = api.Indicators.LinearRegressionIntercept(api.Bars.ClosePrices, 14)\nresult = linearRegressionIntercept.Result.Last(1)\napi.Print(f\"Linear Regression Intercept of the last closed bar is = {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionIntercept/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionIntercept/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.LinearRegressionRSquared","kind":"interface","name":"LinearRegressionRSquared","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface LinearRegressionRSquared","python":"LinearRegressionRSquared","summary":"The Linear Regression R Squared is used to confirm the strength of the market trend.","remarks":"A higher value of R-Squared means that the stronger the trend.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private LinearRegressionRSquared rSquared;\n\nprotected override void OnStart()\n{\n    // initialize rSquared indicator\n    rSquared = Indicators.LinearRegressionRSquared(Bars.ClosePrices, 20);\n}\nprotected override void OnTick()\n{\n    Print(\"{0}\", rSquared.Result.LastValue);\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        # Initialize rSquared indicator\n        self.rSquared = api.Indicators.LinearRegressionRSquared(api.Bars.ClosePrices, 20)\n\n    def on_tick(self):\n        api.Print(f\"{self.rSquared.Result.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Linear Regression R Squared indicator\n    public partial class LinearRegressionRSquaredSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private LinearRegressionRSquared _linearRegressionRSquared;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        private ExponentialMovingAverage _exponentialMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _linearRegressionRSquared = Indicators.LinearRegressionRSquared(Bars.ClosePrices, 20);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_linearRegressionRSquared.Result, 10);\n\n            _exponentialMovingAverage = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _exponentialMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) <= _exponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (_linearRegressionRSquared.Result.Last(1) > _simpleMovingAverage.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _exponentialMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) >= _exponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (_linearRegressionRSquared.Result.Last(1) > _simpleMovingAverage.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass LinearRegressionRSquaredSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.linearRegressionRSquared = api.Indicators.LinearRegressionRSquared(api.Bars.ClosePrices, 20)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.linearRegressionRSquared.Result, 10)\n        self.exponentialMovingAverage = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.exponentialMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.exponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            if self.linearRegressionRSquared.Result.Last(0) > self.simpleMovingAverage.Result.Last(0):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.exponentialMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.exponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            if self.linearRegressionRSquared.Result.Last(0) > self.simpleMovingAverage.Result.Last(0):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionRSquared/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionRSquared/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.LinearRegressionRSquared.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.LinearRegressionRSquared","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"linearRegressionRSquared.Result: IndicatorDataSeries","summary":"The Result Series of the Linear Regression R Squared indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private LinearRegressionRSquared rSquared;\n\nprotected override void OnStart()\n{\n    // initialize rSquared indicator\n    rSquared = Indicators.LinearRegressionRSquared(Bars.ClosePrices, 9);\n}\nprotected override void OnTick()\n{\n    // Print the last value of rSquared indicator to the log\n    Print(\"The current value of R Squared is {0}\", rSquared.Result.LastValue);\n}","python":"def on_start(self):\n    # initialize rSquared indicator\n    self.rSquared = api.Indicators.LinearRegressionRSquared(api.Bars.ClosePrices, 9)\n\ndef on_tick(self):\n    # Print the last value of rSquared indicator to the log\n    api.Print(f\"The current value of R Squared is {self.rSquared.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionRSquared/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionRSquared/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.LinearRegressionSlope","kind":"interface","name":"LinearRegressionSlope","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface LinearRegressionSlope","python":"LinearRegressionSlope","summary":"The calculation of the Linear Regression Slope Indicator.","remarks":"Linear Regression Slope refers to the slope of the Least Squares Line. This slope represents how prices change per unit of time.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private LinearRegressionSlope _lrSlope;\nprotected override void Initialize()\n{\n    _lrSlope = Indicators.LinearRegressionSlope(Bars.ClosePrices, 14);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.linearRegressionSlope = api.Indicators.LinearRegressionSlope(api.Bars.ClosePrices, 14)"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Linear Regression Slope indicator\n    public partial class LinearRegressionSlopeSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private LinearRegressionSlope _linearRegressionSlope;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        private ExponentialMovingAverage _exponentialMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _linearRegressionSlope = Indicators.LinearRegressionSlope(Bars.ClosePrices, 20);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_linearRegressionSlope.Result, 10);\n\n            _exponentialMovingAverage = Indicators.ExponentialMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _exponentialMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) <= _exponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (_linearRegressionSlope.Result.Last(1) > _simpleMovingAverage.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _exponentialMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) >= _exponentialMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (_linearRegressionSlope.Result.Last(1) > _simpleMovingAverage.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass LinearRegressionSlopeSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.linearRegressionSlope = api.Indicators.LinearRegressionSlope(api.Bars.ClosePrices, 20)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.linearRegressionSlope.Result, 10)\n        self.exponentialMovingAverage = api.Indicators.ExponentialMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.exponentialMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.exponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            if self.linearRegressionSlope.Result.Last(0) > self.simpleMovingAverage.Result.Last(0):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.exponentialMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.exponentialMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            if self.linearRegressionSlope.Result.Last(0) > self.simpleMovingAverage.Result.Last(0):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionSlope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionSlope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.LinearRegressionSlope.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.LinearRegressionSlope","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"linearRegressionSlope.Result: IndicatorDataSeries","summary":"The resulting time series of the calculation of the Linear Regression Slope indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var linearRegressionSlope = Indicators.LinearRegressionSlope(Bars.ClosePrices, 14);\nvar slope = linearRegressionSlope.Result.Last(1);\nPrint(\"The trend is {0}, slope: {1}\", slope > 0 ? \"rising\" : \"falling\", slope);","python":"linearRegressionSlope = api.Indicators.LinearRegressionSlope(api.Bars.ClosePrices, 14)\nslope = linearRegressionSlope.Result.Last(1)\napi.Print(f\"The trend is {'rising' if slope > 0 else 'falling'}, slope: {slope}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionSlope/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/LinearRegressionSlope/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.LinkedChartGroup","kind":"enum","name":"LinkedChartGroup","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum LinkedChartGroup","python":"LinkedChartGroup","summary":"Represents the predefined chart linked groups.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var eurUsdFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nvar gbpUsdFrame = ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour);\neurUsdFrame.LinkedChartGroup = LinkedChartGroup.A;\ngbpUsdFrame.LinkedChartGroup = LinkedChartGroup.A;","python":"eurUsdFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\ngbpUsdFrame = api.ChartManager.AddChartFrame(\"GBPUSD\", TimeFrame.Hour)\neurUsdFrame.LinkedChartGroup = LinkedChartGroup.A\ngbpUsdFrame.LinkedChartGroup = LinkedChartGroup.A"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.None","kind":"enum value","name":"None","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.None;","python":"LinkedChartGroup.None","summary":"No Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.A","kind":"enum value","name":"A","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.A;","python":"LinkedChartGroup.A","summary":"A Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.B","kind":"enum value","name":"B","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.B;","python":"LinkedChartGroup.B","summary":"B Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.C","kind":"enum value","name":"C","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.C;","python":"LinkedChartGroup.C","summary":"C Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.D","kind":"enum value","name":"D","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.D;","python":"LinkedChartGroup.D","summary":"D Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.E","kind":"enum value","name":"E","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.E;","python":"LinkedChartGroup.E","summary":"E Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.F","kind":"enum value","name":"F","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.F;","python":"LinkedChartGroup.F","summary":"F Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.G","kind":"enum value","name":"G","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.G;","python":"LinkedChartGroup.G","summary":"G Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.LinkedChartGroup.H","kind":"enum value","name":"H","type":"T:cAlgo.API.LinkedChartGroup","namespace":"cAlgo.API","group":"Chart","csharp":"LinkedChartGroup.H;","python":"LinkedChartGroup.H","summary":"H Group.","remarks":null,"parameters":[],"returns":{"csharpType":"LinkedChartGroup","pythonType":"LinkedChartGroup","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/LinkedChartGroup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.LocalStorage","kind":"interface","name":"LocalStorage","type":null,"namespace":"cAlgo.API","group":"Local storage","csharp":"public interface LocalStorage","python":"LocalStorage","summary":"Represents the local storage API.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        const string key = \"Key\";\n        const string expectedData = \"Data\";\n\n        LocalStorage.SetString(\"Key\", expectedData);\n\n        Print($\"Actual Date: {LocalStorage.GetString(key)} | Expected Data: {expectedData}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        key = \"Key\"\n        expectedData = \"Data\"\n        api.LocalStorage.SetString(\"Key\", expectedData)\n        print(f\"Actual Date: {api.LocalStorage.GetString(key)} | Expected Data: {expectedData}\")","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    public record Point(double X, double Y);\n\n    protected override void OnStart()\n    {\n        const string key = \"Key\";\n\n        var expectedPoint = new Point(10, 12);\n\n        LocalStorage.SetObject(key, expectedPoint);\n\n        Print($\"Actual Point: {LocalStorage.GetObject<Point>(key)} | Expected Point: {expectedPoint}\");\n\n        LocalStorage.Remove(key);\n        LocalStorage.Flush(LocalStorageScope.Instance);\n\n        Print($\"Point After Remove: {LocalStorage.GetObject<Point>(key)}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        key = \"Key\"\n        expectedValue = 10.2\n        api.LocalStorage.SetObject(key, expectedValue)\n        print(f\"Actual: {api.LocalStorage.GetString(key)} | Expected: {expectedValue}\")\n        api.LocalStorage.Remove(key)\n        api.LocalStorage.Flush(LocalStorageScope.Instance)\n        print(f\"After Remove: {api.LocalStorage.GetString(key)}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.Flush(cAlgo.API.LocalStorageScope)","kind":"method","name":"Flush","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void Flush(LocalStorageScope localStorageScope)","python":"api.LocalStorage.Flush(localStorageScope: LocalStorageScope) -> None","summary":"Saves all data to the disk. When using local storage, data is automatically saved every minute. Use this method if you want to save data without delays.","remarks":null,"parameters":[{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope to save to disk"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\");\nLocalStorage.Flush(LocalStorageScope.Instance);\nPrint(\"Local storage saved to disk\");","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\")\napi.LocalStorage.Flush(LocalStorageScope.Instance)\napi.Print(\"Local storage saved to disk\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Flush/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Flush/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Does nothing and reports no error; data is not persisted."}]}
{"id":"M:cAlgo.API.LocalStorage.GetObject``1(System.String)","kind":"method","name":"GetObject","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"T GetObject(string key)","python":"api.LocalStorage.GetObject(key: str) -> T","summary":"Gets an object from local storage. This method will search all available scopes (Instance -> Type -> Device) and stops on first found value.","remarks":"As this method relies on .NET generics when using it in Python T must be a .NET type.","parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to get, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"}],"returns":{"csharpType":"T","pythonType":"T","summary":"The deserialized object or default value of type if the provided key is not found or the object cannot be deserialized","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetObject(\"Trades Count\", 5);\nvar tradesCount = LocalStorage.GetObject<int>(\"Trades Count\");\nPrint(\"Trades count: {0}\", tradesCount);","python":"from System import Int32\n\napi.LocalStorage.SetObject(\"Trades Count\", 5)\ntradesCount = api.LocalStorage.GetObject[Int32](\"Trades Count\")\napi.Print(f\"Trades count: {tradesCount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Key not set in this run returns default and sends LocalStorageException 'Getting local storage data from file is not supported in cloud environment.' to OnException."}]}
{"id":"M:cAlgo.API.LocalStorage.GetObject``1(System.String,cAlgo.API.LocalStorageScope)","kind":"method","name":"GetObject","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"T GetObject(string key, LocalStorageScope localStorageScope)","python":"api.LocalStorage.GetObject(key: str, localStorageScope: LocalStorageScope) -> T","summary":"Gets an object from local storage.","remarks":"As this method relies on .NET generics when using it in Python T must be a .NET type.","parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to get, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope of the element"}],"returns":{"csharpType":"T","pythonType":"T","summary":"The deserialized object or default value of type if the provided key is not found or the object cannot be deserialized","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetObject(\"Trades Count\", 5, LocalStorageScope.Type);\nvar tradesCount = LocalStorage.GetObject<int>(\"Trades Count\", LocalStorageScope.Type);\nPrint(\"Trades count across instances: {0}\", tradesCount);","python":"from System import Int32\n\napi.LocalStorage.SetObject(\"Trades Count\", 5, LocalStorageScope.Type)\ntradesCount = api.LocalStorage.GetObject[Int32](\"Trades Count\", LocalStorageScope.Type)\napi.Print(f\"Trades count across instances: {tradesCount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Key not set in this run returns default and sends LocalStorageException 'Getting local storage data from file is not supported in cloud environment.' to OnException."}]}
{"id":"M:cAlgo.API.LocalStorage.GetString(System.String)","kind":"method","name":"GetString","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"string GetString(string key)","python":"api.LocalStorage.GetString(key: str) -> str","summary":"Gets a string value from local storage. This method will search all available scopes (Instance -> Type -> Device) and stops on first found value.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to get, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"}],"returns":{"csharpType":"string","pythonType":"str","summary":"The requested value or an empty string if the provided key is not found","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastSignal = LocalStorage.GetString(\"Last Signal\");\nif (string.IsNullOrEmpty(lastSignal))\n    Print(\"No signal stored yet\");\nelse\n    Print(\"Last signal: {0}\", lastSignal);","python":"lastSignal = api.LocalStorage.GetString(\"Last Signal\")\nif not lastSignal:\n    api.Print(\"No signal stored yet\")\nelse:\n    api.Print(f\"Last signal: {lastSignal}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetString/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetString/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Key not set in this run returns null and sends LocalStorageException 'Getting local storage data from file is not supported in cloud environment.' to OnException."}]}
{"id":"M:cAlgo.API.LocalStorage.GetString(System.String,cAlgo.API.LocalStorageScope)","kind":"method","name":"GetString","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"string GetString(string key, LocalStorageScope localStorageScope)","python":"api.LocalStorage.GetString(key: str, localStorageScope: LocalStorageScope) -> str","summary":"Gets a string value from local storage.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to get, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope of the element"}],"returns":{"csharpType":"string","pythonType":"str","summary":"The requested value or an empty string if the provided key is not found","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastSignal = LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Device);\nPrint(\"Last signal on this device: {0}\", lastSignal);","python":"lastSignal = api.LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Device)\napi.Print(f\"Last signal on this device: {lastSignal}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetString/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/GetString/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Key not set in this run returns null and sends LocalStorageException 'Getting local storage data from file is not supported in cloud environment.' to OnException."}]}
{"id":"M:cAlgo.API.LocalStorage.Reload(cAlgo.API.LocalStorageScope)","kind":"method","name":"Reload","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void Reload(LocalStorageScope localStorageScope)","python":"api.LocalStorage.Reload(localStorageScope: LocalStorageScope) -> None","summary":"Reloads all values from the disk. When calling this method, unsaved pending changes may be lost. To avoid losing information, call the Flush() method first.","remarks":null,"parameters":[{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope to reload"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.Reload(LocalStorageScope.Device);\nPrint(\"Value saved by another instance: {0}\", LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Device));","python":"api.LocalStorage.Reload(LocalStorageScope.Device)\napi.Print(f\"Value saved by another instance: {api.LocalStorage.GetString('Last Signal', LocalStorageScope.Device)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Reload/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Reload/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Does nothing and reports no error; in-memory values are kept unchanged."}]}
{"id":"M:cAlgo.API.LocalStorage.Remove(System.String)","kind":"method","name":"Remove","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void Remove(string key)","python":"api.LocalStorage.Remove(key: str) -> None","summary":"Removes an element from local storage. This method will search all available scopes (Instance -> Type -> Device) and stops on first found value.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to remove, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\");\nLocalStorage.Remove(\"Last Signal\");\nPrint(\"After remove: '{0}'\", LocalStorage.GetString(\"Last Signal\"));","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\")\napi.LocalStorage.Remove(\"Last Signal\")\napi.Print(f\"After remove: '{api.LocalStorage.GetString('Last Signal')}'\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.Remove(System.String,cAlgo.API.LocalStorageScope)","kind":"method","name":"Remove","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void Remove(string key, LocalStorageScope localStorageScope)","python":"api.LocalStorage.Remove(key: str, localStorageScope: LocalStorageScope) -> None","summary":"Removes an element from local storage.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to remove, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope of the element"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Device);\nLocalStorage.Remove(\"Last Signal\", LocalStorageScope.Device);\nPrint(\"After remove: '{0}'\", LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Device));","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Device)\napi.LocalStorage.Remove(\"Last Signal\", LocalStorageScope.Device)\napi.Print(f\"After remove: '{api.LocalStorage.GetString('Last Signal', LocalStorageScope.Device)}'\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.SetObject(System.String,System.Object)","kind":"method","name":"SetObject","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void SetObject(string key, object obj)","python":"api.LocalStorage.SetObject(key: str, obj: object) -> None","summary":"Saves an object to local storage. The storage scope is LocalStorageScope.Instance.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to add, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"obj","csharpType":"object","pythonType":"object","summary":"The object of the element to add"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetObject(\"Last Price\", Symbol.Bid);\nPrint(\"Stored price: {0}\", LocalStorage.GetObject<double>(\"Last Price\"));","python":"from System import Double\n\napi.LocalStorage.SetObject(\"Last Price\", api.Symbol.Bid)\napi.Print(f\"Stored price: {api.LocalStorage.GetObject[Double]('Last Price')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.SetObject(System.String,System.Object,cAlgo.API.LocalStorageScope)","kind":"method","name":"SetObject","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void SetObject(string key, object obj, LocalStorageScope localStorageScope)","python":"api.LocalStorage.SetObject(key: str, obj: object, localStorageScope: LocalStorageScope) -> None","summary":"Saves an object to local storage.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to add, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"obj","csharpType":"object","pythonType":"object","summary":"The object of the element to add"},{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope of the element"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetObject(\"Last Price\", Symbol.Bid, LocalStorageScope.Device);\nPrint(\"Stored price: {0}\", LocalStorage.GetObject<double>(\"Last Price\", LocalStorageScope.Device));","python":"from System import Double\n\napi.LocalStorage.SetObject(\"Last Price\", api.Symbol.Bid, LocalStorageScope.Device)\napi.Print(f\"Stored price: {api.LocalStorage.GetObject[Double]('Last Price', LocalStorageScope.Device)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetObject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetObject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.SetString(System.String,System.String)","kind":"method","name":"SetString","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void SetString(string key, string value)","python":"api.LocalStorage.SetString(key: str, value: str) -> None","summary":"Saves a string value to local storage. The storage scope is LocalStorageScope.Instance.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to add, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"value","csharpType":"string","pythonType":"str","summary":"The value of the element to add"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\");\nPrint(\"Stored signal: {0}\", LocalStorage.GetString(\"Last Signal\"));","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\")\napi.Print(f\"Stored signal: {api.LocalStorage.GetString('Last Signal')}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetString/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetString/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"M:cAlgo.API.LocalStorage.SetString(System.String,System.String,cAlgo.API.LocalStorageScope)","kind":"method","name":"SetString","type":"T:cAlgo.API.LocalStorage","namespace":"cAlgo.API","group":"Local storage","csharp":"void SetString(string key, string value, LocalStorageScope localStorageScope)","python":"api.LocalStorage.SetString(key: str, value: str, localStorageScope: LocalStorageScope) -> None","summary":"Saves a string value to local storage.","remarks":null,"parameters":[{"name":"key","csharpType":"string","pythonType":"str","summary":"The key of the element to add, max length for keys is 50 characters, and only alphanumeric and space characters are allowed, you can only use space in the middle of key not at the start or end"},{"name":"value","csharpType":"string","pythonType":"str","summary":"The value of the element to add"},{"name":"localStorageScope","csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"The storage scope of the element"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Type);\nPrint(\"Shared with all instances: {0}\", LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Type));","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Type)\napi.Print(f\"Shared with all instances: {api.LocalStorage.GetString('Last Signal', LocalStorageScope.Type)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetString/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorage/SetString/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Values are kept in memory for the current run only; nothing is saved to or read from disk, and auto-flush is off."}]}
{"id":"T:cAlgo.API.LocalStorageException","kind":"class","name":"LocalStorageException","type":null,"namespace":"cAlgo.API","group":"Local storage","csharp":"public sealed class LocalStorageException : Exception","python":"LocalStorageException","summary":"Represents errors that occur during local storage operations. This exception will be passed to cBot / indicator OnException method.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    LocalStorage.SetString(\"Last Start\", Server.Time.ToString(\"O\"));\n}\n\nprotected override void OnException(Exception exception)\n{\n    if (exception is LocalStorageException)\n        Print(\"Local storage error: {0}\", exception.Message);\n}","python":"def on_start(self):\n    api.LocalStorage.SetString(\"Last Start\", api.Server.Time.ToString(\"O\"))\n\ndef on_exception(self, exception):\n    if isinstance(exception, LocalStorageException):\n        api.Print(f\"Local storage error: {exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageException/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.LocalStorageScope","kind":"enum","name":"LocalStorageScope","type":null,"namespace":"cAlgo.API","group":"Local storage","csharp":"public enum LocalStorageScope","python":"LocalStorageScope","summary":"Defines the local storage scope.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Device);\nPrint(\"Device scope value: {0}\", LocalStorage.GetString(\"Last Signal\", LocalStorageScope.Device));","python":"api.LocalStorage.SetString(\"Last Signal\", \"Buy EURUSD\", LocalStorageScope.Device)\napi.Print(f\"Device scope value: {api.LocalStorage.GetString('Last Signal', LocalStorageScope.Device)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LocalStorageScope.Instance","kind":"enum value","name":"Instance","type":"T:cAlgo.API.LocalStorageScope","namespace":"cAlgo.API","group":"Local storage","csharp":"LocalStorageScope.Instance;","python":"LocalStorageScope.Instance","summary":"The value is stored and can be accessed only by a specific running instance of a cBot/Indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LocalStorageScope.Type","kind":"enum value","name":"Type","type":"T:cAlgo.API.LocalStorageScope","namespace":"cAlgo.API","group":"Local storage","csharp":"LocalStorageScope.Type;","python":"LocalStorageScope.Type","summary":"The value is stored and can be accessed by all running instances of one or more cBot(s)/Indicator(s).","remarks":null,"parameters":[],"returns":{"csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.LocalStorageScope.Device","kind":"enum value","name":"Device","type":"T:cAlgo.API.LocalStorageScope","namespace":"cAlgo.API","group":"Local storage","csharp":"LocalStorageScope.Device;","python":"LocalStorageScope.Device","summary":"The value is stored and can be accessed by all running instances of a cBots/Indicators on this device.","remarks":null,"parameters":[],"returns":{"csharpType":"LocalStorageScope","pythonType":"LocalStorageScope","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/","markdown":"https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MacdCrossOver","kind":"interface","name":"MacdCrossOver","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MacdCrossOver","python":"MacdCrossOver","summary":"Calculates the MACD (Moving Average Convergence/Divergence) indicator.","remarks":"MACD (Moving Average Convergence/Divergence) is used to spot changes in the strength, direction, momentum, and duration of a trend.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate MacdCrossOver _macdCrossOver;\n\nprotected override void Initialize()\n{\n    _macdCrossOver = Indicators.MacdCrossOver(26, 12, 9);\n    //...\n}\n\npublic override void Calculate(int index)\n{\n    Macd[index] = _macdCrossOver.MACD[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 26, 12 and 9 are the long cycle, the short cycle and the signal periods\n        self.macdCrossOver = api.Indicators.MacdCrossOver(26, 12, 9)\n\n    def calculate(self, index):\n        api.Macd[index] = self.macdCrossOver.MACD[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Macd\",\n      \"DisplayName\": \"MACD\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the MACD Cross Over indicator\n    public partial class MacdCrossOverSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MacdCrossOver _macdCrossOver;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _macdCrossOver = Indicators.MacdCrossOver(Bars.ClosePrices, 26, 12, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_macdCrossOver.MACD.Last(1) > _macdCrossOver.Signal.Last(1) && _macdCrossOver.MACD.Last(2) <= _macdCrossOver.Signal.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_macdCrossOver.MACD.Last(1) < _macdCrossOver.Signal.Last(1) && _macdCrossOver.MACD.Last(2) >= _macdCrossOver.Signal.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MacdCrossOverSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.macdCrossOver = api.Indicators.MacdCrossOver(api.Bars.ClosePrices, 26, 12, 9)\n\n    def on_bar_closed(self):\n        if self.macdCrossOver.MACD.Last(0) > self.macdCrossOver.Signal.Last(0) and self.macdCrossOver.MACD.Last(1) <= self.macdCrossOver.Signal.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.macdCrossOver.MACD.Last(0) < self.macdCrossOver.Signal.Last(0) and self.macdCrossOver.MACD.Last(1) >= self.macdCrossOver.Signal.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MacdCrossOver.Histogram","kind":"property","name":"Histogram","type":"T:cAlgo.API.Indicators.MacdCrossOver","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Histogram {get;}","python":"macdCrossOver.Histogram: IndicatorDataSeries","summary":"Gets the Histogram (bar graph).","remarks":"The histogram of MACD: difference between the blue and red lines.","parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate MacdCrossOver _macdCrossOver;\n\nprotected override void Initialize()\n{\n    _macdCrossOver = Indicators.MacdCrossOver(26, 12, 9);\n}\n\npublic override void Calculate(int index)\n{\n    Histogram[index] = _macdCrossOver.Histogram[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 26, 12 and 9 are the long cycle, the short cycle and the signal periods\n        self.macdCrossOver = api.Indicators.MacdCrossOver(26, 12, 9)\n\n    def calculate(self, index):\n        api.Histogram[index] = self.macdCrossOver.Histogram[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Histogram\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/Histogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/Histogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MacdCrossOver.MACD","kind":"property","name":"MACD","type":"T:cAlgo.API.Indicators.MacdCrossOver","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries MACD {get;}","python":"macdCrossOver.MACD: IndicatorDataSeries","summary":"Gets the main MACD line (blue line).","remarks":"MACD line: difference between the 12 and 26 days EMAs","parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate MacdCrossOver _macdCrossOver;\n\nprotected override void Initialize()\n{\n    _macdCrossOver = Indicators.MacdCrossOver(26, 12, 9);\n}\n\npublic override void Calculate(int index)\n{\n    Macd[index] = _macdCrossOver.MACD[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 26, 12 and 9 are the long cycle, the short cycle and the signal periods\n        self.macdCrossOver = api.Indicators.MacdCrossOver(26, 12, 9)\n\n    def calculate(self, index):\n        api.Macd[index] = self.macdCrossOver.MACD[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Macd\",\n      \"DisplayName\": \"MACD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/MACD/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/MACD/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MacdCrossOver.Signal","kind":"property","name":"Signal","type":"T:cAlgo.API.Indicators.MacdCrossOver","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Signal {get;}","python":"macdCrossOver.Signal: IndicatorDataSeries","summary":"Gets the Signal line of MACD (red line).","remarks":"Signal: 9 day EMA of the blue line","parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate MacdCrossOver _macdCrossOver;\n\nprotected override void Initialize()\n{\n    _macdCrossOver = Indicators.MacdCrossOver(26, 12, 9);\n}\n\npublic override void Calculate(int index)\n{\n    Signal[index] = _macdCrossOver.Signal[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 26, 12 and 9 are the long cycle, the short cycle and the signal periods\n        self.macdCrossOver = api.Indicators.MacdCrossOver(26, 12, 9)\n\n    def calculate(self, index):\n        api.Signal[index] = self.macdCrossOver.Signal[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Signal\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/Signal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdCrossOver/Signal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MacdHistogram","kind":"interface","name":"MacdHistogram","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MacdHistogram","python":"MacdHistogram","summary":"The calculation of the MACD Histogram.","remarks":"MACD (moving average convergence/divergence) is used to spot changes in the strength, direction, momentum, and duration of a trend.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macd = Indicators.MacdHistogram(Bars.ClosePrices, 26, 12, 9);\nPrint(\"Histogram: {0}, Signal: {1}\", macd.Histogram.Last(1), macd.Signal.Last(1));","python":"macd = api.Indicators.MacdHistogram(api.Bars.ClosePrices, 26, 12, 9)\napi.Print(f\"Histogram: {macd.Histogram.Last(1)}, Signal: {macd.Signal.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the MACD Histogram indicator\n    public partial class MacdHistogramSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MacdHistogram _macdHistogram;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _macdHistogram = Indicators.MacdHistogram(Bars.ClosePrices, 26, 12, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_macdHistogram.Histogram.Last(1) > 0 && _macdHistogram.Histogram.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_macdHistogram.Histogram.Last(1) < 0 && _macdHistogram.Histogram.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MacdHistogramSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.macdHistogram = api.Indicators.MacdHistogram(api.Bars.ClosePrices, 26, 12, 9)\n\n    def on_bar_closed(self):\n        if self.macdHistogram.Histogram.Last(0) > 0 and self.macdHistogram.Histogram.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.macdHistogram.Histogram.Last(0) < 0 and self.macdHistogram.Histogram.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MacdHistogram.Histogram","kind":"property","name":"Histogram","type":"T:cAlgo.API.Indicators.MacdHistogram","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Histogram {get;}","python":"macdHistogram.Histogram: IndicatorDataSeries","summary":"The histogram (bar graph). The difference between the short and long cycles.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macd = Indicators.MacdHistogram(Bars.ClosePrices, 26, 12, 9);\nif (macd.Histogram.Last(1) > 0 && macd.Histogram.Last(2) <= 0)\n    Print(\"MACD histogram turned positive: {0}\", macd.Histogram.Last(1));","python":"macd = api.Indicators.MacdHistogram(api.Bars.ClosePrices, 26, 12, 9)\nif macd.Histogram.Last(1) > 0 and macd.Histogram.Last(2) <= 0:\n    api.Print(f\"MACD histogram turned positive: {macd.Histogram.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/Histogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/Histogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MacdHistogram.Signal","kind":"property","name":"Signal","type":"T:cAlgo.API.Indicators.MacdHistogram","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Signal {get;}","python":"macdHistogram.Signal: IndicatorDataSeries","summary":"The signal (red line). The exponential moving average of the MACD histogram.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var macd = Indicators.MacdHistogram(Bars.ClosePrices, 26, 12, 9);\nPrint(\"MACD signal line: {0}\", macd.Signal.Last(1));","python":"macd = api.Indicators.MacdHistogram(api.Bars.ClosePrices, 26, 12, 9)\napi.Print(f\"MACD signal line: {macd.Signal.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/Signal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdHistogram/Signal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MacdOscillatorMovingAverage","kind":"interface","name":"MacdOscillatorMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MacdOscillatorMovingAverage","python":"MacdOscillatorMovingAverage","summary":"The calculation of the Oscillator of a Moving Average over MACD.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MacdOscillatorMovingAverage _macdOsma;\n\nprotected override void OnStart()\n{\n    _macdOsma = Indicators.MacdOscillatorMovingAverage(Bars.ClosePrices, 26, 12, 9, MovingAverageType.Exponential);\n}\n\nprotected override void OnBar()\n{\n    Print(\"MACD OsMA histogram: {0}\", _macdOsma.Histogram.Last(1));\n}","python":"def on_start(self):\n    self.macdOsma = api.Indicators.MacdOscillatorMovingAverage(api.Bars.ClosePrices, 26, 12, 9, MovingAverageType.Exponential)\n\ndef on_bar(self):\n    api.Print(f\"MACD OsMA histogram: {self.macdOsma.Histogram.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdOscillatorMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MacdOscillatorMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MainMenu","kind":"interface","name":"MainMenu","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenu","python":"MainMenu","summary":"Provides plugins access to main menu API.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"using System;\nusing cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    private const string FirstItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M819.9 747.6H204.1c-21.8 0-39.5-17.7-39.5-39.5V278.4c0-21.8 17.7-39.5 39.5-39.5h615.7c21.8 0 39.5 17.7 39.5 39.5v429.7c0.1 21.9-17.6 39.5-39.4 39.5z\\\" fill=\\\"#FFD632\\\" /><path d=\\\"M819.9 753.1H204.1c-24.8 0-45-20.2-45-45V278.4c0-24.8 20.2-45 45-45h615.7c24.8 0 45 20.2 45 45v429.7c0.1 24.9-20.1 45-44.9 45zM204.1 244.4c-18.7 0-34 15.3-34 34v429.7c0 18.7 15.3 34 34 34h615.7c18.7 0 34-15.3 34-34V278.4c0-18.7-15.3-34-34-34H204.1z\\\" fill=\\\"#333336\\\" /><path d=\\\"M296.5 766.6h58.3v39.9c0 10.1-8.2 18.4-18.4 18.4h-21.6c-10.1 0-18.4-8.2-18.4-18.4v-39.9z\\\" fill=\\\"#FFC86B\\\" /><path d=\\\"M336.4 830.4h-21.6c-13.2 0-23.9-10.7-23.9-23.9v-45.4h69.3v45.4c0.1 13.2-10.6 23.9-23.8 23.9zM302 772.1v34.4c0 7.1 5.8 12.9 12.9 12.9h21.6c7.1 0 12.9-5.8 12.9-12.9v-34.4H302z\\\" fill=\\\"#333336\\\" /><path d=\\\"M441 315.3v-62.1c0-29.4-23.9-53.3-53.3-53.3H263.6c-29.4 0-53.3 23.9-53.3 53.3v62.1c0 24.7 7.8 47.6 21 66.4 6.5 9.2 9.9 20.3 9.9 31.5v160.2c0 11.3-3.4 22.3-9.9 31.5-13.2 18.8-21 41.7-21 66.4v63.1c0 28.9 23.4 52.3 52.3 52.3h126.2c28.9 0 52.3-23.4 52.3-52.3v-63.1c0-24.7-7.7-47.5-20.9-66.2-6.5-9.3-10-20.4-10-31.8v-160c0-11.4 3.4-22.5 10-31.8 13-18.8 20.8-41.6 20.8-66.2z\\\" fill=\\\"#68A240\\\" /><path d=\\\"M388.7 792.1H262.6c-31.8 0-57.8-25.9-57.8-57.8v-63.1c0-25.1 7.6-49.1 22-69.5 5.8-8.2 8.9-18 8.9-28.4V413.2c0-10.3-3.1-20.1-8.9-28.4-14.4-20.4-22-44.5-22-69.5v-62.1c0-32.4 26.4-58.8 58.8-58.8h124.1c32.4 0 58.8 26.4 58.8 58.8v62.1c0 25-7.6 49-21.9 69.4-5.9 8.3-9 18.2-9 28.7v159.9c0 10.4 3.1 20.3 9 28.7 14.3 20.4 21.9 44.4 21.9 69.4v63.1c0 31.7-25.9 57.6-57.8 57.6zM263.6 205.4c-26.3 0-47.8 21.4-47.8 47.8v62.1c0 22.8 6.9 44.6 20 63.2 7.1 10.1 10.9 22.1 10.9 34.7v160.2c0 12.6-3.8 24.6-10.9 34.7-13.1 18.6-20 40.4-20 63.2v63.1c0 25.8 21 46.8 46.8 46.8h126.2c25.8 0 46.8-21 46.8-46.8v-63.1c0-22.7-6.9-44.5-19.9-63.1-7.2-10.2-11-22.3-11-35V413.3c0-12.7 3.8-24.8 11-35 13-18.5 19.9-40.3 19.9-63.1v-62.1c0-26.3-21.4-47.8-47.8-47.8H263.6z\\\" fill=\\\"#333336\\\" /><path d=\\\"M780.6 437.5H495.4c-8 0-14.5-6.5-14.5-14.5V317.6c0-8 6.5-14.5 14.5-14.5h285.2c8 0 14.5 6.5 14.5 14.5V423c0 8-6.5 14.5-14.5 14.5z\\\" fill=\\\"#D8A128\\\" /><path d=\\\"M780.6 443H495.4c-11 0-20-9-20-20V317.6c0-11 9-20 20-20h285.2c11 0 20 9 20 20V423c0 11-8.9 20-20 20zM495.4 308.6c-5 0-9 4-9 9V423c0 5 4 9 9 9h285.2c5 0 9-4 9-9V317.6c0-5-4-9-9-9H495.4zM476.9 889.6c-2.1 0-4-1.2-5-3.2-0.8-1.6-19.7-39-79-19.6-23.1 7.5-41.3 6.6-54.3-2.8-18.3-13.2-18.5-38-18.5-39.1 0-3 2.5-5.5 5.5-5.5s5.5 2.5 5.5 5.5c0 0.3 0.3 20.4 14 30.2 10 7.2 24.9 7.6 44.4 1.2 19.6-6.4 48.1-11 71.8 3.8 14.5 9 20.3 21 20.5 21.5 1.3 2.7 0.1 6-2.6 7.3-0.8 0.5-1.6 0.7-2.3 0.7z m-145.7-64.7z\\\" fill=\\\"#333336\\\" /><path d=\\\"M550 570.9h-57.3c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6H550c4.7 0 8.6 3.8 8.6 8.6v57.3c-0.1 4.7-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M550 576.4h-57.3c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1H550c7.8 0 14.1 6.3 14.1 14.1v57.3c-0.1 7.8-6.4 14.1-14.1 14.1z m-57.3-74.5c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1H550c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M667.3 570.9H610c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6v57.3c0 4.7-3.8 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M667.3 576.4H610c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1v57.3c0 7.8-6.3 14.1-14.1 14.1zM610 501.9c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1H610z\\\" fill=\\\"#333336\\\" /><path d=\\\"M784.7 570.9h-57.3c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6v57.3c0 4.7-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M784.7 576.4h-57.3c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1v57.3c0 7.8-6.3 14.1-14.1 14.1z m-57.3-74.5c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M550 691.6h-57.3c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6H550c4.7 0 8.6 3.8 8.6 8.6V683c-0.1 4.8-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M550 697.1h-57.3c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1H550c7.8 0 14.1 6.3 14.1 14.1V683c-0.1 7.8-6.4 14.1-14.1 14.1z m-57.3-74.4c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1H550c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M667.3 691.6H610c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6V683c0 4.8-3.8 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M667.3 697.1H610c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1V683c0 7.8-6.3 14.1-14.1 14.1zM610 622.7c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1H610z\\\" fill=\\\"#333336\\\" /><path d=\\\"M784.7 691.6h-57.3c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6V683c0 4.8-3.9 8.6-8.6 8.6z\\\" fill=\\\"#68A240\\\" /><path d=\\\"M784.7 697.1h-57.3c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1V683c0 7.8-6.3 14.1-14.1 14.1z m-57.3-74.4c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /></svg>\";\n    private const string SecondItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M0.000976 0.999024h1023.000975v1023.000976H0.000976z\\\" fill=\\\"#FFFFFF\\\" /><path d=\\\"M844.176585 208.796098l-41.959024-11.988293 41.959024-10.989268 11.988293-42.958049 10.989268 42.958049 42.958049 10.989268-42.958049 11.988293-10.989268 41.959024-11.988293-41.959024zM104.898537 717.299512l-31.968781-6.993171 31.968781-7.992195 7.992195-31.96878 6.99317 31.96878 32.967805 7.992195-32.967805 6.993171-6.99317 32.967805-7.992195-32.967805zM883.138537 261.74439l-14.985366-2.997073 14.985366-3.996097 2.997073-13.986342 2.997073 13.986342 14.985366 3.996097-14.985366 2.997073-2.997073 14.985366-2.997073-14.985366zM109.893659 544.468293l-14.985366-2.997073 14.985366-2.997074 2.997073-14.985366 2.997073 14.985366 14.985366 2.997074-14.985366 2.997073-2.997073 14.985366-2.997073-14.985366z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M114.88878 348.659512m-8.991219 0a8.99122 8.99122 0 1 0 17.982439 0 8.99122 8.99122 0 1 0-17.982439 0Z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M910.112195 711.305366a24.97561 24.97561 0 1 1 24.97561-24.97561 24.97561 24.97561 0 0 1-24.97561 24.97561z m0-35.964878a9.990244 9.990244 0 1 1 0 0.999024z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M626.389268 469.541463h69.931708v204.650147h-69.931708z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M190.814634 734.282927h644.370732v34.965853H190.814634z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M855.165854 714.302439H170.834146v74.926829h684.331708z m-19.980488 54.946341H190.814634v-34.965853h644.370732z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M150.853659 837.182439h722.294634v34.965854H150.853659z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M127.876098 817.201951v74.926829h767.250731v-74.926829z m745.272195 54.946342H150.853659v-34.965854h722.294634z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M487.524878 483.527805h49.95122v182.821463h-49.95122z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M467.54439 686.329756h89.912195V463.547317h-89.912195z m19.980488-202.801951h49.95122v182.821463h-49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M339.669268 483.527805h49.95122v182.821463h-49.95122z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M319.68878 686.329756h89.912196V463.547317h-89.912196z m19.980488-202.801951h49.95122v182.821463h-49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M190.814634 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M260.746341 353.654634h-89.912195v80.920976h89.912195z m-19.980487 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M784.235122 373.635122h49.951219v40.96h-49.951219z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M854.166829 353.654634h-89.912195v80.920976h89.912195z m-19.980488 60.940488h-49.951219v-40.96h49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M636.379512 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M706.31122 353.654634h-89.912196v80.920976h89.912196z m-19.980488 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M487.524878 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M557.456585 353.654634h-89.912195v80.920976h89.912195z m-19.980487 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M339.669268 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M409.600976 353.654634h-89.912196v80.920976h89.912196z m-19.980488 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M515.497561 140.862439L241.764878 305.701463h542.470244L515.497561 140.862439z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M515.497561 116.885854L170.834146 325.681951h683.332683z m0 23.976585l268.737561 164.839024H241.764878zM615.4 688.327805h89.912195V465.545366h-89.912195z m19.980488-202.801951h49.951219v182.821463h-49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M783.236098 485.525854h49.951219v182.821463h-49.951219z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M763.25561 688.327805h89.912195V465.545366h-89.912195z m19.980488-202.801951h49.951219v182.821463h-49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M189.81561 666.349268h49.951219V481.529756h-48.952195l-0.999024 184.819512z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M260.746341 461.549268h-89.912195v224.780488h88.913171z m-20.979512 204.8h-49.951219V481.529756h48.952195z\\\" fill=\\\"#5546CB\\\" /></svg>\";\n    private const string BottomItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M819 234l-48-13 48-13 13-48 13 48 48 13-48 13-13 48-13-48zM867 287l-19-5 19-4 4-19 4 19 19 4-19 5-4 19-4-19z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M130 472l-21-5 21-5 5-21 5 21 21 5-21 5-5 20-5-20z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M208 246m-9 0a9 9 0 1 0 18 0 9 9 0 1 0-18 0Z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M824 804a25 25 0 1 1 25-25 25 25 0 0 1-25 25z m0-36a10 10 0 1 0 10 10 10 10 0 0 0-10-9z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M166 728h78v77.34h-78z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M452 509v43h128v-43a19 19 0 0 1 14-18H438a19 19 0 0 1 14 18z\\\" fill=\\\"#F97744\\\" /><path d=\\\"M661 489h1a19 19 0 0 1 19 19v43h32v114a74 74 0 0 1-74 74H387a73 73 0 0 1-73-73V552h38v-43a19 19 0 0 1 19-19h1a116 116 0 0 1-83-50v337a31 31 0 0 0 31 31h386a31 31 0 0 0 31-31V440a116 116 0 0 1-76 49z\\\" fill=\\\"#F97744\\\" /><path d=\\\"M334 666a53 53 0 0 0 53 53h251a54 54 0 0 0 54-54v-93h-32a30 30 0 0 1-30 25 30 30 0 0 1-30-25H432a30 30 0 0 1-30 25 30 30 0 0 1-30-25h-38z\\\" fill=\\\"#FFFFFF\\\" /><path d=\\\"M580 553H452a19 19 0 0 1-19 19h166a19 19 0 0 1-19-19z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M662 572h30v93a54 54 0 0 1-54 54H387a53 53 0 0 1-53-53v-94h37a19 19 0 0 1-19-19h-38v113a73 73 0 0 0 73 73h251a74 74 0 0 0 74-74V552h-32a19 19 0 0 1-18 20z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M289 375a96 96 0 0 0 83 95v-70a30 30 0 0 1 30-30 30 30 0 0 1 30 30v71h168v-71a30 30 0 0 1 30-30 30 30 0 0 1 30 30v69a96 96 0 0 0 76-94V266a31 31 0 0 0-31-31H320a31 31 0 0 0-31 31v109z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M402 597a30 30 0 0 0 30-25h-59a30 30 0 0 0 29 25zM372 510h60v41.48h-60zM630 597a30 30 0 0 0 30-25h-59a30 30 0 0 0 29 25zM600 510h60v41.48h-60z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M438 491h-67a19 19 0 0 0-19 19v43a19 19 0 0 0 19 19h63a19 19 0 0 0 19-19v-44a19 19 0 0 0-15-18z m-6 61h-60v-42h60zM662 490h-67a19 19 0 0 0-14 18v43a19 19 0 0 0 19 19h63a19 19 0 0 0 19-19v-42a19 19 0 0 0-20-19z m-1 61h-61v-41h60z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M786 524h-29v148h29a24 24 0 0 0 24-24V548a24 24 0 0 0-24-24z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M786 504h-29V266a51 51 0 0 0-51-51h-78a116 116 0 0 0-230 0h-78a51 51 0 0 0-51 51v240l-8-2h-30a44 44 0 0 0-44 44v100a44 44 0 0 0 44 44h30l8-2v87a51 51 0 0 0 51 51h386a51 51 0 0 0 51-51v-85h29a44 44 0 0 0 44-44V548a44 44 0 0 0-44-44zM260 672h-29a24 24 0 0 1-24-24V548a24 24 0 0 1 24-24h29z m253-536a96 96 0 0 1 95 79H418a96 96 0 0 1 95-79zM289 266a31 31 0 0 1 31-31h386a31 31 0 0 1 31 31v109a96 96 0 0 1-76 94v-69a30 30 0 0 0-30-30 30 30 0 0 0-30 30v71H432v-71a30 30 0 0 0-30-30 30 30 0 0 0-30 30v70a96 96 0 0 1-83-95V266z m417 542H320a31 31 0 0 1-31-31V440a116 116 0 0 0 83 50h289a116 116 0 0 0 76-49v336a31 31 0 0 1-31 31z m104-160a24 24 0 0 1-24 24h-29V524h29a24 24 0 0 1 24 24z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M208 548v100a24 24 0 0 0 24 24h29V524h-30a24 24 0 0 0-23 24z\\\" fill=\\\"#AFBCF3\\\" /></svg>\";\n\n    private MainMenuOwnCustomItem _firstItem;\n    private MainMenuOwnCustomItem _secondItem;\n    private MainMenuBottomCustomItem _bottomItem;\n\n    protected override void OnStart()\n    {\n        var panel = new StackPanel { Orientation = Orientation.Vertical };\n\n        var changeSelectedItemToBuiltInItemButton = new Button { Text = \"Change Selected Item to Built In Item\" };\n\n        changeSelectedItemToBuiltInItemButton.Click += args =>\n        {\n            MainMenu.TryChangeSelectedItem(MainMenu.BuiltInItems[Random.Shared.Next(0, MainMenu.BuiltInItems.Count)]);\n        };\n\n        panel.AddChild(changeSelectedItemToBuiltInItemButton);\n\n        var changeSelectedItemToCustomItemButton = new Button { Text = \"Change Selected Item to Custom Item\" };\n\n        changeSelectedItemToCustomItemButton.Click += args =>\n        {\n            MainMenu.TryChangeSelectedItem(_secondItem is null ? _firstItem : MainMenu.SelectedItem == _firstItem ? _secondItem : _firstItem);\n        };\n\n        panel.AddChild(changeSelectedItemToCustomItemButton);\n\n        var showSelectedItemButton = new Button { Text = \"Show Selected Item\" };\n\n        showSelectedItemButton.Click += args =>\n        {\n            Print($\"Selected Item: {(MainMenu.SelectedItem is MainMenuBuiltInItem menuBuiltInItem ? menuBuiltInItem.Type : MainMenu.SelectedItem is MainMenuCustomItem mainMenuCustomItem ? mainMenuCustomItem.Name : MainMenu.SelectedItem)}\");\n        };\n\n        panel.AddChild(showSelectedItemButton);\n\n        var showBuiltInItemsButton = new Button { Text = \"Show Built-in Items\" };\n\n        showBuiltInItemsButton.Click += args =>\n        {\n            Print($\"Built-in Items count: {MainMenu.BuiltInItems.Count}\");\n            Print($\"Built-in Items: {string.Join(\", \", MainMenu.BuiltInItems.Select(i => i.Type.ToString()))}\");\n\n        };\n\n        panel.AddChild(showBuiltInItemsButton);\n\n        var addItemButton = new Button { Text = \"Add Item\" };\n\n        addItemButton.Click += args =>\n        {\n            if (_firstItem is null)\n            {\n                _firstItem = MainMenu.AddItem(\"Test\", new SvgIcon(FirstItemSvgIconXml));\n\n                var webView = new WebView();\n\n                webView.Loaded += args =>\n                {\n                    webView.NavigateAsync(\"https://help.ctrader.com/\");\n                };\n\n                _firstItem.Child = webView;\n            }\n            else\n            {\n                _secondItem = MainMenu.AddItem(\"Test 2\", new SvgIcon(SecondItemSvgIconXml));\n\n                var panel = new StackPanel { Orientation = Orientation.Vertical, BackgroundColor = Color.Red };\n\n                var panelButton = new Button { Text = \"Trade\", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, VerticalContentAlignment = VerticalAlignment.Center, FontWeight = FontWeight.UltraBold };\n\n                panelButton.Click += _ =>\n                {\n                    var symbol = Symbols.GetSymbol(\"EURUSD\");\n\n                    ExecuteMarketOrder(TradeType.Buy, symbol.Name, symbol.VolumeInUnitsMin);\n                };\n                panel.AddChild(panelButton);\n\n                _secondItem.Child = panel;\n            }\n\n        };\n\n        panel.AddChild(addItemButton);\n\n        var removeItemButton = new Button { Text = \"Remove Item\" };\n\n        removeItemButton.Click += args =>\n        {\n            if (_firstItem is not null)\n            {\n                Print($\"Remove Result: {MainMenu.RemoveItem(_firstItem)}\");\n                _firstItem = null;\n\n                return;\n            }\n\n            if (_secondItem is not null)\n            {\n                Print($\"Remove Result: {MainMenu.RemoveItem(_secondItem)}\");\n                _secondItem = null;\n            }\n        };\n\n        panel.AddChild(removeItemButton);\n\n        var showIsExpandedButton = new Button { Text = \"Show Is Expanded\" };\n\n        showIsExpandedButton.Click += args =>\n        {\n            Print($\"IsExpanded: {MainMenu.IsExpanded}\");\n        };\n\n        panel.AddChild(showIsExpandedButton);\n\n        var changeIsExpandedButton = new Button { Text = \"Change Is Expanded\" };\n\n        changeIsExpandedButton.Click += args =>\n        {\n            MainMenu.IsExpanded = !MainMenu.IsExpanded;\n            Print($\"IsExpanded: {MainMenu.IsExpanded}\");\n        };\n\n        panel.AddChild(changeIsExpandedButton);\n\n        var addBottomItemButton = new Button { Text = \"Add Bottom Item\" };\n\n        addBottomItemButton.Click += args =>\n        {\n            _bottomItem = MainMenu.AddBottomItem(\"Test\", new SvgIcon(BottomItemSvgIconXml));\n\n            _bottomItem.Handler = () =>\n            {\n                Print(\"Bottom item clicked!\");\n            };\n        };\n\n        panel.AddChild(addBottomItemButton);\n\n        var removeBottomItemButton = new Button { Text = \"Remove Bottom Item\" };\n\n        removeBottomItemButton.Click += args =>\n        {\n            Print($\"Remove Result: {MainMenu.RemoveBottomItem(_bottomItem)}\");\n        };\n\n        panel.AddChild(removeBottomItemButton);\n\n        var aspBlock = Asp.SymbolTab.AddBlock(\"Main Menu Test\");\n\n        aspBlock.Child = panel;\n\n        MainMenu.SelectedItemChanged += args =>\n        {\n            Print($\"Selected Item Changed, old item: {GetItemDetail(args.OldItem)} | new item: {GetItemDetail(args.NewItem)}\");\n        };\n    }\n\n    private string GetItemDetail(MainMenuItem item) => item switch\n    {\n        null => string.Empty,\n        MainMenuBuiltInItem builtInItem => builtInItem.Type.ToString(),\n        MainMenuCustomItem customItem => customItem.Name,\n        _ => throw new ArgumentOutOfRangeException(nameof(item)),\n    };\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, Func\nimport random\n\nclass Test():\n    FirstItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M819.9 747.6H204.1c-21.8 0-39.5-17.7-39.5-39.5V278.4c0-21.8 17.7-39.5 39.5-39.5h615.7c21.8 0 39.5 17.7 39.5 39.5v429.7c0.1 21.9-17.6 39.5-39.4 39.5z\\\" fill=\\\"#FFD632\\\" /><path d=\\\"M819.9 753.1H204.1c-24.8 0-45-20.2-45-45V278.4c0-24.8 20.2-45 45-45h615.7c24.8 0 45 20.2 45 45v429.7c0.1 24.9-20.1 45-44.9 45zM204.1 244.4c-18.7 0-34 15.3-34 34v429.7c0 18.7 15.3 34 34 34h615.7c18.7 0 34-15.3 34-34V278.4c0-18.7-15.3-34-34-34H204.1z\\\" fill=\\\"#333336\\\" /><path d=\\\"M296.5 766.6h58.3v39.9c0 10.1-8.2 18.4-18.4 18.4h-21.6c-10.1 0-18.4-8.2-18.4-18.4v-39.9z\\\" fill=\\\"#FFC86B\\\" /><path d=\\\"M336.4 830.4h-21.6c-13.2 0-23.9-10.7-23.9-23.9v-45.4h69.3v45.4c0.1 13.2-10.6 23.9-23.8 23.9zM302 772.1v34.4c0 7.1 5.8 12.9 12.9 12.9h21.6c7.1 0 12.9-5.8 12.9-12.9v-34.4H302z\\\" fill=\\\"#333336\\\" /><path d=\\\"M441 315.3v-62.1c0-29.4-23.9-53.3-53.3-53.3H263.6c-29.4 0-53.3 23.9-53.3 53.3v62.1c0 24.7 7.8 47.6 21 66.4 6.5 9.2 9.9 20.3 9.9 31.5v160.2c0 11.3-3.4 22.3-9.9 31.5-13.2 18.8-21 41.7-21 66.4v63.1c0 28.9 23.4 52.3 52.3 52.3h126.2c28.9 0 52.3-23.4 52.3-52.3v-63.1c0-24.7-7.7-47.5-20.9-66.2-6.5-9.3-10-20.4-10-31.8v-160c0-11.4 3.4-22.5 10-31.8 13-18.8 20.8-41.6 20.8-66.2z\\\" fill=\\\"#68A240\\\" /><path d=\\\"M388.7 792.1H262.6c-31.8 0-57.8-25.9-57.8-57.8v-63.1c0-25.1 7.6-49.1 22-69.5 5.8-8.2 8.9-18 8.9-28.4V413.2c0-10.3-3.1-20.1-8.9-28.4-14.4-20.4-22-44.5-22-69.5v-62.1c0-32.4 26.4-58.8 58.8-58.8h124.1c32.4 0 58.8 26.4 58.8 58.8v62.1c0 25-7.6 49-21.9 69.4-5.9 8.3-9 18.2-9 28.7v159.9c0 10.4 3.1 20.3 9 28.7 14.3 20.4 21.9 44.4 21.9 69.4v63.1c0 31.7-25.9 57.6-57.8 57.6zM263.6 205.4c-26.3 0-47.8 21.4-47.8 47.8v62.1c0 22.8 6.9 44.6 20 63.2 7.1 10.1 10.9 22.1 10.9 34.7v160.2c0 12.6-3.8 24.6-10.9 34.7-13.1 18.6-20 40.4-20 63.2v63.1c0 25.8 21 46.8 46.8 46.8h126.2c25.8 0 46.8-21 46.8-46.8v-63.1c0-22.7-6.9-44.5-19.9-63.1-7.2-10.2-11-22.3-11-35V413.3c0-12.7 3.8-24.8 11-35 13-18.5 19.9-40.3 19.9-63.1v-62.1c0-26.3-21.4-47.8-47.8-47.8H263.6z\\\" fill=\\\"#333336\\\" /><path d=\\\"M780.6 437.5H495.4c-8 0-14.5-6.5-14.5-14.5V317.6c0-8 6.5-14.5 14.5-14.5h285.2c8 0 14.5 6.5 14.5 14.5V423c0 8-6.5 14.5-14.5 14.5z\\\" fill=\\\"#D8A128\\\" /><path d=\\\"M780.6 443H495.4c-11 0-20-9-20-20V317.6c0-11 9-20 20-20h285.2c11 0 20 9 20 20V423c0 11-8.9 20-20 20zM495.4 308.6c-5 0-9 4-9 9V423c0 5 4 9 9 9h285.2c5 0 9-4 9-9V317.6c0-5-4-9-9-9H495.4zM476.9 889.6c-2.1 0-4-1.2-5-3.2-0.8-1.6-19.7-39-79-19.6-23.1 7.5-41.3 6.6-54.3-2.8-18.3-13.2-18.5-38-18.5-39.1 0-3 2.5-5.5 5.5-5.5s5.5 2.5 5.5 5.5c0 0.3 0.3 20.4 14 30.2 10 7.2 24.9 7.6 44.4 1.2 19.6-6.4 48.1-11 71.8 3.8 14.5 9 20.3 21 20.5 21.5 1.3 2.7 0.1 6-2.6 7.3-0.8 0.5-1.6 0.7-2.3 0.7z m-145.7-64.7z\\\" fill=\\\"#333336\\\" /><path d=\\\"M550 570.9h-57.3c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6H550c4.7 0 8.6 3.8 8.6 8.6v57.3c-0.1 4.7-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M550 576.4h-57.3c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1H550c7.8 0 14.1 6.3 14.1 14.1v57.3c-0.1 7.8-6.4 14.1-14.1 14.1z m-57.3-74.5c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1H550c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M667.3 570.9H610c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6v57.3c0 4.7-3.8 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M667.3 576.4H610c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1v57.3c0 7.8-6.3 14.1-14.1 14.1zM610 501.9c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1H610z\\\" fill=\\\"#333336\\\" /><path d=\\\"M784.7 570.9h-57.3c-4.7 0-8.6-3.8-8.6-8.6V505c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6v57.3c0 4.7-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M784.7 576.4h-57.3c-7.8 0-14.1-6.3-14.1-14.1V505c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1v57.3c0 7.8-6.3 14.1-14.1 14.1z m-57.3-74.5c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1V505c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M550 691.6h-57.3c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6H550c4.7 0 8.6 3.8 8.6 8.6V683c-0.1 4.8-3.9 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M550 697.1h-57.3c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1H550c7.8 0 14.1 6.3 14.1 14.1V683c-0.1 7.8-6.4 14.1-14.1 14.1z m-57.3-74.4c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1H550c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /><path d=\\\"M667.3 691.6H610c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6V683c0 4.8-3.8 8.6-8.6 8.6z\\\" fill=\\\"#D5D9CF\\\" /><path d=\\\"M667.3 697.1H610c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1V683c0 7.8-6.3 14.1-14.1 14.1zM610 622.7c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1H610z\\\" fill=\\\"#333336\\\" /><path d=\\\"M784.7 691.6h-57.3c-4.7 0-8.6-3.8-8.6-8.6v-57.3c0-4.7 3.8-8.6 8.6-8.6h57.3c4.7 0 8.6 3.8 8.6 8.6V683c0 4.8-3.9 8.6-8.6 8.6z\\\" fill=\\\"#68A240\\\" /><path d=\\\"M784.7 697.1h-57.3c-7.8 0-14.1-6.3-14.1-14.1v-57.3c0-7.8 6.3-14.1 14.1-14.1h57.3c7.8 0 14.1 6.3 14.1 14.1V683c0 7.8-6.3 14.1-14.1 14.1z m-57.3-74.4c-1.7 0-3.1 1.4-3.1 3.1v57.3c0 1.7 1.4 3.1 3.1 3.1h57.3c1.7 0 3.1-1.4 3.1-3.1v-57.3c0-1.7-1.4-3.1-3.1-3.1h-57.3z\\\" fill=\\\"#333336\\\" /></svg>\"\n    SecondItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M0.000976 0.999024h1023.000975v1023.000976H0.000976z\\\" fill=\\\"#FFFFFF\\\" /><path d=\\\"M844.176585 208.796098l-41.959024-11.988293 41.959024-10.989268 11.988293-42.958049 10.989268 42.958049 42.958049 10.989268-42.958049 11.988293-10.989268 41.959024-11.988293-41.959024zM104.898537 717.299512l-31.968781-6.993171 31.968781-7.992195 7.992195-31.96878 6.99317 31.96878 32.967805 7.992195-32.967805 6.993171-6.99317 32.967805-7.992195-32.967805zM883.138537 261.74439l-14.985366-2.997073 14.985366-3.996097 2.997073-13.986342 2.997073 13.986342 14.985366 3.996097-14.985366 2.997073-2.997073 14.985366-2.997073-14.985366zM109.893659 544.468293l-14.985366-2.997073 14.985366-2.997074 2.997073-14.985366 2.997073 14.985366 14.985366 2.997074-14.985366 2.997073-2.997073 14.985366-2.997073-14.985366z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M114.88878 348.659512m-8.991219 0a8.99122 8.99122 0 1 0 17.982439 0 8.99122 8.99122 0 1 0-17.982439 0Z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M910.112195 711.305366a24.97561 24.97561 0 1 1 24.97561-24.97561 24.97561 24.97561 0 0 1-24.97561 24.97561z m0-35.964878a9.990244 9.990244 0 1 1 0 0.999024z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M626.389268 469.541463h69.931708v204.650147h-69.931708z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M190.814634 734.282927h644.370732v34.965853H190.814634z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M855.165854 714.302439H170.834146v74.926829h684.331708z m-19.980488 54.946341H190.814634v-34.965853h644.370732z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M150.853659 837.182439h722.294634v34.965854H150.853659z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M127.876098 817.201951v74.926829h767.250731v-74.926829z m745.272195 54.946342H150.853659v-34.965854h722.294634z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M487.524878 483.527805h49.95122v182.821463h-49.95122z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M467.54439 686.329756h89.912195V463.547317h-89.912195z m19.980488-202.801951h49.95122v182.821463h-49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M339.669268 483.527805h49.95122v182.821463h-49.95122z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M319.68878 686.329756h89.912196V463.547317h-89.912196z m19.980488-202.801951h49.95122v182.821463h-49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M190.814634 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M260.746341 353.654634h-89.912195v80.920976h89.912195z m-19.980487 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M784.235122 373.635122h49.951219v40.96h-49.951219z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M854.166829 353.654634h-89.912195v80.920976h89.912195z m-19.980488 60.940488h-49.951219v-40.96h49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M636.379512 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M706.31122 353.654634h-89.912196v80.920976h89.912196z m-19.980488 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M487.524878 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M557.456585 353.654634h-89.912195v80.920976h89.912195z m-19.980487 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M339.669268 373.635122h49.95122v40.96h-49.95122z\\\" fill=\\\"#FF8859\\\" /><path d=\\\"M409.600976 353.654634h-89.912196v80.920976h89.912196z m-19.980488 60.940488h-49.95122v-40.96h49.95122z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M515.497561 140.862439L241.764878 305.701463h542.470244L515.497561 140.862439z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M515.497561 116.885854L170.834146 325.681951h683.332683z m0 23.976585l268.737561 164.839024H241.764878zM615.4 688.327805h89.912195V465.545366h-89.912195z m19.980488-202.801951h49.951219v182.821463h-49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M783.236098 485.525854h49.951219v182.821463h-49.951219z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M763.25561 688.327805h89.912195V465.545366h-89.912195z m19.980488-202.801951h49.951219v182.821463h-49.951219z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M189.81561 666.349268h49.951219V481.529756h-48.952195l-0.999024 184.819512z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M260.746341 461.549268h-89.912195v224.780488h88.913171z m-20.979512 204.8h-49.951219V481.529756h48.952195z\\\" fill=\\\"#5546CB\\\" /></svg>\"\n    BottomItemSvgIconXml = \"<svg width=\\\"800px\\\" height=\\\"800px\\\" viewBox=\\\"0 0 1024 1024\\\" class=\\\"icon\\\"  version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M819 234l-48-13 48-13 13-48 13 48 48 13-48 13-13 48-13-48zM867 287l-19-5 19-4 4-19 4 19 19 4-19 5-4 19-4-19z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M130 472l-21-5 21-5 5-21 5 21 21 5-21 5-5 20-5-20z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M208 246m-9 0a9 9 0 1 0 18 0 9 9 0 1 0-18 0Z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M824 804a25 25 0 1 1 25-25 25 25 0 0 1-25 25z m0-36a10 10 0 1 0 10 10 10 10 0 0 0-10-9z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M166 728h78v77.34h-78z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M452 509v43h128v-43a19 19 0 0 1 14-18H438a19 19 0 0 1 14 18z\\\" fill=\\\"#F97744\\\" /><path d=\\\"M661 489h1a19 19 0 0 1 19 19v43h32v114a74 74 0 0 1-74 74H387a73 73 0 0 1-73-73V552h38v-43a19 19 0 0 1 19-19h1a116 116 0 0 1-83-50v337a31 31 0 0 0 31 31h386a31 31 0 0 0 31-31V440a116 116 0 0 1-76 49z\\\" fill=\\\"#F97744\\\" /><path d=\\\"M334 666a53 53 0 0 0 53 53h251a54 54 0 0 0 54-54v-93h-32a30 30 0 0 1-30 25 30 30 0 0 1-30-25H432a30 30 0 0 1-30 25 30 30 0 0 1-30-25h-38z\\\" fill=\\\"#FFFFFF\\\" /><path d=\\\"M580 553H452a19 19 0 0 1-19 19h166a19 19 0 0 1-19-19z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M662 572h30v93a54 54 0 0 1-54 54H387a53 53 0 0 1-53-53v-94h37a19 19 0 0 1-19-19h-38v113a73 73 0 0 0 73 73h251a74 74 0 0 0 74-74V552h-32a19 19 0 0 1-18 20z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M289 375a96 96 0 0 0 83 95v-70a30 30 0 0 1 30-30 30 30 0 0 1 30 30v71h168v-71a30 30 0 0 1 30-30 30 30 0 0 1 30 30v69a96 96 0 0 0 76-94V266a31 31 0 0 0-31-31H320a31 31 0 0 0-31 31v109z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M402 597a30 30 0 0 0 30-25h-59a30 30 0 0 0 29 25zM372 510h60v41.48h-60zM630 597a30 30 0 0 0 30-25h-59a30 30 0 0 0 29 25zM600 510h60v41.48h-60z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M438 491h-67a19 19 0 0 0-19 19v43a19 19 0 0 0 19 19h63a19 19 0 0 0 19-19v-44a19 19 0 0 0-15-18z m-6 61h-60v-42h60zM662 490h-67a19 19 0 0 0-14 18v43a19 19 0 0 0 19 19h63a19 19 0 0 0 19-19v-42a19 19 0 0 0-20-19z m-1 61h-61v-41h60z\\\" fill=\\\"#FDCD60\\\" /><path d=\\\"M786 524h-29v148h29a24 24 0 0 0 24-24V548a24 24 0 0 0-24-24z\\\" fill=\\\"#AFBCF3\\\" /><path d=\\\"M786 504h-29V266a51 51 0 0 0-51-51h-78a116 116 0 0 0-230 0h-78a51 51 0 0 0-51 51v240l-8-2h-30a44 44 0 0 0-44 44v100a44 44 0 0 0 44 44h30l8-2v87a51 51 0 0 0 51 51h386a51 51 0 0 0 51-51v-85h29a44 44 0 0 0 44-44V548a44 44 0 0 0-44-44zM260 672h-29a24 24 0 0 1-24-24V548a24 24 0 0 1 24-24h29z m253-536a96 96 0 0 1 95 79H418a96 96 0 0 1 95-79zM289 266a31 31 0 0 1 31-31h386a31 31 0 0 1 31 31v109a96 96 0 0 1-76 94v-69a30 30 0 0 0-30-30 30 30 0 0 0-30 30v71H432v-71a30 30 0 0 0-30-30 30 30 0 0 0-30 30v70a96 96 0 0 1-83-95V266z m417 542H320a31 31 0 0 1-31-31V440a116 116 0 0 0 83 50h289a116 116 0 0 0 76-49v336a31 31 0 0 1-31 31z m104-160a24 24 0 0 1-24 24h-29V524h29a24 24 0 0 1 24 24z\\\" fill=\\\"#5546CB\\\" /><path d=\\\"M208 548v100a24 24 0 0 0 24 24h29V524h-30a24 24 0 0 0-23 24z\\\" fill=\\\"#AFBCF3\\\" /></svg>\"\n\n    def on_start(self):\n        self.firstItem = None\n        self.secondItem = None\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n\n        changeSelectedItemToBuiltInItemButton = Button()\n        changeSelectedItemToBuiltInItemButton.Text = \"Change Selected Item to Built In Item\"\n        changeSelectedItemToBuiltInItemButton.Click += lambda args: api.MainMenu.TryChangeSelectedItem(random.choice([i for i in api.MainMenu.BuiltInItems]))\n\n        panel.AddChild(changeSelectedItemToBuiltInItemButton)\n\n        changeSelectedItemToCustomItemButton = Button()\n        changeSelectedItemToCustomItemButton.Text = \"Change Selected Item to Custom Item\"\n        changeSelectedItemToCustomItemButton.Click += self.on_change_selected_item_to_custom_item_button_click\n\n        panel.AddChild(changeSelectedItemToCustomItemButton)\n\n        showSelectedItemButton = Button()\n        showSelectedItemButton.Text = \"Show Selected Item\"\n        showSelectedItemButton.Click += self.on_show_selected_item_button_click\n\n        panel.AddChild(showSelectedItemButton)\n\n        showBuiltInItemsButton = Button()\n        showBuiltInItemsButton.Text = \"Show Built-in Items\"\n        showBuiltInItemsButton.Click += self.on_show_built_in_items_button_click\n\n        panel.AddChild(showBuiltInItemsButton)\n\n        addItemButton = Button()\n        addItemButton.Text = \"Add Item\"\n        addItemButton.Click += self.on_add_item_button_click\n\n        panel.AddChild(addItemButton)\n\n        removeItemButton = Button()\n        removeItemButton.Text = \"Remove Item\"\n        removeItemButton.Click += self.on_remove_item_button_click\n\n        panel.AddChild(removeItemButton)\n\n        showIsExpandedButton = Button()\n        showIsExpandedButton.Text = \"Show Is Expanded\"\n        showIsExpandedButton.Click += lambda _: print(f\"IsExpanded: {api.MainMenu.IsExpanded}\")\n\n        panel.AddChild(showIsExpandedButton)\n\n        changeIsExpandedButton = Button()\n        changeIsExpandedButton.Text = \"Change Is Expanded\"\n        changeIsExpandedButton.Click += self.on_change_is_expanded_button_click\n\n        panel.AddChild(changeIsExpandedButton)\n\n        addBottomItemButton = Button()\n        addBottomItemButton.Text = \"Add Bottom Item\"\n        addBottomItemButton.Click += self.on_add_bottom_item_button_click\n\n        panel.AddChild(addBottomItemButton)\n\n        removeBottomItemButton = Button()\n        removeBottomItemButton.Text = \"Remove Bottom Item\"\n        removeBottomItemButton.Click += lambda _: print(f\"Remove Result: {api.MainMenu.RemoveBottomItem(self.bottomItem)}\")\n\n        panel.AddChild(removeBottomItemButton)\n\n        aspBlock = api.Asp.SymbolTab.AddBlock(\"Main Menu Test\")\n        aspBlock.Child = panel\n\n        api.MainMenu.SelectedItemChanged += lambda args: print(f\"Selected Item Changed, old item: {self.get_item_detail(args.OldItem)} | new item: {self.get_item_detail(args.NewItem)}\")\n\n    def on_change_selected_item_to_custom_item_button_click(self, args):\n        item = None\n        if self.secondItem is None:\n            item = self.firstItem\n        else:\n            item = self.secondItem if api.MainMenu.SelectedItem == self.firstItem else self.firstItem\n\n        if item is not None:\n            api.MainMenu.TryChangeSelectedItem(item)\n\n    def on_show_selected_item_button_click(self, args):\n        if isinstance(api.MainMenu.SelectedItem.__implementation__, MainMenuBuiltInItem):\n            print(f\"Selected Item: {MainMenuBuiltInItem(api.MainMenu.SelectedItem).Type}\")\n        elif isinstance(api.MainMenu.SelectedItem.__implementation__, MainMenuCustomItem):\n            print(f\"Selected Item: {MainMenuCustomItem(api.MainMenu.SelectedItem).Name}\")\n        else:\n            print(f\"Selected Item: {api.MainMenu.SelectedItem}\")\n\n    def on_show_built_in_items_button_click(self, args):\n        print(f\"Built-in Items count: {api.MainMenu.BuiltInItems.Count}\")\n        print(f\"Built-in Items: {', '.join([str(i.Type) for i in api.MainMenu.BuiltInItems])}\")\n\n    def on_add_item_button_click(self, args):\n        if self.firstItem is None:\n            self.firstItem = api.MainMenu.AddItem(\"Test\", SvgIcon(self.FirstItemSvgIconXml))\n\n            webView = WebView()\n\n            webView.Loaded += lambda _: webView.NavigateAsync(\"https://help.ctrader.com/\")\n\n            self.firstItem.Child = webView\n        else:\n            self.secondItem = api.MainMenu.AddItem(\"Test 2\", SvgIcon(self.SecondItemSvgIconXml))\n\n            panel = StackPanel()\n            panel.Orientation = Orientation.Vertical\n            panel.BackgroundColor = Color.Red\n\n            panelButton = Button()\n            panelButton.Text = \"Trade\"\n            panelButton.HorizontalAlignment = HorizontalAlignment.Center\n            panelButton.VerticalAlignment = VerticalAlignment.Center\n            panelButton.VerticalContentAlignment = VerticalAlignment.Center\n            panelButton.FontWeight = FontWeight.UltraBold\n\n            symbol = api.Symbols.GetSymbol(\"EURUSD\")\n\n            panelButton.Click += lambda _: api.ExecuteMarketOrder(TradeType.Buy, symbol.Name, symbol.VolumeInUnitsMin)\n\n            panel.AddChild(panelButton)\n\n            self.secondItem.Child = panel\n\n    def on_remove_item_button_click(self, args):\n        if self.firstItem is not None:\n            print(f\"Remove Result: {api.MainMenu.RemoveItem(self.firstItem)}\")\n            self.firstItem = None\n        elif self.secondItem is not None:\n            print(f\"Remove Result: {api.MainMenu.RemoveItem(self.secondItem)}\")\n            self.secondItem = None\n\n    def on_change_is_expanded_button_click(self, args):\n        api.MainMenu.IsExpanded = not api.MainMenu.IsExpanded\n        print(f\"IsExpanded: {api.MainMenu.IsExpanded}\")\n\n    def on_add_bottom_item_button_click(self, args):\n        self.bottomItem = api.MainMenu.AddBottomItem(\"Test\", SvgIcon(self.BottomItemSvgIconXml))\n        self.bottomItem.Handler = Action(lambda: print(\"Bottom item clicked!\"))\n\n    def get_item_detail(self, item):\n        if item is None:\n            return \"\"\n        elif isinstance(item.__implementation__, MainMenuBuiltInItem):\n            return str(MainMenuBuiltInItem(item).Type)\n        elif isinstance(item.__implementation__, MainMenuCustomItem):\n            return MainMenuCustomItem(item).Name\n        else:\n            raise Exception(\"Invalid item type\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.AddBottomItem(System.String,cAlgo.API.SvgIcon)","kind":"method","name":"AddBottomItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBottomCustomItem AddBottomItem(string name, SvgIcon icon)","python":"api.MainMenu.AddBottomItem(name: str, icon: SvgIcon) -> MainMenuBottomCustomItem","summary":"Adds a new bottom custom item to main menu.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Unique name for new custom item."},{"name":"icon","csharpType":"SvgIcon","pythonType":"SvgIcon","summary":"SVG icon"}],"returns":{"csharpType":"MainMenuBottomCustomItem","pythonType":"MainMenuBottomCustomItem","summary":"MainMenuBottomCustomItem","nullable":false},"exceptions":[{"type":"InvalidOperationException","summary":"If an item exists with same name, use ContainsBottomItem to check if name is available or not."}],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar bottomItem = MainMenu.AddBottomItem(\"My Action\", icon);\nbottomItem.Handler = () => Print(\"Bottom item {0} clicked\", bottomItem.Name);","python":"from System import Action\nicon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"My Action\", icon)\nbottomItem.Handler = Action(lambda: api.Print(f\"Bottom item {bottomItem.Name} clicked\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/AddBottomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/AddBottomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.AddItem(System.String,cAlgo.API.SvgIcon)","kind":"method","name":"AddItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuOwnCustomItem AddItem(string name, SvgIcon icon)","python":"api.MainMenu.AddItem(name: str, icon: SvgIcon) -> MainMenuOwnCustomItem","summary":"Adds a new custom item to main menu.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Unique name for new custom item."},{"name":"icon","csharpType":"SvgIcon","pythonType":"SvgIcon","summary":"SVG icon"}],"returns":{"csharpType":"MainMenuOwnCustomItem","pythonType":"MainMenuOwnCustomItem","summary":"MainMenuOwnCustomItem","nullable":false},"exceptions":[{"type":"InvalidOperationException","summary":"If an item exists with same name, use ContainsItem to check if name is available or not."}],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nif (!MainMenu.ContainsItem(\"My Item\"))\n{\n    var item = MainMenu.AddItem(\"My Item\", icon);\n    item.Child = new TextBlock { Text = \"My plugin page\" };\n    Print(\"Added main menu item {0}\", item.Name);\n}","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nif not api.MainMenu.ContainsItem(\"My Item\"):\n    item = api.MainMenu.AddItem(\"My Item\", icon)\n    textBlock = TextBlock()\n    textBlock.Text = \"My plugin page\"\n    item.Child = textBlock\n    api.Print(f\"Added main menu item {item.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/AddItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/AddItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.ContainsBottomItem(System.String)","kind":"method","name":"ContainsBottomItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool ContainsBottomItem(string name)","python":"api.MainMenu.ContainsBottomItem(name: str) -> bool","summary":"Allows checking if a bottom custom item exist with passed name or not.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Item name"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if exists otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nif (!MainMenu.ContainsBottomItem(\"My Action\"))\n    MainMenu.AddBottomItem(\"My Action\", icon);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nif not api.MainMenu.ContainsBottomItem(\"My Action\"):\n    api.MainMenu.AddBottomItem(\"My Action\", icon)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/ContainsBottomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/ContainsBottomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.ContainsItem(System.String)","kind":"method","name":"ContainsItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool ContainsItem(string name)","python":"api.MainMenu.ContainsItem(name: str) -> bool","summary":"Allows checking if a custom item exist with passed name or not.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"Item name"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if exists otherwise false.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nif (!MainMenu.ContainsItem(\"My Item\"))\n    MainMenu.AddItem(\"My Item\", icon);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nif not api.MainMenu.ContainsItem(\"My Item\"):\n    api.MainMenu.AddItem(\"My Item\", icon)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/ContainsItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/ContainsItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.GetBuiltInItem(cAlgo.API.MainMenuBuiltInItemType)","kind":"method","name":"GetBuiltInItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItem GetBuiltInItem(MainMenuBuiltInItemType type)","python":"api.MainMenu.GetBuiltInItem(type: MainMenuBuiltInItemType) -> MainMenuBuiltInItem | None","summary":"Returns a built-in item by type.","remarks":null,"parameters":[{"name":"type","csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"Built-in item type"}],"returns":{"csharpType":"MainMenuBuiltInItem","pythonType":"MainMenuBuiltInItem","summary":"MainMenuBuiltInItem or null","nullable":true},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var tradeItem = MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Trade);\nif (tradeItem != null)\n    Print(\"Found built-in item: {0}\", tradeItem.Type);","python":"tradeItem = api.MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Trade)\nif tradeItem is not None:\n    api.Print(f\"Found built-in item: {tradeItem.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/GetBuiltInItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/GetBuiltInItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.RemoveBottomItem(cAlgo.API.MainMenuBottomCustomItem)","kind":"method","name":"RemoveBottomItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool RemoveBottomItem(MainMenuBottomCustomItem item)","python":"api.MainMenu.RemoveBottomItem(item: MainMenuBottomCustomItem) -> bool","summary":"Removes a previously added bottom item from main menu.","remarks":null,"parameters":[{"name":"item","csharpType":"MainMenuBottomCustomItem","pythonType":"MainMenuBottomCustomItem","summary":"Item to remove."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if an item found and removed otherwise False.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar bottomItem = MainMenu.AddBottomItem(\"Temporary Action\", icon);\nPrint(\"Bottom item removed: {0}\", MainMenu.RemoveBottomItem(bottomItem));","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"Temporary Action\", icon)\napi.Print(f\"Bottom item removed: {api.MainMenu.RemoveBottomItem(bottomItem)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/RemoveBottomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/RemoveBottomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.RemoveItem(cAlgo.API.MainMenuOwnCustomItem)","kind":"method","name":"RemoveItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool RemoveItem(MainMenuOwnCustomItem item)","python":"api.MainMenu.RemoveItem(item: MainMenuOwnCustomItem) -> bool","summary":"Removes a previously added custom item from main menu.","remarks":null,"parameters":[{"name":"item","csharpType":"MainMenuOwnCustomItem","pythonType":"MainMenuOwnCustomItem","summary":"Item to remove."}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if an item found and removed otherwise False.","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar item = MainMenu.AddItem(\"Temporary Item\", icon);\nPrint(\"Item removed: {0}\", MainMenu.RemoveItem(item));","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nitem = api.MainMenu.AddItem(\"Temporary Item\", icon)\napi.Print(f\"Item removed: {api.MainMenu.RemoveItem(item)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/RemoveItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/RemoveItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.TryChangeSelectedItem(cAlgo.API.MainMenuBuiltInItem)","kind":"method","name":"TryChangeSelectedItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool TryChangeSelectedItem(MainMenuBuiltInItem builtInItem)","python":"api.MainMenu.TryChangeSelectedItem(builtInItem: MainMenuBuiltInItem) -> bool","summary":"Tries to change selected item to passed built-in item.","remarks":null,"parameters":[{"name":"builtInItem","csharpType":"MainMenuBuiltInItem","pythonType":"MainMenuBuiltInItem","summary":"Built-In Item"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var algoItem = MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Algo);\nif (algoItem != null)\n    Print(\"Switched to Algo: {0}\", MainMenu.TryChangeSelectedItem(algoItem));","python":"algoItem = api.MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Algo)\nif algoItem is not None:\n    api.Print(f\"Switched to Algo: {api.MainMenu.TryChangeSelectedItem(algoItem)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/TryChangeSelectedItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/TryChangeSelectedItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MainMenu.TryChangeSelectedItem(cAlgo.API.MainMenuOwnCustomItem)","kind":"method","name":"TryChangeSelectedItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool TryChangeSelectedItem(MainMenuOwnCustomItem customItem)","python":"api.MainMenu.TryChangeSelectedItem(customItem: MainMenuOwnCustomItem) -> bool","summary":"Tries to change selected item to passed custom item.","remarks":null,"parameters":[{"name":"customItem","csharpType":"MainMenuOwnCustomItem","pythonType":"MainMenuOwnCustomItem","summary":"Custom Item"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise false","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar item = MainMenu.AddItem(\"My Item\", icon);\nitem.Child = new TextBlock { Text = \"My plugin page\" };\nPrint(\"Switched to my item: {0}\", MainMenu.TryChangeSelectedItem(item));","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nitem = api.MainMenu.AddItem(\"My Item\", icon)\ntextBlock = TextBlock()\ntextBlock.Text = \"My plugin page\"\nitem.Child = textBlock\napi.Print(f\"Switched to my item: {api.MainMenu.TryChangeSelectedItem(item)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/TryChangeSelectedItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/TryChangeSelectedItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenu.BuiltInItems","kind":"property","name":"BuiltInItems","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"IReadonlyList<MainMenuBuiltInItem> BuiltInItems {get;}","python":"api.MainMenu.BuiltInItems: IReadonlyList[MainMenuBuiltInItem]","summary":"Gets a collection of built-in items.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<MainMenuBuiltInItem>","pythonType":"IReadonlyList[MainMenuBuiltInItem]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Print(\"Built-in items: {0}\", MainMenu.BuiltInItems.Count);\nforeach (var builtInItem in MainMenu.BuiltInItems)\n    Print(\"Built-in item: {0}\", builtInItem.Type);","python":"api.Print(f\"Built-in items: {api.MainMenu.BuiltInItems.Count}\")\nfor builtInItem in api.MainMenu.BuiltInItems:\n    api.Print(f\"Built-in item: {builtInItem.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/BuiltInItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/BuiltInItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenu.IsExpanded","kind":"property","name":"IsExpanded","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"bool IsExpanded {get; set;}","python":"api.MainMenu.IsExpanded: bool","summary":"Gets or sets main menu expanded state.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"MainMenu.IsExpanded = !MainMenu.IsExpanded;\nPrint(\"Main menu expanded: {0}\", MainMenu.IsExpanded);","python":"api.MainMenu.IsExpanded = not api.MainMenu.IsExpanded\napi.Print(f\"Main menu expanded: {api.MainMenu.IsExpanded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/IsExpanded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/IsExpanded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenu.SelectedItem","kind":"property","name":"SelectedItem","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuItem SelectedItem {get;}","python":"api.MainMenu.SelectedItem: MainMenuItem","summary":"Gets or sets main menu selected item.","remarks":"Returns MainMenuBuiltInItem if selected item is built-in or MainMenuCustomItem if custom.","parameters":[],"returns":{"csharpType":"MainMenuItem","pythonType":"MainMenuItem","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"if (MainMenu.SelectedItem is MainMenuBuiltInItem builtInItem)\n    Print(\"Selected built-in item: {0}\", builtInItem.Type);\nelse if (MainMenu.SelectedItem is MainMenuCustomItem customItem)\n    Print(\"Selected custom item: {0}\", customItem.Name);","python":"selectedItem = api.MainMenu.SelectedItem\nif isinstance(selectedItem.__implementation__, MainMenuBuiltInItem):\n    api.Print(f\"Selected built-in item: {MainMenuBuiltInItem(selectedItem).Type}\")\nelif isinstance(selectedItem.__implementation__, MainMenuCustomItem):\n    api.Print(f\"Selected custom item: {MainMenuCustomItem(selectedItem).Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/SelectedItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/SelectedItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.MainMenu.SelectedItemChanged","kind":"event","name":"SelectedItemChanged","type":"T:cAlgo.API.MainMenu","namespace":"cAlgo.API","group":"MainMenu","csharp":"event Action<MainMenuSelectedItemChangedEventArgs> SelectedItemChanged;","python":"api.MainMenu.SelectedItemChanged += handler  # handler(obj: MainMenuSelectedItemChangedEventArgs)","summary":"Occurs when main menu selected item changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<MainMenuSelectedItemChangedEventArgs>","pythonType":"Callable[[MainMenuSelectedItemChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MainMenu.SelectedItemChanged += OnMainMenuSelectedItemChanged;\n}\n\nprivate void OnMainMenuSelectedItemChanged(MainMenuSelectedItemChangedEventArgs args)\n{\n    if (args.NewItem is MainMenuBuiltInItem builtInItem)\n        Print(\"Selected built-in item: {0}\", builtInItem.Type);\n    else if (args.NewItem is MainMenuCustomItem customItem)\n        Print(\"Selected custom item: {0}\", customItem.Name);\n}","python":"def on_start(self):\n    api.MainMenu.SelectedItemChanged += self.on_main_menu_selected_item_changed\n\ndef on_main_menu_selected_item_changed(self, args):\n    if isinstance(args.NewItem.__implementation__, MainMenuBuiltInItem):\n        api.Print(f\"Selected built-in item: {MainMenuBuiltInItem(args.NewItem).Type}\")\n    elif isinstance(args.NewItem.__implementation__, MainMenuCustomItem):\n        api.Print(f\"Selected custom item: {MainMenuCustomItem(args.NewItem).Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/SelectedItemChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenu/SelectedItemChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuBottomCustomItem","kind":"interface","name":"MainMenuBottomCustomItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuBottomCustomItem","python":"MainMenuBottomCustomItem","summary":"Represents a bottom custom item in main menu.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nMainMenuBottomCustomItem bottomItem = MainMenu.AddBottomItem(\"Open Report\", icon);\nbottomItem.Handler = () => Print(\"Generating report for {0}\", Account.Number);","python":"from System import Action\nicon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"Open Report\", icon)\nbottomItem.Handler = Action(lambda: api.Print(f\"Generating report for {api.Account.Number}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuBottomCustomItem.Handler","kind":"property","name":"Handler","type":"T:cAlgo.API.MainMenuBottomCustomItem","namespace":"cAlgo.API","group":"MainMenu","csharp":"Action Handler {get; set;}","python":"mainMenuBottomCustomItem.Handler: Action","summary":"Get / set handler of bottom item.","remarks":"This handler will be invoked when user clicked on current item.","parameters":[],"returns":{"csharpType":"Action","pythonType":"Action","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar bottomItem = MainMenu.AddBottomItem(\"My Action\", icon);\nbottomItem.Handler = () => Print(\"Bottom item clicked at {0}\", Server.Time);","python":"from System import Action\nicon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"My Action\", icon)\nbottomItem.Handler = Action(lambda: api.Print(f\"Bottom item clicked at {api.Server.Time}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/Handler/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/Handler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuBottomCustomItem.Name","kind":"property","name":"Name","type":"T:cAlgo.API.MainMenuBottomCustomItem","namespace":"cAlgo.API","group":"MainMenu","csharp":"string Name {get;}","python":"mainMenuBottomCustomItem.Name: str","summary":"Gets name of item.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar bottomItem = MainMenu.AddBottomItem(\"My Action\", icon);\nPrint(\"Bottom item name: {0}\", bottomItem.Name);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"My Action\", icon)\napi.Print(f\"Bottom item name: {bottomItem.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomCustomItem/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuBottomItem","kind":"interface","name":"MainMenuBottomItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuBottomItem","python":"MainMenuBottomItem","summary":"Represents a bottom item in main menu.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nMainMenuBottomItem bottomItem = MainMenu.AddBottomItem(\"My Action\", icon);\nif (bottomItem is MainMenuBottomCustomItem customBottomItem)\n    Print(\"Bottom item name: {0}\", customBottomItem.Name);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nbottomItem = api.MainMenu.AddBottomItem(\"My Action\", icon)\napi.Print(f\"Bottom item name: {bottomItem.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBottomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuBuiltInItem","kind":"interface","name":"MainMenuBuiltInItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuBuiltInItem","python":"MainMenuBuiltInItem","summary":"Represents a built-in item in main menu.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"foreach (var builtInItem in MainMenu.BuiltInItems)\n    Print(\"Built-in item: {0}\", builtInItem.Type);","python":"for builtInItem in api.MainMenu.BuiltInItems:\n    api.Print(f\"Built-in item: {builtInItem.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuBuiltInItem.Type","kind":"property","name":"Type","type":"T:cAlgo.API.MainMenuBuiltInItem","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType Type {get;}","python":"mainMenuBuiltInItem.Type: MainMenuBuiltInItemType","summary":"Gets type of built-in item.","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"if (MainMenu.SelectedItem is MainMenuBuiltInItem builtInItem)\n    Print(\"Selected built-in item type: {0}\", builtInItem.Type);","python":"selectedItem = api.MainMenu.SelectedItem\nif isinstance(selectedItem.__implementation__, MainMenuBuiltInItem):\n    api.Print(f\"Selected built-in item type: {MainMenuBuiltInItem(selectedItem).Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItem/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItem/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuBuiltInItemType","kind":"enum","name":"MainMenuBuiltInItemType","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public enum MainMenuBuiltInItemType","python":"MainMenuBuiltInItemType","summary":"Represents main menu section built-in item types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var analyzeItem = MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Analyze);\nif (analyzeItem != null)\n    MainMenu.TryChangeSelectedItem(analyzeItem);","python":"analyzeItem = api.MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Analyze)\nif analyzeItem is not None:\n    api.MainMenu.TryChangeSelectedItem(analyzeItem)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MainMenuBuiltInItemType.Trade","kind":"enum value","name":"Trade","type":"T:cAlgo.API.MainMenuBuiltInItemType","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType.Trade;","python":"MainMenuBuiltInItemType.Trade","summary":"Trade","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MainMenuBuiltInItemType.Copy","kind":"enum value","name":"Copy","type":"T:cAlgo.API.MainMenuBuiltInItemType","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType.Copy;","python":"MainMenuBuiltInItemType.Copy","summary":"Copy","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MainMenuBuiltInItemType.Algo","kind":"enum value","name":"Algo","type":"T:cAlgo.API.MainMenuBuiltInItemType","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType.Algo;","python":"MainMenuBuiltInItemType.Algo","summary":"Algo","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MainMenuBuiltInItemType.Analyze","kind":"enum value","name":"Analyze","type":"T:cAlgo.API.MainMenuBuiltInItemType","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType.Analyze;","python":"MainMenuBuiltInItemType.Analyze","summary":"Analyze","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MainMenuBuiltInItemType.Invite","kind":"enum value","name":"Invite","type":"T:cAlgo.API.MainMenuBuiltInItemType","namespace":"cAlgo.API","group":"MainMenu","csharp":"MainMenuBuiltInItemType.Invite;","python":"MainMenuBuiltInItemType.Invite","summary":"Invite","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuBuiltInItemType","pythonType":"MainMenuBuiltInItemType","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuBuiltInItemType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuCustomItem","kind":"interface","name":"MainMenuCustomItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuCustomItem","python":"MainMenuCustomItem","summary":"Represents a custom item in main menu.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"if (MainMenu.SelectedItem is MainMenuCustomItem customItem)\n    Print(\"Selected custom item: {0}\", customItem.Name);","python":"selectedItem = api.MainMenu.SelectedItem\nif isinstance(selectedItem.__implementation__, MainMenuCustomItem):\n    api.Print(f\"Selected custom item: {MainMenuCustomItem(selectedItem).Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuCustomItem.Name","kind":"property","name":"Name","type":"T:cAlgo.API.MainMenuCustomItem","namespace":"cAlgo.API","group":"MainMenu","csharp":"string Name {get;}","python":"mainMenuCustomItem.Name: str","summary":"Gets name of item.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nMainMenuCustomItem item = MainMenu.AddItem(\"My Item\", icon);\nPrint(\"Custom item name: {0}\", item.Name);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nitem = api.MainMenu.AddItem(\"My Item\", icon)\napi.Print(f\"Custom item name: {item.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuCustomItem/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuItem","kind":"interface","name":"MainMenuItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuItem","python":"MainMenuItem","summary":"Represents a item in main menu.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"MainMenuItem selectedItem = MainMenu.SelectedItem;\nvar description = selectedItem switch\n{\n    MainMenuBuiltInItem builtInItem => builtInItem.Type.ToString(),\n    MainMenuCustomItem customItem => customItem.Name,\n    _ => \"None\"\n};\nPrint(\"Selected main menu item: {0}\", description);","python":"selectedItem = api.MainMenu.SelectedItem\nif isinstance(selectedItem.__implementation__, MainMenuBuiltInItem):\n    api.Print(f\"Selected main menu item: {MainMenuBuiltInItem(selectedItem).Type}\")\nelif isinstance(selectedItem.__implementation__, MainMenuCustomItem):\n    api.Print(f\"Selected main menu item: {MainMenuCustomItem(selectedItem).Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuOwnCustomItem","kind":"interface","name":"MainMenuOwnCustomItem","type":null,"namespace":"cAlgo.API","group":"MainMenu","csharp":"public interface MainMenuOwnCustomItem","python":"MainMenuOwnCustomItem","summary":"Represents a custom item in main menu which is owned / added by plugin.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nMainMenuOwnCustomItem item = MainMenu.AddItem(\"My Item\", icon);\nvar webView = new WebView();\nwebView.Loaded += _ => webView.NavigateAsync(\"https://help.ctrader.com/\");\nitem.Child = webView;\nMainMenu.TryChangeSelectedItem(item);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nitem = api.MainMenu.AddItem(\"My Item\", icon)\nwebView = WebView()\nwebView.Loaded += lambda _: webView.NavigateAsync(\"https://help.ctrader.com/\")\nitem.Child = webView\napi.MainMenu.TryChangeSelectedItem(item)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuOwnCustomItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuOwnCustomItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuOwnCustomItem.Child","kind":"property","name":"Child","type":"T:cAlgo.API.MainMenuOwnCustomItem","namespace":"cAlgo.API","group":"MainMenu","csharp":"ControlBase Child {get; set;}","python":"mainMenuOwnCustomItem.Child: ControlBase","summary":"Get / set content of item.","remarks":"This control will be shown when current item is selected.","parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\");\nvar item = MainMenu.AddItem(\"My Item\", icon);\nvar panel = new StackPanel();\npanel.AddChild(new TextBlock { Text = \"Plugin page content\" });\nitem.Child = panel;","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>\")\nitem = api.MainMenu.AddItem(\"My Item\", icon)\npanel = StackPanel()\ntextBlock = TextBlock()\ntextBlock.Text = \"Plugin page content\"\npanel.AddChild(textBlock)\nitem.Child = panel"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuOwnCustomItem/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/MainMenu/MainMenuOwnCustomItem/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MainMenuSelectedItemChangedEventArgs","kind":"class","name":"MainMenuSelectedItemChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class MainMenuSelectedItemChangedEventArgs","python":"MainMenuSelectedItemChangedEventArgs","summary":"Provides data for the main menu selected item changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MainMenu.SelectedItemChanged += OnMainMenuSelectedItemChanged;\n}\n\nprivate void OnMainMenuSelectedItemChanged(MainMenuSelectedItemChangedEventArgs args)\n{\n    Print(\"Main menu selection changed from {0} to {1}\", args.OldItem, args.NewItem);\n}","python":"def on_start(self):\n    api.MainMenu.SelectedItemChanged += self.on_main_menu_selected_item_changed\n\ndef on_main_menu_selected_item_changed(self, args):\n    api.Print(f\"Main menu selection changed from {args.OldItem} to {args.NewItem}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuSelectedItemChangedEventArgs.NewItem","kind":"property","name":"NewItem","type":"T:cAlgo.API.MainMenuSelectedItemChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public MainMenuItem NewItem {get;}","python":"mainMenuSelectedItemChangedEventArgs.NewItem: MainMenuItem","summary":"Gets new selected item.","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuItem","pythonType":"MainMenuItem","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MainMenu.SelectedItemChanged += OnMainMenuSelectedItemChanged;\n}\n\nprivate void OnMainMenuSelectedItemChanged(MainMenuSelectedItemChangedEventArgs args)\n{\n    if (args.NewItem is MainMenuCustomItem customItem)\n        Print(\"Custom item {0} selected\", customItem.Name);\n}","python":"def on_start(self):\n    api.MainMenu.SelectedItemChanged += self.on_main_menu_selected_item_changed\n\ndef on_main_menu_selected_item_changed(self, args):\n    api.Print(f\"Newly selected item: {args.NewItem}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/NewItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/NewItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MainMenuSelectedItemChangedEventArgs.OldItem","kind":"property","name":"OldItem","type":"T:cAlgo.API.MainMenuSelectedItemChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public MainMenuItem OldItem {get;}","python":"mainMenuSelectedItemChangedEventArgs.OldItem: MainMenuItem","summary":"Gets old selected item.","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenuItem","pythonType":"MainMenuItem","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MainMenu.SelectedItemChanged += OnMainMenuSelectedItemChanged;\n}\n\nprivate void OnMainMenuSelectedItemChanged(MainMenuSelectedItemChangedEventArgs args)\n{\n    if (args.OldItem is MainMenuBuiltInItem builtInItem)\n        Print(\"Left built-in item {0}\", builtInItem.Type);\n}","python":"def on_start(self):\n    api.MainMenu.SelectedItemChanged += self.on_main_menu_selected_item_changed\n\ndef on_main_menu_selected_item_changed(self, args):\n    api.Print(f\"Previously selected item: {args.OldItem}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/OldItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MainMenuSelectedItemChangedEventArgs/OldItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Internals.MarketData","kind":"interface","name":"MarketData","type":null,"namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"public interface MarketData","python":"MarketData","summary":"Provide access to charts data (bars and ticks) and to the Depth of Market data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to get a symbol and time frame market data\n    public partial class MarketDataSample : Indicator\n    {\n        private Bars _bars;\n\n        private Ticks _ticks;\n\n        private MarketDepth _marketDepth;\n\n        protected override void Initialize()\n        {\n            var symbol = UseCurrentSymbol ? Symbol : Symbols.GetSymbol(OtherSymbolName);\n            var timeframe = UseCurrentTimeFrame ? TimeFrame : OtherTimeFrame;\n\n            // You can use GetBarsAsync instead of GetBars\n            _bars = MarketData.GetBars(timeframe, symbol.Name);\n            // You can use GetTicksAsync instead of GetTicks\n            _ticks = MarketData.GetTicks(symbol.Name);\n\n            _marketDepth = MarketData.GetMarketDepth(symbol.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass MarketDataSample():\n    def initialize(self):\n        symbol = api.Symbol if api.UseCurrentSymbol else api.Symbols.GetSymbol(api.OtherSymbolName)\n        timeframe = api.TimeFrame if api.UseCurrentTimeFrame else api.OtherTimeFrame\n\n        # You can use GetBarsAsync instead of GetBars\n        self.bars = api.MarketData.GetBars(timeframe, symbol.Name)\n        # You can use GetTicksAsync instead of GetTicks\n        self.ticks = api.MarketData.GetTicks(symbol.Name)\n        # Getting market depth data\n        self.marketDepth = api.MarketData.GetMarketDepth(symbol.Name)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"UseCurrentSymbol\",\n      \"DisplayName\": \"Use Current Symbol\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    },\n    {\n      \"Name\": \"OtherSymbolName\",\n      \"DisplayName\": \"Other Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"GBPUSD\"\n    },\n    {\n      \"Name\": \"UseCurrentTimeFrame\",\n      \"DisplayName\": \"Use Current TimeFrame\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    },\n    {\n      \"Name\": \"OtherTimeFrame\",\n      \"DisplayName\": \"Other TimeFrame\",\n      \"Type\": \"TimeFrame\",\n      \"DefaultValue\": \"Daily\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetBars(cAlgo.API.TimeFrame)","kind":"method","name":"GetBars","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"Bars GetBars(TimeFrame timeFrame)","python":"api.MarketData.GetBars(timeFrame: TimeFrame) -> Bars","summary":"Gets the bars for the specific timeframe.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The bars time frame"}],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"Bars","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var hourlyBars = MarketData.GetBars(TimeFrame.Hour);\nPrint(\"{0} hourly bars, last close: {1}\", hourlyBars.Count, hourlyBars.ClosePrices.LastValue);","python":"hourlyBars = api.MarketData.GetBars(TimeFrame.Hour)\napi.Print(f\"{hourlyBars.Count} hourly bars, last close: {hourlyBars.ClosePrices.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetBars(cAlgo.API.TimeFrame,System.String)","kind":"method","name":"GetBars","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"Bars GetBars(TimeFrame timeFrame, string symbolName)","python":"api.MarketData.GetBars(timeFrame: TimeFrame, symbolName: str) -> Bars","summary":"Gets the chart bars for the specific timeframe for the specific symbol.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The bars time frame"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The bars symbol name"}],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"Bars","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gbpUsdDailyBars = MarketData.GetBars(TimeFrame.Daily, \"GBPUSD\");\nPrint(\"GBPUSD daily high: {0}\", gbpUsdDailyBars.HighPrices.LastValue);","python":"gbpUsdDailyBars = api.MarketData.GetBars(TimeFrame.Daily, \"GBPUSD\")\napi.Print(f\"GBPUSD daily high: {gbpUsdDailyBars.HighPrices.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBars/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetBarsAsync(cAlgo.API.TimeFrame,System.Action{cAlgo.API.Bars})","kind":"method","name":"GetBarsAsync","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"void GetBarsAsync(TimeFrame timeFrame, Action<Bars> callback)","python":"api.MarketData.GetBarsAsync(timeFrame: TimeFrame, callback: Callable[[Bars], None]) -> None","summary":"The asynchronous method to get the bars for the specific timeframe for the specific symbol.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The bars time frame"},{"name":"callback","csharpType":"Action<Bars>","pythonType":"Callable[[Bars], None]","summary":"The callback that will be called after getting the bars"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MarketData.GetBarsAsync(TimeFrame.Hour, bars => Print(\"Loaded {0} hourly bars\", bars.Count));","python":"api.MarketData.GetBarsAsync(TimeFrame.Hour, lambda bars: api.Print(f\"Loaded {bars.Count} hourly bars\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBarsAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBarsAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetBarsAsync(cAlgo.API.TimeFrame,System.String,System.Action{cAlgo.API.Bars})","kind":"method","name":"GetBarsAsync","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"void GetBarsAsync(TimeFrame timeFrame, string symbolName, Action<Bars> callback)","python":"api.MarketData.GetBarsAsync(timeFrame: TimeFrame, symbolName: str, callback: Callable[[Bars], None]) -> None","summary":"The asynchronous method to get the specific bars for the specific timeframe for the specific symbol.","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The bars time frame"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The bars symbol name"},{"name":"callback","csharpType":"Action<Bars>","pythonType":"Callable[[Bars], None]","summary":"The callback that will be called after getting the bars"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MarketData.GetBarsAsync(TimeFrame.Daily, \"EURUSD\", bars => Print(\"EURUSD daily close: {0}\", bars.ClosePrices.LastValue));","python":"api.MarketData.GetBarsAsync(TimeFrame.Daily, \"EURUSD\", lambda bars: api.Print(f\"EURUSD daily close: {bars.ClosePrices.LastValue}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBarsAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetBarsAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetMarketDepth(System.String)","kind":"method","name":"GetMarketDepth","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"MarketDepth GetMarketDepth(string symbolName)","python":"api.MarketData.GetMarketDepth(symbolName: str) -> MarketDepth","summary":"Gets the Depth of Market for the specific symbol.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name e.g. \"EURUSD\""}],"returns":{"csharpType":"MarketDepth","pythonType":"MarketDepth","summary":"Depth of Market","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var md = MarketData.GetMarketDepth(\"EURUSD\");","python":"md = api.MarketData.GetMarketDepth(\"EURUSD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetMarketDepth/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetMarketDepth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetTicks","kind":"method","name":"GetTicks","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"Ticks GetTicks()","python":"api.MarketData.GetTicks() -> Ticks","summary":"Gets the Tick data.","remarks":null,"parameters":[],"returns":{"csharpType":"Ticks","pythonType":"Ticks","summary":"Ticks","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nPrint(\"Ticks: {0}, last bid: {1}, last ask: {2}\", ticks.Count, ticks.LastTick.Bid, ticks.LastTick.Ask);","python":"ticks = api.MarketData.GetTicks()\napi.Print(f\"Ticks: {ticks.Count}, last bid: {ticks.LastTick.Bid}, last ask: {ticks.LastTick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicks/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicks/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetTicks(System.String)","kind":"method","name":"GetTicks","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"Ticks GetTicks(string symbolName)","python":"api.MarketData.GetTicks(symbolName: str) -> Ticks","summary":"Gets the Tick data for the specific symbol.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The ticks symbol name"}],"returns":{"csharpType":"Ticks","pythonType":"Ticks","summary":"Ticks","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var eurUsdTicks = MarketData.GetTicks(\"EURUSD\");\nPrint(\"EURUSD last tick time: {0}\", eurUsdTicks.LastTick.Time);","python":"eurUsdTicks = api.MarketData.GetTicks(\"EURUSD\")\napi.Print(f\"EURUSD last tick time: {eurUsdTicks.LastTick.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicks/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicks/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetTicksAsync(System.Action{cAlgo.API.Ticks})","kind":"method","name":"GetTicksAsync","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"void GetTicksAsync(Action<Ticks> callback)","python":"api.MarketData.GetTicksAsync(callback: Callable[[Ticks], None]) -> None","summary":"The asynchronous method to get tick data.","remarks":null,"parameters":[{"name":"callback","csharpType":"Action<Ticks>","pythonType":"Callable[[Ticks], None]","summary":"The callback that will be called after getting the ticks"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MarketData.GetTicksAsync(ticks => Print(\"Loaded {0} ticks\", ticks.Count));","python":"api.MarketData.GetTicksAsync(lambda ticks: api.Print(f\"Loaded {ticks.Count} ticks\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicksAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicksAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetTicksAsync(System.String,System.Action{cAlgo.API.Ticks})","kind":"method","name":"GetTicksAsync","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"void GetTicksAsync(string symbolName, Action<Ticks> callback)","python":"api.MarketData.GetTicksAsync(symbolName: str, callback: Callable[[Ticks], None]) -> None","summary":"The asynchronous method to get tick data for the specific symbol.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The ticks symbol name"},{"name":"callback","csharpType":"Action<Ticks>","pythonType":"Callable[[Ticks], None]","summary":"The callback that will be called after getting the ticks"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MarketData.GetTicksAsync(\"GBPUSD\", ticks => Print(\"GBPUSD last bid: {0}\", ticks.LastTick.Bid));","python":"api.MarketData.GetTicksAsync(\"GBPUSD\", lambda ticks: api.Print(f\"GBPUSD last bid: {ticks.LastTick.Bid}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicksAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/GetTicksAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetMarketDepth(cAlgo.API.Internals.Symbol)","kind":"method","name":"GetMarketDepth","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"MarketDepth GetMarketDepth(Symbol symbol)","python":"api.MarketData.GetMarketDepth(symbol: Symbol) -> MarketDepth","summary":"","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""}],"returns":{"csharpType":"MarketDepth","pythonType":"MarketDepth","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use GetMarketDepth(string symbolName) instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetSeries(cAlgo.API.TimeFrame)","kind":"method","name":"GetSeries","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"MarketSeries GetSeries(TimeFrame timeFrame)","python":"api.MarketData.GetSeries(timeFrame: TimeFrame) -> MarketSeries","summary":"","remarks":null,"parameters":[{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":""}],"returns":{"csharpType":"MarketSeries","pythonType":"MarketSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetSeries(System.String,cAlgo.API.TimeFrame)","kind":"method","name":"GetSeries","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"MarketSeries GetSeries(string symbolName, TimeFrame timeFrame)","python":"api.MarketData.GetSeries(symbolName: str, timeFrame: TimeFrame) -> MarketSeries","summary":"","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":""}],"returns":{"csharpType":"MarketSeries","pythonType":"MarketSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetSeries(cAlgo.API.Internals.Symbol,cAlgo.API.TimeFrame)","kind":"method","name":"GetSeries","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"MarketSeries GetSeries(Symbol symbol, TimeFrame timeFrame)","python":"api.MarketData.GetSeries(symbol: Symbol, timeFrame: TimeFrame) -> MarketSeries","summary":"","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":""}],"returns":{"csharpType":"MarketSeries","pythonType":"MarketSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use GetSeries(string symbolName, TimeFrame timeFrame) instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketData.GetSymbol(System.String)","kind":"method","name":"GetSymbol","type":"T:cAlgo.API.Internals.MarketData","namespace":"cAlgo.API.Internals","group":"Market Data","csharp":"Symbol GetSymbol(string symbolCode)","python":"api.MarketData.GetSymbol(symbolCode: str) -> Symbol","summary":"","remarks":null,"parameters":[{"name":"symbolCode","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Symbols.GetSymbol instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MarketDataLoadException","kind":"class","name":"MarketDataLoadException","type":null,"namespace":"cAlgo.API","group":"Market Data","csharp":"public sealed class MarketDataLoadException : Exception","python":"MarketDataLoadException","summary":"Represents errors that occur during loading market data (Bars/Ticks)","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"try\n{\n    var bars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\n    Print(\"Loaded {0} bars\", bars.Count);\n}\ncatch (MarketDataLoadException exception)\n{\n    Print(\"Market data loading failed: {0}\", exception.Message);\n}","python":"try:\n    bars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\n    api.Print(f\"Loaded {bars.Count} bars\")\nexcept MarketDataLoadException as exception:\n    api.Print(f\"Market data loading failed: {exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDataLoadException/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDataLoadException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MarketDepth","kind":"interface","name":"MarketDepth","type":null,"namespace":"cAlgo.API","group":"Market Depth","csharp":"public interface MarketDepth","python":"MarketDepth","summary":"Access to MarketDepth Ask Entries, Bid Entries and the event at which the market depth gets updated","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample shows how to get a symbol market depth and use it\n    public partial class MarketDepthSample : Indicator\n    {\n        private int _askNo;\n        private int _bidNo;\n\n        private MarketDepth _marketDepth;\n\n        protected override void Initialize()\n        {\n            _marketDepth = MarketData.GetMarketDepth(SymbolName);\n            _marketDepth.Updated += MarketDepth_Updated;\n        }\n\n        private void MarketDepth_Updated()\n        {\n            _askNo = 0;\n            _bidNo = 0;\n\n            var index = Bars.ClosePrices.Count - 1;\n\n            for (var i = 0; i < _marketDepth.AskEntries.Count; i++)\n                AskResult[index - i] = double.NaN;\n\n            foreach (var entry in _marketDepth.AskEntries)\n            {\n                AskResult[index - _askNo] = (-1) * entry.VolumeInUnits;\n                _askNo++;\n            }\n\n            for (var i = 0; i < _marketDepth.BidEntries.Count; i++)\n                BidResult[index - i] = double.NaN;\n\n            foreach (var entry in _marketDepth.BidEntries)\n            {\n                BidResult[index - _bidNo] = entry.VolumeInUnits;\n                _bidNo++;\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom math import nan\n\nclass MarketDepthSample():\n    def initialize(self):\n        self.marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\n        self.marketDepth.Updated += self.on_market_depth_updated\n\n    def on_market_depth_updated(self):\n        self.askNo = 0\n        self.bidNo = 0\n\n        index = api.Bars.ClosePrices.Count - 1\n\n        for i in range(self.marketDepth.AskEntries.Count):\n            api.AskResult[index - i] = nan\n\n        for entry in self.marketDepth.AskEntries:\n            api.AskResult[index - self.askNo] = (-1) * entry.VolumeInUnits\n            self.askNo += 1\n\n        for i in range(self.marketDepth.BidEntries.Count):\n            api.BidResult[index - i] = nan\n\n        for entry in self.marketDepth.BidEntries:\n            api.BidResult[index - self.bidNo] = entry.VolumeInUnits\n            self.bidNo += 1","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"BidResult\",\n      \"DisplayName\": \"Bid Entries\",\n      \"Color\": \"Red\",\n      \"PlotType\": \"Histogram\",\n      \"Thickness\": 5\n    },\n    {\n      \"Name\": \"AskResult\",\n      \"DisplayName\": \"Ask Entries\",\n      \"Color\": \"Blue\",\n      \"PlotType\": \"Histogram\",\n      \"Thickness\": 5\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketDepth.AskEntries","kind":"property","name":"AskEntries","type":"T:cAlgo.API.MarketDepth","namespace":"cAlgo.API","group":"Market Depth","csharp":"IReadonlyList<MarketDepthEntry> AskEntries {get;}","python":"marketDepth.AskEntries: IReadonlyList[MarketDepthEntry]","summary":"The total number of Ask entries","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<MarketDepthEntry>","pythonType":"IReadonlyList[MarketDepthEntry]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketDepth = MarketData.GetMarketDepth(SymbolName);\nforeach (var entry in marketDepth.AskEntries)\n    Print(\"Ask {0} for {1} units\", entry.Price, entry.VolumeInUnits);","python":"marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\nfor entry in marketDepth.AskEntries:\n    api.Print(f\"Ask {entry.Price} for {entry.VolumeInUnits} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/AskEntries/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/AskEntries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketDepth.BidEntries","kind":"property","name":"BidEntries","type":"T:cAlgo.API.MarketDepth","namespace":"cAlgo.API","group":"Market Depth","csharp":"IReadonlyList<MarketDepthEntry> BidEntries {get;}","python":"marketDepth.BidEntries: IReadonlyList[MarketDepthEntry]","summary":"The total number of Bid entries","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<MarketDepthEntry>","pythonType":"IReadonlyList[MarketDepthEntry]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketDepth = MarketData.GetMarketDepth(SymbolName);\nforeach (var entry in marketDepth.BidEntries)\n    Print(\"Bid {0} for {1} units\", entry.Price, entry.VolumeInUnits);","python":"marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\nfor entry in marketDepth.BidEntries:\n    api.Print(f\"Bid {entry.Price} for {entry.VolumeInUnits} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/BidEntries/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/BidEntries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.MarketDepth.Updated","kind":"event","name":"Updated","type":"T:cAlgo.API.MarketDepth","namespace":"cAlgo.API","group":"Market Depth","csharp":"event Action Updated;","python":"marketDepth.Updated += handler  # handler()","summary":"The event at which the market depth gets updated","remarks":null,"parameters":[],"returns":{"csharpType":"Action","pythonType":"Action","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MarketDepth _marketDepth;\n\nprotected override void OnStart()\n{\n    _marketDepth = MarketData.GetMarketDepth(SymbolName);\n    _marketDepth.Updated += OnMarketDepthUpdated;\n}\n\nprivate void OnMarketDepthUpdated()\n{\n    Print(\"Depth updated: {0} bids, {1} asks\", _marketDepth.BidEntries.Count, _marketDepth.AskEntries.Count);\n}","python":"def on_start(self):\n    self.marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\n    self.marketDepth.Updated += self.on_market_depth_updated\n\ndef on_market_depth_updated(self):\n    api.Print(f\"Depth updated: {self.marketDepth.BidEntries.Count} bids, {self.marketDepth.AskEntries.Count} asks\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/Updated/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepth/Updated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MarketDepthEntry","kind":"interface","name":"MarketDepthEntry","type":null,"namespace":"cAlgo.API","group":"Market Depth","csharp":"public interface MarketDepthEntry","python":"MarketDepthEntry","summary":"Provides access to market depth prices and volumes","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketDepth = MarketData.GetMarketDepth(\"EURUSD\");\nforeach (var entry in marketDepth.AskEntries)\n{\n    // The price and the volume of this market depth entry\n    Print(\"Price: {0}, Volume: {1}\", entry.Price, entry.VolumeInUnits);\n}","python":"marketDepth = api.MarketData.GetMarketDepth(\"EURUSD\")\nfor entry in marketDepth.AskEntries:\n    # The price and the volume of this market depth entry\n    api.Print(f\"Price: {entry.Price}, Volume: {entry.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketDepthEntry.Price","kind":"property","name":"Price","type":"T:cAlgo.API.MarketDepthEntry","namespace":"cAlgo.API","group":"Market Depth","csharp":"double Price {get;}","python":"marketDepthEntry.Price: float","summary":"The price of this market depth entry","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketDepth = MarketData.GetMarketDepth(SymbolName);\nif (marketDepth.BidEntries.Count > 0)\n    Print(\"First bid entry price: {0}\", marketDepth.BidEntries[0].Price);","python":"marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\nif marketDepth.BidEntries.Count > 0:\n    api.Print(f\"First bid entry price: {marketDepth.BidEntries[0].Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketDepthEntry.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.MarketDepthEntry","namespace":"cAlgo.API","group":"Market Depth","csharp":"double VolumeInUnits {get;}","python":"marketDepthEntry.VolumeInUnits: float","summary":"The volume of this market depth entry","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketDepth = MarketData.GetMarketDepth(SymbolName);\nvar totalAskVolume = marketDepth.AskEntries.Sum(entry => entry.VolumeInUnits);\nPrint(\"Total ask volume: {0} units\", totalAskVolume);","python":"marketDepth = api.MarketData.GetMarketDepth(api.SymbolName)\ntotalAskVolume = sum(entry.VolumeInUnits for entry in marketDepth.AskEntries)\napi.Print(f\"Total ask volume: {totalAskVolume} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketDepthEntry.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.MarketDepthEntry","namespace":"cAlgo.API","group":"Market Depth","csharp":"long Volume {get;}","python":"marketDepthEntry.Volume: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketDepth/MarketDepthEntry/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MarketFacilitationIndex","kind":"interface","name":"MarketFacilitationIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MarketFacilitationIndex","python":"MarketFacilitationIndex","summary":"The calculation of the Market Facilitation Index.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MarketFacilitationIndex _marketFacilitationIndex;\n\nprotected override void OnStart()\n{\n    _marketFacilitationIndex = Indicators.MarketFacilitationIndex();\n}\n\nprotected override void OnBar()\n{\n    Print(\"Market Facilitation Index: {0}\", _marketFacilitationIndex.Result.Last(1));\n}","python":"def on_start(self):\n    self.marketFacilitationIndex = api.Indicators.MarketFacilitationIndex()\n\ndef on_bar(self):\n    api.Print(f\"Market Facilitation Index: {self.marketFacilitationIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MarketFacilitationIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MarketFacilitationIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MarketFacilitationIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MarketFacilitationIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"marketFacilitationIndex.Result: IndicatorDataSeries","summary":"Gets the resulting series of the Market Facilitation Index calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketFacilitationIndex = Indicators.MarketFacilitationIndex();\nif (marketFacilitationIndex.Result.Last(1) > marketFacilitationIndex.Result.Last(2))\n    Print(\"Market facilitation is increasing: {0}\", marketFacilitationIndex.Result.Last(1));","python":"marketFacilitationIndex = api.Indicators.MarketFacilitationIndex()\nif marketFacilitationIndex.Result.Last(1) > marketFacilitationIndex.Result.Last(2):\n    api.Print(f\"Market facilitation is increasing: {marketFacilitationIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MarketFacilitationIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MarketFacilitationIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.MarketHours","kind":"interface","name":"MarketHours","type":null,"namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"public interface MarketHours","python":"MarketHours","summary":"Access to symbol's trading sessions schedule","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use a symbol MarketHours\n    public partial class MarketHoursSample : Indicator\n    {\n        private TextBlock _isOpenedTextBlock;\n\n        private TextBlock _timeTillCloseTextBlock;\n\n        private TextBlock _timeTillOpenTextBlock;\n\n        private Symbol _symbol;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(6, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 1);\n            style.Set(ControlProperty.Margin, 2);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n            style.Set(ControlProperty.FontSize, 8);\n\n            _symbol = UseCurrentSymbol ? Symbol : Symbols.GetSymbol(OtherSymbolName);\n\n            grid.AddChild(new TextBlock { Text = \"Symbol Info\", Style = style, HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock { Text = \"Time Till Open\", Style = style }, 1, 0);\n\n            _timeTillOpenTextBlock = new TextBlock { Text = _symbol.MarketHours.TimeTillOpen().ToString(), Style = style };\n\n            grid.AddChild(_timeTillOpenTextBlock, 1, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Time Till Close\", Style = style }, 2, 0);\n\n            _timeTillCloseTextBlock = new TextBlock { Text = _symbol.MarketHours.TimeTillClose().ToString(), Style = style };\n\n            grid.AddChild(_timeTillCloseTextBlock, 2, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Is Opened\", Style = style }, 3, 0);\n\n            _isOpenedTextBlock = new TextBlock { Text = _symbol.MarketHours.IsOpened().ToString(), Style = style };\n\n            grid.AddChild(_isOpenedTextBlock, 3, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Trading Sessions #\", Style = style }, 4, 0);\n\n            grid.AddChild(new TextBlock { Text = _symbol.MarketHours.Sessions.Count.ToString(), Style = style }, 4, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Trading Session Week Days\", Style = style }, 5, 0);\n\n            var weekDays = string.Empty;\n\n            for (var iSession = 0; iSession < _symbol.MarketHours.Sessions.Count; iSession++)\n            {\n                var currentSessionWeekDays = string.Format(\"{0}({1})-{2}({3})\", _symbol.MarketHours.Sessions[iSession].StartDay, _symbol.MarketHours.Sessions[iSession].StartTime, _symbol.MarketHours.Sessions[iSession].EndDay, _symbol.MarketHours.Sessions[iSession].EndTime);\n                weekDays = iSession == 0 ? currentSessionWeekDays : string.Format(\"{0}, {1}\", weekDays, currentSessionWeekDays);\n            }\n\n            grid.AddChild(new TextBlock { Text = weekDays, Style = style }, 5, 1);\n\n            Chart.AddControl(grid);\n\n            Timer.Start(TimeSpan.FromSeconds(1));\n        }\n\n        protected override void OnTimer()\n        {\n            _timeTillOpenTextBlock.Text = _symbol.MarketHours.TimeTillOpen().ToString();\n            _timeTillCloseTextBlock.Text = _symbol.MarketHours.TimeTillClose().ToString();\n            _isOpenedTextBlock.Text = _symbol.MarketHours.IsOpened().ToString();\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass MarketHoursSample():\n    def initialize(self):\n        grid = Grid(6, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 1)\n        self.style.Set(ControlProperty.Margin, Thickness(2))\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n        self.style.Set(ControlProperty.FontSize, 8)\n\n        self.symbol = api.Symbol if api.UseCurrentSymbol else api.Symbols.GetSymbol(api.OtherSymbolName)\n\n        titleTextBlock = self.get_text_block(\"Symbol Info\")\n        titleTextBlock.HorizontalAlignment = HorizontalAlignment.Center\n\n        grid.AddChild(titleTextBlock, 0, 0, 1, 2)\n        grid.AddChild(self.get_text_block(\"Time Till Open\"), 1, 0)\n\n        self.timeTillOpenTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillOpen()))\n\n        grid.AddChild(self.timeTillOpenTextBlock, 1, 1)\n        grid.AddChild(self.get_text_block(\"Time Till Close\"), 2, 0)\n\n        self.timeTillCloseTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillClose()))\n\n        grid.AddChild(self.timeTillCloseTextBlock, 2, 1)\n\n        grid.AddChild(self.get_text_block(\"Is Opened\"), 3, 0)\n\n        self.isOpenedTextBlock = self.get_text_block(str(self.symbol.MarketHours.IsOpened()))\n\n        grid.AddChild(self.isOpenedTextBlock, 3, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Sessions #\"), 4, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.MarketHours.Sessions.Count)), 4, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Session Week Days\"), 5, 0)\n\n        weekDays = \"\"\n\n        for session in range(self.symbol.MarketHours.Sessions.Count):\n            currentSessionWeekDays = f\"{self.symbol.MarketHours.Sessions[session].StartDay}({self.symbol.MarketHours.Sessions[session].StartTime})-{self.symbol.MarketHours.Sessions[session].EndDay}({self.symbol.MarketHours.Sessions[session].EndTime})\"\n            weekDays = currentSessionWeekDays if session == 0 else f\"{weekDays}, {currentSessionWeekDays}\"\n\n        grid.AddChild(self.get_text_block(weekDays), 5, 1)\n\n        api.Chart.AddControl(grid)\n        api.Timer.Start(1)\n\n    def on_timer(self):\n        self.timeTillOpenTextBlock.Text = str(self.symbol.MarketHours.TimeTillOpen())\n        self.timeTillCloseTextBlock.Text = str(self.symbol.MarketHours.TimeTillClose())\n        self.isOpenedTextBlock.Text = str(self.symbol.MarketHours.IsOpened())\n\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        return textBlock","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"UseCurrentSymbol\",\n      \"DisplayName\": \"Use Current Symbol\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    },\n    {\n      \"Name\": \"OtherSymbolName\",\n      \"DisplayName\": \"Other Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"GBPUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketHours.IsOpened","kind":"method","name":"IsOpened","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"bool IsOpened()","python":"marketHours.IsOpened() -> bool","summary":"Indicates if trading session is active","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.MarketHours.IsOpened())\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, \"myLabel\");\nelse\n    Print(\"Market is closed, it opens in {0}\", Symbol.MarketHours.TimeTillOpen());","python":"if api.Symbol.MarketHours.IsOpened():\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, \"myLabel\")\nelse:\n    api.Print(f\"Market is closed, it opens in {api.Symbol.MarketHours.TimeTillOpen()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/IsOpened/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/IsOpened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketHours.IsOpened(System.DateTime)","kind":"method","name":"IsOpened","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"bool IsOpened(DateTime datetime)","python":"marketHours.IsOpened(datetime: DateTime) -> bool","summary":"Indicates if trading session is active","remarks":null,"parameters":[{"name":"datetime","csharpType":"DateTime","pythonType":"DateTime","summary":"Date and time to check"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var inOneHour = Server.Time.AddHours(1);\nPrint(\"Market open in one hour: {0}\", Symbol.MarketHours.IsOpened(inOneHour));","python":"inOneHour = api.Server.Time.AddHours(1)\napi.Print(f\"Market open in one hour: {api.Symbol.MarketHours.IsOpened(inOneHour)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/IsOpened/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/IsOpened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketHours.TimeTillClose","kind":"method","name":"TimeTillClose","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"TimeSpan TimeTillClose()","python":"marketHours.TimeTillClose() -> TimeSpan","summary":"Time left till end of current trading session. Returns 0 if session is not active","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timeTillClose = Symbol.MarketHours.TimeTillClose();\nif (timeTillClose > TimeSpan.Zero && timeTillClose < TimeSpan.FromMinutes(5))\n    Print(\"Session closes in {0}\", timeTillClose);","python":"from System import TimeSpan\ntimeTillClose = api.Symbol.MarketHours.TimeTillClose()\nif timeTillClose > TimeSpan.Zero and timeTillClose < TimeSpan.FromMinutes(5):\n    api.Print(f\"Session closes in {timeTillClose}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/TimeTillClose/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/TimeTillClose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.MarketHours.TimeTillOpen","kind":"method","name":"TimeTillOpen","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"TimeSpan TimeTillOpen()","python":"marketHours.TimeTillOpen() -> TimeSpan","summary":"Time left till start of new trading session. Returns 0 if session is already active","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Time till the next session opens: {0}\", Symbol.MarketHours.TimeTillOpen());","python":"api.Print(f\"Time till the next session opens: {api.Symbol.MarketHours.TimeTillOpen()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/TimeTillOpen/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/TimeTillOpen/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.MarketHours.Holidays","kind":"property","name":"Holidays","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"IReadonlyList<TradingHoliday> Holidays {get;}","python":"marketHours.Holidays: IReadonlyList[TradingHoliday]","summary":"List of all symbol's trading holidays","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<TradingHoliday>","pythonType":"IReadonlyList[TradingHoliday]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var holiday in Symbol.MarketHours.Holidays)\n    Print(\"{0}: {1} - {2}, recurring: {3}\", holiday.Name, holiday.StartTime, holiday.EndTime, holiday.IsRecurring);","python":"for holiday in api.Symbol.MarketHours.Holidays:\n    api.Print(f\"{holiday.Name}: {holiday.StartTime} - {holiday.EndTime}, recurring: {holiday.IsRecurring}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/Holidays/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/Holidays/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.MarketHours.Sessions","kind":"property","name":"Sessions","type":"T:cAlgo.API.Internals.MarketHours","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"IReadonlyList<TradingSession> Sessions {get;}","python":"marketHours.Sessions: IReadonlyList[TradingSession]","summary":"List of all symbol's trading sessions","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<TradingSession>","pythonType":"IReadonlyList[TradingSession]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var session in Symbol.MarketHours.Sessions)\n    Print(\"{0} {1} - {2} {3}\", session.StartDay, session.StartTime, session.EndDay, session.EndTime);","python":"for session in api.Symbol.MarketHours.Sessions:\n    api.Print(f\"{session.StartDay} {session.StartTime} - {session.EndDay} {session.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/Sessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/MarketHours/Sessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MarketSession","kind":"enum","name":"MarketSession","type":null,"namespace":"cAlgo.API","group":"Market Data","csharp":"public enum MarketSession","python":"MarketSession","summary":"Represents the predefined market sessions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    public partial class Test : Robot\n    {\n        protected override void OnStart()\n        {\n            Print($\"Current Sessions: {MarketSessions}\");\n        }\n\n        protected override void OnTick()\n        {\n            if (!MarketSessions.HasFlag(WorkingSession))\n                return;\n\n            // Do something on WorkingSession only\n            Print(\"It's working session\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        print(f\"Current Sessions: {api.MarketSessions}\")\n\n    def on_tick(self):\n        if api.MarketSessions.HasFlag(api.WorkingSession) == False:\n            return\n\n        # Do something on WorkingSession only\n        print(\"It's working session\")","config":"{\n  \"AccessRights\": \"FullAccess\",\n  \"Parameters\": [\n    {\n      \"Name\": \"WorkingSession\",\n      \"DisplayName\": \"Working Session\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MarketSession\",\n      \"DefaultValue\": \"London\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.None","kind":"enum value","name":"None","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.None;","python":"MarketSession.None","summary":"None","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.Wellington","kind":"enum value","name":"Wellington","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.Wellington;","python":"MarketSession.Wellington","summary":"Wellington","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.Tokyo","kind":"enum value","name":"Tokyo","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.Tokyo;","python":"MarketSession.Tokyo","summary":"Tokyo","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.Sydney","kind":"enum value","name":"Sydney","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.Sydney;","python":"MarketSession.Sydney","summary":"Sydney","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.Singapore","kind":"enum value","name":"Singapore","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.Singapore;","python":"MarketSession.Singapore","summary":"Singapore","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.Frankfurt","kind":"enum value","name":"Frankfurt","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.Frankfurt;","python":"MarketSession.Frankfurt","summary":"Frankfurt","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.London","kind":"enum value","name":"London","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.London;","python":"MarketSession.London","summary":"London","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MarketSession.NewYork","kind":"enum value","name":"NewYork","type":"T:cAlgo.API.MarketSession","namespace":"cAlgo.API","group":"Market Data","csharp":"MarketSession.NewYork;","python":"MarketSession.NewYork","summary":"NewYork","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/MarketSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MarketSessionChangedEventArgs","kind":"class","name":"MarketSessionChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class MarketSessionChangedEventArgs","python":"MarketSessionChangedEventArgs","summary":"The arguments for MarketSessionsChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MarketSessionsChanged += OnMarketSessionsChanged;\n}\n\nprivate void OnMarketSessionsChanged(MarketSessionChangedEventArgs args)\n{\n    Print(\"Market sessions changed from {0} to {1}\", args.PreviousSessions, args.NewSessions);\n}","python":"def on_start(self):\n    api.MarketSessionsChanged += self.on_market_sessions_changed\n\ndef on_market_sessions_changed(self, args):\n    api.Print(f\"Market sessions changed from {args.PreviousSessions} to {args.NewSessions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketSessionChangedEventArgs.NewSessions","kind":"property","name":"NewSessions","type":"T:cAlgo.API.MarketSessionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public MarketSession NewSessions {get;}","python":"marketSessionChangedEventArgs.NewSessions: MarketSession","summary":"All current sessions including any new sessions that have just begun. The value of NewSessions is always equal to the value of the MarketSessions property of a cBot / indicator. Returns MarketSession.None if no new sessions started when the MarketSessionsChanged event was triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MarketSessionsChanged += OnMarketSessionsChanged;\n}\n\nprivate void OnMarketSessionsChanged(MarketSessionChangedEventArgs args)\n{\n    if (args.NewSessions.HasFlag(MarketSession.London))\n        Print(\"London session is open\");\n}","python":"def on_start(self):\n    api.MarketSessionsChanged += self.on_market_sessions_changed\n\ndef on_market_sessions_changed(self, args):\n    if args.NewSessions.HasFlag(MarketSession.London):\n        api.Print(\"London session is open\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/NewSessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/NewSessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MarketSessionChangedEventArgs.PreviousSessions","kind":"property","name":"PreviousSessions","type":"T:cAlgo.API.MarketSessionChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public MarketSession PreviousSessions {get;}","python":"marketSessionChangedEventArgs.PreviousSessions: MarketSession","summary":"Returns the previous value of the MarketSessions property before the MarketSessionsChanged event was triggered. Returns MarketSession.None if no previous sessions ended when the event was triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MarketSessionsChanged += OnMarketSessionsChanged;\n}\n\nprivate void OnMarketSessionsChanged(MarketSessionChangedEventArgs args)\n{\n    if (args.PreviousSessions.HasFlag(MarketSession.NewYork) && !args.NewSessions.HasFlag(MarketSession.NewYork))\n        Print(\"New York session has just closed\");\n}","python":"def on_start(self):\n    api.MarketSessionsChanged += self.on_market_sessions_changed\n\ndef on_market_sessions_changed(self, args):\n    if args.PreviousSessions.HasFlag(MarketSession.NewYork) and not args.NewSessions.HasFlag(MarketSession.NewYork):\n        api.Print(\"New York session has just closed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/PreviousSessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MarketSessionChangedEventArgs/PreviousSessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MassIndex","kind":"interface","name":"MassIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MassIndex","python":"MassIndex","summary":"The Mass Index Indicator interface.","remarks":"The Mass Index Indicator can be a great tool to identify future price reversal. It is expected for a reversal to occur when Mass index is rising.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MassIndex _massIndex;\nprotected override void Initialize()\n{\n    _massIndex = Indicators.MassIndex(14);\n}\n\npublic override void Calculate(int index)\n{\n    double massIndex = _massIndex.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.massIndex = api.Indicators.MassIndex(14)\n\n    def calculate(self, index):\n        massIndex = self.massIndex.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Mass Index indicator\n    public partial class MassIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MassIndex _massIndex;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _massIndex = Indicators.MassIndex(9);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_massIndex.Result.Last(1) < 9) return;\n\n            if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MassIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.massIndex = api.Indicators.MassIndex(9)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if self.massIndex.Result.Last(0) < 9:\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MassIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MassIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MassIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MassIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"massIndex.Result: IndicatorDataSeries","summary":"Gets the resulting series of the calculation of the Mass Index indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var massIndex = Indicators.MassIndex(9);\nif (massIndex.Result.Last(1) > 27)\n    Print(\"Mass Index reversal bulge: {0}\", massIndex.Result.Last(1));","python":"massIndex = api.Indicators.MassIndex(9)\nif massIndex.Result.Last(1) > 27:\n    api.Print(f\"Mass Index reversal bulge: {massIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MassIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MassIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MedianPrice","kind":"interface","name":"MedianPrice","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MedianPrice","python":"MedianPrice","summary":"A Median Price is an average of one period’s high and low values.","remarks":"A Median Price is often used as a component for calculating other indicators.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MedianPrice _price;\nprotected override void Initialize()\n{\n    _price = Indicators.MedianPrice();\n}\npublic override void Calculate(int index)\n{\n    double price = _price.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.medianPrice = api.Indicators.MedianPrice()\n\n    def calculate(self, index):\n        price = self.medianPrice.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Median Price indicator\n    public partial class MedianPriceSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MedianPrice _medianPrice;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _medianPrice = Indicators.MedianPrice();\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _medianPrice.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (BotPositions.Length == 0)\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _medianPrice.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (BotPositions.Length == 0)\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MedianPriceSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.medianPrice = api.Indicators.MedianPrice()\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > self.medianPrice.Result.Last(0):\n            self.close_positions(TradeType.Sell)\n            if len(self.get_bot_positions()) == 0:\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.medianPrice.Result.Last(0):\n            self.close_positions(TradeType.Buy)\n            if len(self.get_bot_positions()) == 0:\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MedianPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MedianPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MedianPrice.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MedianPrice","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"medianPrice.Result: IndicatorDataSeries","summary":"The resulting series of the calculation of Median Price","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MedianPrice _price;\nprotected override void Initialize()\n{\n    _price = Indicators.MedianPrice();\n}\npublic override void Calculate(int index)\n{\n    double price = _price.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.medianPrice = api.Indicators.MedianPrice()\n\n    def calculate(self, index):\n        price = self.medianPrice.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MedianPrice/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MedianPrice/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MessageArgs`1","kind":"class","name":"MessageArgs<TMessage>","type":null,"namespace":"cAlgo.API","group":"Messages","csharp":"public class MessageArgs<TMessage>","python":"MessageArgs","summary":"Provides data for the message handler.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Messages.Subscribe<string>(\"Signals\", OnSignalReceived);\n}\n\nprivate void OnSignalReceived(MessageArgs<string> args)\n{\n    Print(\"{0} from {1} on chart {2}: {3}\", args.Subscription.Subject, args.SenderInstanceId, args.ChartId, args.Message);\n}","python":"# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageArgs`1.ChartId","kind":"property","name":"ChartId","type":"T:cAlgo.API.MessageArgs`1","namespace":"cAlgo.API","group":"Messages","csharp":"public string ChartId {get;}","python":"messageArgs.ChartId: str","summary":"Gets message sender ChartId. ChartId is null for plugin sent messages.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<string>(\"Signals\", args =>\n{\n    if (args.ChartId == null)\n        Print(\"Signal sent by a plugin: {0}\", args.Message);\n    else\n        Print(\"Signal sent from chart {0}: {1}\", args.ChartId, args.Message);\n});","python":"# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/ChartId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/ChartId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageArgs`1.Message","kind":"property","name":"Message","type":"T:cAlgo.API.MessageArgs`1","namespace":"cAlgo.API","group":"Messages","csharp":"public TMessage Message {get;}","python":"messageArgs.Message: TMessage","summary":"Gets the message.","remarks":null,"parameters":[],"returns":{"csharpType":"TMessage","pythonType":"TMessage","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<double>(\"Target Price\", args => Print(\"New target price: {0}\", args.Message));","python":"# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/Message/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/Message/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageArgs`1.SenderInstanceId","kind":"property","name":"SenderInstanceId","type":"T:cAlgo.API.MessageArgs`1","namespace":"cAlgo.API","group":"Messages","csharp":"public string SenderInstanceId {get;}","python":"messageArgs.SenderInstanceId: str","summary":"Gets message sender instance Id.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<string>(\"Signals\", args =>\n{\n    if (args.SenderInstanceId != InstanceId)\n        Print(\"Signal from instance {0}: {1}\", args.SenderInstanceId, args.Message);\n});","python":"# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/SenderInstanceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/SenderInstanceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageArgs`1.Subscription","kind":"property","name":"Subscription","type":"T:cAlgo.API.MessageArgs`1","namespace":"cAlgo.API","group":"Messages","csharp":"public MessageSubscription Subscription {get;}","python":"messageArgs.Subscription: MessageSubscription","summary":"Gets message subscription.","remarks":null,"parameters":[],"returns":{"csharpType":"MessageSubscription","pythonType":"MessageSubscription","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<string>(\"Signals\", args =>\n{\n    Print(\"Received {0}, unsubscribing from {1}\", args.Message, args.Subscription.Subject);\n    args.Subscription.Unsubscribe();\n});","python":"# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/Subscription/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/Subscription/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MessageBox","kind":"class","name":"MessageBox","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public static class MessageBox","python":"MessageBox","summary":"A message dialog window that you can use to show a message with buttons","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = MessageBox.Show(\"Close all open positions?\", \"Confirm\", MessageBoxButton.YesNo, MessageBoxImage.Question);\nif (result == MessageBoxResult.Yes)\n{\n    foreach (var position in Positions.ToArray())\n        ClosePosition(position);\n}","python":"result = MessageBox.Show(\"Close all open positions?\", \"Confirm\", MessageBoxButton.YesNo, MessageBoxImage.Question)\nif result == MessageBoxResult.Yes:\n    for position in list(api.Positions):\n        api.ClosePosition(position)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(System.String)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(string messageBoxText)","python":"MessageBox.Show(messageBoxText: str) -> MessageBoxResult","summary":"Shows a MessageBox with just a text","remarks":null,"parameters":[{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MessageBox.Show(\"Daily loss limit reached, trading is paused\");","python":"MessageBox.Show(\"Daily loss limit reached, trading is paused\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(System.String,System.String)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(string messageBoxText, string caption)","python":"MessageBox.Show(messageBoxText: str, caption: str) -> MessageBoxResult","summary":"Shows a MessageBox with text and caption / title","remarks":null,"parameters":[{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MessageBox.Show(\"Equity: \" + Account.Equity, \"Account status\");","python":"MessageBox.Show(f\"Equity: {api.Account.Equity}\", \"Account status\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(System.String,System.String,cAlgo.API.MessageBoxButton)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button)","python":"MessageBox.Show(messageBoxText: str, caption: str, button: MessageBoxButton) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, and button","remarks":null,"parameters":[{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = MessageBox.Show(\"Open a buy position on \" + SymbolName + \"?\", \"Confirm order\", MessageBoxButton.OKCancel);\nif (result == MessageBoxResult.OK)\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01));","python":"result = MessageBox.Show(f\"Open a buy position on {api.SymbolName}?\", \"Confirm order\", MessageBoxButton.OKCancel)\nif result == MessageBoxResult.OK:\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(System.String,System.String,cAlgo.API.MessageBoxButton,cAlgo.API.MessageBoxImage)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)","python":"MessageBox.Show(messageBoxText: str, caption: str, button: MessageBoxButton, icon: MessageBoxImage) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, button, and an image icon","remarks":null,"parameters":[{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"},{"name":"icon","csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"The icon that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.MarginLevel < 200)\n    MessageBox.Show(\"Margin level is \" + Account.MarginLevel + \"%\", \"Warning\", MessageBoxButton.OK, MessageBoxImage.Warning);","python":"if api.Account.MarginLevel is not None and api.Account.MarginLevel < 200:\n    MessageBox.Show(f\"Margin level is {api.Account.MarginLevel}%\", \"Warning\", MessageBoxButton.OK, MessageBoxImage.Warning)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(System.String,System.String,cAlgo.API.MessageBoxButton,cAlgo.API.MessageBoxImage,cAlgo.API.MessageBoxResult)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)","python":"MessageBox.Show(messageBoxText: str, caption: str, button: MessageBoxButton, icon: MessageBoxImage, defaultResult: MessageBoxResult) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, button, icon, and a default result","remarks":null,"parameters":[{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"},{"name":"icon","csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"The icon that will be displayed on MessageBox"},{"name":"defaultResult","csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"The MessageBox default result"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = MessageBox.Show(\"Stop the cBot?\", \"Confirm\", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.No);\nif (result == MessageBoxResult.Yes)\n    Stop();","python":"result = MessageBox.Show(\"Stop the cBot?\", \"Confirm\", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.No)\nif result == MessageBoxResult.Yes:\n    api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(cAlgo.API.Window,System.String)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(Window owner, string messageBoxText)","python":"MessageBox.Show(owner: Window, messageBoxText: str) -> MessageBoxResult","summary":"Shows a MessageBox with text that is a child of another window","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the MessageBox"},{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Settings\", Width = 300, Height = 200 };\nwindow.Show();\nMessageBox.Show(window, \"Settings saved\");","python":"window = Window()\nwindow.Title = \"Settings\"\nwindow.Show()\nMessageBox.Show(window, \"Settings saved\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(cAlgo.API.Window,System.String,System.String)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)","python":"MessageBox.Show(owner: Window, messageBoxText: str, caption: str) -> MessageBoxResult","summary":"Shows a MessageBox with text, and caption / title that is a child of another window","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the MessageBox"},{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Orders\", Width = 300, Height = 200 };\nwindow.Show();\nMessageBox.Show(window, \"Pending orders: \" + PendingOrders.Count, \"Orders\");","python":"window = Window()\nwindow.Title = \"Orders\"\nwindow.Show()\nMessageBox.Show(window, f\"Pending orders: {api.PendingOrders.Count}\", \"Orders\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(cAlgo.API.Window,System.String,System.String,cAlgo.API.MessageBoxButton)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button)","python":"MessageBox.Show(owner: Window, messageBoxText: str, caption: str, button: MessageBoxButton) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, and button that is a child of another window","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the MessageBox"},{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Trade panel\", Width = 300, Height = 200 };\nwindow.Show();\nvar result = MessageBox.Show(window, \"Cancel all pending orders?\", \"Confirm\", MessageBoxButton.YesNo);\nif (result == MessageBoxResult.Yes)\n    foreach (var order in PendingOrders.ToArray())\n        CancelPendingOrder(order);","python":"window = Window()\nwindow.Title = \"Trade panel\"\nwindow.Show()\nresult = MessageBox.Show(window, \"Cancel all pending orders?\", \"Confirm\", MessageBoxButton.YesNo)\nif result == MessageBoxResult.Yes:\n    for order in list(api.PendingOrders):\n        api.CancelPendingOrder(order)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(cAlgo.API.Window,System.String,System.String,cAlgo.API.MessageBoxButton,cAlgo.API.MessageBoxImage)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)","python":"MessageBox.Show(owner: Window, messageBoxText: str, caption: str, button: MessageBoxButton, icon: MessageBoxImage) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, button, and image icon that is a child of another window","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the MessageBox"},{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"},{"name":"icon","csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"The icon that will be displayed on MessageBox"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Risk\", Width = 300, Height = 200 };\nwindow.Show();\nMessageBox.Show(window, \"Stop loss is required\", \"Invalid order\", MessageBoxButton.OK, MessageBoxImage.Error);","python":"window = Window()\nwindow.Title = \"Risk\"\nwindow.Show()\nMessageBox.Show(window, \"Stop loss is required\", \"Invalid order\", MessageBoxButton.OK, MessageBoxImage.Error)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"M:cAlgo.API.MessageBox.Show(cAlgo.API.Window,System.String,System.String,cAlgo.API.MessageBoxButton,cAlgo.API.MessageBoxImage,cAlgo.API.MessageBoxResult)","kind":"method","name":"Show","type":"T:cAlgo.API.MessageBox","namespace":"cAlgo.API","group":"Windows","csharp":"public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)","python":"MessageBox.Show(owner: Window, messageBoxText: str, caption: str, button: MessageBoxButton, icon: MessageBoxImage, defaultResult: MessageBoxResult) -> MessageBoxResult","summary":"Shows a MessageBox with text, caption / title, button, icon, and a default result that is a child of another window","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the MessageBox"},{"name":"messageBoxText","csharpType":"string","pythonType":"str","summary":"The text that will be displayed on MessageBox"},{"name":"caption","csharpType":"string","pythonType":"str","summary":"The caption that will be displayed on MessageBox tile bar"},{"name":"button","csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"The button that will be displayed on MessageBox"},{"name":"icon","csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"The icon that will be displayed on MessageBox"},{"name":"defaultResult","csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"The MessageBox default result"}],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"MessageBoxResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Strategy\", Width = 300, Height = 200 };\nwindow.Show();\nvar result = MessageBox.Show(window, \"Reverse all positions?\", \"Confirm\", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);\nPrint(\"User selected: {0}\", result);","python":"window = Window()\nwindow.Title = \"Strategy\"\nwindow.Show()\nresult = MessageBox.Show(window, \"Reverse all positions?\", \"Confirm\", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No)\napi.Print(f\"User selected: {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBox/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."},{"name":"Cloud","support":"None","behaviour":"Nothing is shown; Show returns MessageBoxResult.None immediately."}]}
{"id":"T:cAlgo.API.MessageBoxButton","kind":"enum","name":"MessageBoxButton","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum MessageBoxButton","python":"MessageBoxButton","summary":"This Enum contains MessageBox buttons","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = MessageBox.Show(\"Save changes?\", \"Settings\", MessageBoxButton.YesNoCancel);\nPrint(\"User selected: {0}\", result);","python":"result = MessageBox.Show(\"Save changes?\", \"Settings\", MessageBoxButton.YesNoCancel)\napi.Print(f\"User selected: {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxButton.OK","kind":"enum value","name":"OK","type":"T:cAlgo.API.MessageBoxButton","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxButton.OK;","python":"MessageBoxButton.OK","summary":"Show just an OK button on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxButton.OKCancel","kind":"enum value","name":"OKCancel","type":"T:cAlgo.API.MessageBoxButton","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxButton.OKCancel;","python":"MessageBoxButton.OKCancel","summary":"Show an OK and Cancel button on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxButton.YesNoCancel","kind":"enum value","name":"YesNoCancel","type":"T:cAlgo.API.MessageBoxButton","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxButton.YesNoCancel;","python":"MessageBoxButton.YesNoCancel","summary":"Show Yes, No, and Cancel button on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxButton.YesNo","kind":"enum value","name":"YesNo","type":"T:cAlgo.API.MessageBoxButton","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxButton.YesNo;","python":"MessageBoxButton.YesNo","summary":"Show Yes and No button on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxButton","pythonType":"MessageBoxButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MessageBoxImage","kind":"enum","name":"MessageBoxImage","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum MessageBoxImage","python":"MessageBoxImage","summary":"This Enum contains MessageBox image icons","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"MessageBox.Show(\"Connection to the trading server was restored\", \"Information\", MessageBoxButton.OK, MessageBoxImage.Information);","python":"MessageBox.Show(\"Connection to the trading server was restored\", \"Information\", MessageBoxButton.OK, MessageBoxImage.Information)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxImage.None","kind":"enum value","name":"None","type":"T:cAlgo.API.MessageBoxImage","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxImage.None;","python":"MessageBoxImage.None","summary":"The default value, MessageBox without any icon","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxImage.Error","kind":"enum value","name":"Error","type":"T:cAlgo.API.MessageBoxImage","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxImage.Error;","python":"MessageBoxImage.Error","summary":"Shows an error icon on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxImage.Question","kind":"enum value","name":"Question","type":"T:cAlgo.API.MessageBoxImage","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxImage.Question;","python":"MessageBoxImage.Question","summary":"Shows a question icon on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxImage.Warning","kind":"enum value","name":"Warning","type":"T:cAlgo.API.MessageBoxImage","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxImage.Warning;","python":"MessageBoxImage.Warning","summary":"Shows a warning icon on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxImage.Information","kind":"enum value","name":"Information","type":"T:cAlgo.API.MessageBoxImage","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxImage.Information;","python":"MessageBoxImage.Information","summary":"Shows an information icon on MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxImage","pythonType":"MessageBoxImage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxImage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MessageBoxResult","kind":"enum","name":"MessageBoxResult","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum MessageBoxResult","python":"MessageBoxResult","summary":"This Enum contains MessageBox results","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = MessageBox.Show(\"Close \" + Positions.Count + \" position(s)?\", \"Confirm\", MessageBoxButton.OKCancel);\nswitch (result)\n{\n    case MessageBoxResult.OK:\n        foreach (var position in Positions.ToArray())\n            ClosePosition(position);\n        break;\n    case MessageBoxResult.Cancel:\n        Print(\"Cancelled by user\");\n        break;\n}","python":"result = MessageBox.Show(f\"Close {api.Positions.Count} position(s)?\", \"Confirm\", MessageBoxButton.OKCancel)\nif result == MessageBoxResult.OK:\n    for position in list(api.Positions):\n        api.ClosePosition(position)\nelif result == MessageBoxResult.Cancel:\n    api.Print(\"Cancelled by user\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxResult.None","kind":"enum value","name":"None","type":"T:cAlgo.API.MessageBoxResult","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxResult.None;","python":"MessageBoxResult.None","summary":"The default result for MessageBox","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxResult.OK","kind":"enum value","name":"OK","type":"T:cAlgo.API.MessageBoxResult","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxResult.OK;","python":"MessageBoxResult.OK","summary":"MessageBox result if OK button clicked by user","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxResult.Cancel","kind":"enum value","name":"Cancel","type":"T:cAlgo.API.MessageBoxResult","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxResult.Cancel;","python":"MessageBoxResult.Cancel","summary":"MessageBox result if Cancel button clicked by user","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxResult.Yes","kind":"enum value","name":"Yes","type":"T:cAlgo.API.MessageBoxResult","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxResult.Yes;","python":"MessageBoxResult.Yes","summary":"MessageBox result if Yes button clicked by user","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MessageBoxResult.No","kind":"enum value","name":"No","type":"T:cAlgo.API.MessageBoxResult","namespace":"cAlgo.API","group":"Windows","csharp":"MessageBoxResult.No;","python":"MessageBoxResult.No","summary":"MessageBox result if No button clicked by user","remarks":null,"parameters":[],"returns":{"csharpType":"MessageBoxResult","pythonType":"MessageBoxResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/MessageBoxResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MessageSubscription","kind":"interface","name":"MessageSubscription","type":null,"namespace":"cAlgo.API","group":"Messages","csharp":"public interface MessageSubscription","python":"MessageSubscription","summary":"Represents a message subscription.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var subscription = Messages.Subscribe<string>(\"Signals\", args => Print(\"Received: {0}\", args.Message));\nPrint(\"Subscription {0} listens to {1}\", subscription.Id, subscription.Subject);","python":"# Not available in Python: subscriptions are created by the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.MessageSubscription.Unsubscribe","kind":"method","name":"Unsubscribe","type":"T:cAlgo.API.MessageSubscription","namespace":"cAlgo.API","group":"Messages","csharp":"void Unsubscribe()","python":"messageSubscription.Unsubscribe() -> None","summary":"Unsubscribes current subscription.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"private MessageSubscription _subscription;\n\nprotected override void OnStart()\n{\n    _subscription = Messages.Subscribe<string>(\"Signals\", args => Print(\"Received: {0}\", args.Message));\n}\n\nprotected override void OnStop()\n{\n    _subscription.Unsubscribe();\n}","python":"# Not available in Python: subscriptions are created by the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Unsubscribe/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Unsubscribe/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageSubscription.Id","kind":"property","name":"Id","type":"T:cAlgo.API.MessageSubscription","namespace":"cAlgo.API","group":"Messages","csharp":"string Id {get;}","python":"messageSubscription.Id: str","summary":"Gets subscription Id.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var subscription = Messages.Subscribe<string>(\"Signals\", args => Print(\"Received: {0}\", args.Message));\nPrint(\"Subscription Id: {0}\", subscription.Id);","python":"# Not available in Python: subscriptions are created by the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.MessageSubscription.Subject","kind":"property","name":"Subject","type":"T:cAlgo.API.MessageSubscription","namespace":"cAlgo.API","group":"Messages","csharp":"string Subject {get;}","python":"messageSubscription.Subject: str","summary":"GGets message subject.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var subscription = Messages.Subscribe<string>(\"Signals\", args => Print(\"Received: {0}\", args.Message));\nPrint(\"Subscribed to subject: {0}\", subscription.Subject);","python":"# Not available in Python: subscriptions are created by the generic Messages.Subscribe method"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Subject/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/MessageSubscription/Subject/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Messages","kind":"interface","name":"Messages","type":null,"namespace":"cAlgo.API","group":"Messages","csharp":"public interface Messages","python":"Messages","summary":"Provides access to messaging API.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\n\nnamespace cAlgo.Robots;\n\npublic partial class Sender : Robot\n{\n    public record Point(double X, double Y);\n\n    protected override void OnStart()\n    {\n        Timer.Start(1);\n    }\n\n    protected override void OnTimer()\n    {\n        Messages.Send(Subject, new Point(Random.Shared.NextDouble(), Random.Shared.NextDouble()));\n    }\n}","python":"# Not available in Python: Messages.Send is a generic method, so messages can only be sent from C# algos","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Subject\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Test\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    public partial class Receiver : Robot\n    {\n        public record Point(double X, double Y);\n\n        protected override void OnStart()\n        {\n            var subscription = Messages.Subscribe<Point>(Subject, OnMessageReceived);\n        }\n\n        private void OnMessageReceived(MessageArgs<Point> args)\n        {\n            Print($\"Received Point: {args.Message}\");\n        }\n    }\n}","python":"# Not available in Python: Messages.Subscribe is a generic method, so messages can only be received in C# algos","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Subject\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Test\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Messages reach only this instance's own subscriptions; nothing is sent to or received from other instances. No exception."}]}
{"id":"M:cAlgo.API.Messages.Send``1(System.String,``0)","kind":"method","name":"Send","type":"T:cAlgo.API.Messages","namespace":"cAlgo.API","group":"Messages","csharp":"void Send(string subject, TMessage message)","python":"api.Messages.Send(subject: str, message: TMessage) -> None","summary":"Sends a message for a specific subject.","remarks":null,"parameters":[{"name":"subject","csharpType":"string","pythonType":"str","summary":"Message subject."},{"name":"message","csharpType":"TMessage","pythonType":"TMessage","summary":"Message to be sent, it can be any type including string."}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Send(\"Signals\", \"Buy \" + SymbolName);\nPrint(\"Signal sent for {0}\", SymbolName);","python":"# Not available in Python: Send is a generic method, so messages can only be sent from C# algos"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/Send/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/Send/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Messages reach only this instance's own subscriptions; nothing is sent to or received from other instances. No exception."}]}
{"id":"M:cAlgo.API.Messages.Subscribe``1(System.String,System.Action{cAlgo.API.MessageArgs{``0}})","kind":"method","name":"Subscribe","type":"T:cAlgo.API.Messages","namespace":"cAlgo.API","group":"Messages","csharp":"MessageSubscription Subscribe(string subject, Action<MessageArgs<TMessage>> handler)","python":"api.Messages.Subscribe(subject: str, handler: Callable[[MessageArgs[TMessage]], None]) -> MessageSubscription","summary":"Subscribes to a message subject.","remarks":null,"parameters":[{"name":"subject","csharpType":"string","pythonType":"str","summary":"Message subject."},{"name":"handler","csharpType":"Action<MessageArgs<TMessage>>","pythonType":"Callable[[MessageArgs[TMessage]], None]","summary":"Message handler callback."}],"returns":{"csharpType":"MessageSubscription","pythonType":"MessageSubscription","summary":"Message subscription.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var subscription = Messages.Subscribe<string>(\"Signals\", OnSignalReceived);\n    Print(\"Subscribed to {0}\", subscription.Subject);\n}\n\nprivate void OnSignalReceived(MessageArgs<string> args)\n{\n    Print(\"Signal from {0}: {1}\", args.SenderInstanceId, args.Message);\n}","python":"# Not available in Python: Subscribe is a generic method, so messages can only be received in C# algos"}],"url":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/Subscribe/","markdown":"https://help.ctrader.com/ctrader-algo/references/Messages/Messages/Subscribe/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Partial","behaviour":"Messages reach only this instance's own subscriptions; nothing is sent to or received from other instances. No exception."}]}
{"id":"T:cAlgo.API.ModifierKeys","kind":"enum","name":"ModifierKeys","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public enum ModifierKeys","python":"ModifierKeys","summary":"Specifies the set of modifier keys.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the ModifierKeys\n    public partial class Test : Indicator\n    {\n        private double _mouseBarIndex, _mousePrice;\n\n        protected override void Initialize()\n        {\n            Chart.MouseMove += Chart_MouseMove;\n            Chart.MouseEnter += ResetMouseLocation;\n            Chart.MouseLeave += ResetMouseLocation;\n\n            ResetMouseLocation(null);\n\n            Chart.AddHotkey(DrawLines, HotKey, HotKeyModifier);\n        }\n\n        private void ResetMouseLocation(ChartMouseEventArgs obj)\n        {\n            _mouseBarIndex = -1;\n            _mousePrice = double.NaN;\n        }\n\n        private void Chart_MouseMove(ChartMouseEventArgs obj)\n        {\n            _mouseBarIndex = obj.BarIndex;\n            _mousePrice = obj.YValue;\n        }\n\n        private void DrawLines()\n        {\n            if (_mouseBarIndex == -1 || double.IsNaN(_mousePrice)) return;\n\n            Chart.DrawVerticalLine(_mouseBarIndex.ToString(), (int)_mouseBarIndex, Color.Red);\n            Chart.DrawHorizontalLine(_mousePrice.ToString(), _mousePrice, Color.Red);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action\nfrom math import nan, isnan\n\nclass Test():\n    def initialize(self):\n        api.Chart.MouseMove += self.on_chart_mouse_move\n        api.Chart.MouseEnter += lambda _: self.reset_mouse_location()\n        api.Chart.MouseLeave += lambda _: self.reset_mouse_location()\n\n        self.reset_mouse_location()\n\n        api.Chart.AddHotkey(Action(self.draw_lines), api.HotKey, api.HotKeyModifier)\n\n    def on_chart_mouse_move(self, args):\n        self.mouseBarIndex = args.BarIndex\n        self.mousePrice = args.YValue\n\n    def reset_mouse_location(self):\n        self.mouseBarIndex = -1\n        self.mousePrice = nan\n\n    def draw_lines(self):\n        if self.mouseBarIndex == -1 or isnan(self.mousePrice):\n            return\n\n        api.Chart.DrawVerticalLine(str(self.mouseBarIndex), int(self.mouseBarIndex), Color.Red)\n        api.Chart.DrawHorizontalLine(str(self.mousePrice), self.mousePrice, Color.Red)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"HotKey\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.Key\",\n      \"DefaultValue\": \"R\"\n    },\n    {\n      \"Name\": \"HotKeyModifier\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.ModifierKeys\",\n      \"DefaultValue\": \"Control\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ModifierKeys.None","kind":"enum value","name":"None","type":"T:cAlgo.API.ModifierKeys","namespace":"cAlgo.API","group":"Utility","csharp":"ModifierKeys.None;","python":"ModifierKeys.None","summary":"No modifiers are pressed.","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ModifierKeys.Alt","kind":"enum value","name":"Alt","type":"T:cAlgo.API.ModifierKeys","namespace":"cAlgo.API","group":"Utility","csharp":"ModifierKeys.Alt;","python":"ModifierKeys.Alt","summary":"The ALT key.","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ModifierKeys.Control","kind":"enum value","name":"Control","type":"T:cAlgo.API.ModifierKeys","namespace":"cAlgo.API","group":"Utility","csharp":"ModifierKeys.Control;","python":"ModifierKeys.Control","summary":"The CTRL key.","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ModifierKeys.Shift","kind":"enum value","name":"Shift","type":"T:cAlgo.API.ModifierKeys","namespace":"cAlgo.API","group":"Utility","csharp":"ModifierKeys.Shift;","python":"ModifierKeys.Shift","summary":"The SHIFT key.","remarks":null,"parameters":[],"returns":{"csharpType":"ModifierKeys","pythonType":"ModifierKeys","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/ModifierKeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MomentumOscillator","kind":"interface","name":"MomentumOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MomentumOscillator","python":"MomentumOscillator","summary":"The calculation of the Momentum Oscillator indicator.","remarks":"Momentum measures the rate of price change over time and provides a leading indicator of changes in trend. It gives signals before price action happens. The momentum oscillator is unbounded i.e. there is no maximum or minimum value. It is calculated as the closing price now minus the closing price n periods ago.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MomentumOscillator _momentum;\nprotected override void Initialize()\n{\n    _momentum = Indicators.MomentumOscillator(Bars.ClosePrices, 14);\n}\n\npublic override void Calculate(int index)\n{\n    double momentum = _momentum.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.momentum = api.Indicators.MomentumOscillator(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        momentum = self.momentum.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Momentum Oscillator indicator\n    public partial class MomentumOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MomentumOscillator _momentumOscillator;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _momentumOscillator = Indicators.MomentumOscillator(Bars.ClosePrices, 14);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_momentumOscillator.Result, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_momentumOscillator.Result.Last(1) > _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (_momentumOscillator.Result.Last(2) <= _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (_momentumOscillator.Result.Last(1) < _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (_momentumOscillator.Result.Last(2) >= _simpleMovingAverage.Result.Last(2))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MomentumOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.momentumOscillator = api.Indicators.MomentumOscillator(api.Bars.ClosePrices, 14)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.momentumOscillator.Result, 14)\n\n    def on_bar_closed(self):\n        if self.momentumOscillator.Result.Last(0) > self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Sell)\n            if self.momentumOscillator.Result.Last(1) <= self.simpleMovingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.momentumOscillator.Result.Last(0) < self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Buy)\n            if self.momentumOscillator.Result.Last(1) >= self.simpleMovingAverage.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MomentumOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MomentumOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MomentumOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MomentumOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"momentumOscillator.Result: IndicatorDataSeries","summary":"Gets the resulting series of the Momentum Oscillator indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var momentum = Indicators.MomentumOscillator(Bars.ClosePrices, 14);\nPrint(\"Momentum of the last closed bar: {0}\", momentum.Result.Last(1));","python":"momentum = api.Indicators.MomentumOscillator(api.Bars.ClosePrices, 14)\napi.Print(f\"Momentum of the last closed bar: {momentum.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MomentumOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MomentumOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.MoneyFlowIndex","kind":"interface","name":"MoneyFlowIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MoneyFlowIndex","python":"MoneyFlowIndex","summary":"The Money Flow Index is an oscillator that calculates buying and selling pressure using typical price and volume. It oscillates between zero and one hundred. It is typically used to identify trend reversals and price extremes.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MoneyFlowIndex _moneyFlow;\n\nprotected override void Initialize()\n{\n   _moneyFlow = Indicators.MoneyFlowIndex(Period);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _moneyFlow.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.moneyFlowIndex = api.Indicators.MoneyFlowIndex(api.Period)\n\n    def calculate(self, index):\n        api.Result[index] = self.moneyFlowIndex.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Money Flow Index indicator\n    public partial class MoneyFlowIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MoneyFlowIndex _moneyFlowIndex;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _moneyFlowIndex = Indicators.MoneyFlowIndex(14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_moneyFlowIndex.Result.Last(1) > 80)\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (BotPositions.Length == 0)\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (_moneyFlowIndex.Result.Last(1) < 20)\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (BotPositions.Length == 0)\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MoneyFlowIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.moneyFlowIndex = api.Indicators.MoneyFlowIndex(14)\n\n    def on_bar_closed(self):\n        if self.moneyFlowIndex.Result.Last(0) > 80:\n            self.close_positions(TradeType.Buy)\n            if len(self.get_bot_positions()) == 0:\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.moneyFlowIndex.Result.Last(0) < 20:\n            self.close_positions(TradeType.Sell)\n            if len(self.get_bot_positions()) == 0:\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MoneyFlowIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MoneyFlowIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MoneyFlowIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MoneyFlowIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"moneyFlowIndex.Result: IndicatorDataSeries","summary":"The time series of the Money Flow Index indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MoneyFlowIndex _moneyFlow;\n\nprotected override void OnStart()\n{\n    _moneyFlow = Indicators.MoneyFlowIndex(Period);\n}\nprotected override void OnBar()\n{\n    var currentValue = _moneyFlow.Result.LastValue;\n    Print(\"Money Flow Index: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.moneyFlow = api.Indicators.MoneyFlowIndex(api.Period)\n\ndef on_bar(self):\n    currentValue = self.moneyFlow.Result.LastValue\n    api.Print(f\"Money Flow Index: {currentValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 21\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MoneyFlowIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MoneyFlowIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MonteCarloMethod","kind":"enum","name":"MonteCarloMethod","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public enum MonteCarloMethod","python":"MonteCarloMethod","summary":"Specifies the Monte Carlo simulation method that is applied to a completed backtest.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @\"C:\\Temp\\montecarlo-result.json\");\n\nPrint($\"Monte Carlo method: {monteCarlo.Method}\");","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r\"C:\\Temp\\montecarlo-result.json\")\n\napi.Print(f\"Monte Carlo method: {monteCarlo.Method}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MonteCarloMethod.Reshuffle","kind":"enum value","name":"Reshuffle","type":"T:cAlgo.API.MonteCarloMethod","namespace":"cAlgo.API","group":"Backtesting","csharp":"MonteCarloMethod.Reshuffle;","python":"MonteCarloMethod.Reshuffle","summary":"Randomly reorders the backtest trades. The total net profit stays the same, but the equity path, the drawdowns and the risk of ruin change, showing how much the result depended on the order the trades happened in.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MonteCarloMethod.Bootstrap","kind":"enum value","name":"Bootstrap","type":"T:cAlgo.API.MonteCarloMethod","namespace":"cAlgo.API","group":"Backtesting","csharp":"MonteCarloMethod.Bootstrap;","python":"MonteCarloMethod.Bootstrap","summary":"Draws trades at random with replacement, so some trades repeat and others are left out. The total profit varies between iterations, estimating how sensitive the result is to the specific trades that occurred.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MonteCarloMethod.BlockBootstrap","kind":"enum value","name":"BlockBootstrap","type":"T:cAlgo.API.MonteCarloMethod","namespace":"cAlgo.API","group":"Backtesting","csharp":"MonteCarloMethod.BlockBootstrap;","python":"MonteCarloMethod.BlockBootstrap","summary":"Resamples fixed size blocks of consecutive trades, preserving the short winning and losing streaks that a plain bootstrap would break apart. The block length is taken from the BlockSize property.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MonteCarloMethod.StationaryBootstrap","kind":"enum value","name":"StationaryBootstrap","type":"T:cAlgo.API.MonteCarloMethod","namespace":"cAlgo.API","group":"Backtesting","csharp":"MonteCarloMethod.StationaryBootstrap;","python":"MonteCarloMethod.StationaryBootstrap","summary":"Resamples random length blocks of consecutive trades, preserving streaks while avoiding the artificial cut points that fixed size blocks introduce. The BlockSize property is used as the mean block length.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.MonteCarloMethod.SyntheticPricePath","kind":"enum value","name":"SyntheticPricePath","type":"T:cAlgo.API.MonteCarloMethod","namespace":"cAlgo.API","group":"Backtesting","csharp":"MonteCarloMethod.SyntheticPricePath;","python":"MonteCarloMethod.SyntheticPricePath","summary":"Reshuffles the historical price returns and re-runs the full backtest on each synthetic price path. The strategy reacts to the new prices, so the trades, the profit and the drawdowns all differ. This method is slower than the resampling ones and can take several minutes.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.MonteCarloSettings","kind":"record","name":"MonteCarloSettings","type":null,"namespace":"cAlgo.API","group":"Backtesting","csharp":"public class MonteCarloSettings","python":"MonteCarloSettings","summary":"Represents the optional Monte Carlo simulation that is attached to a backtest. A backtest produces a single equity curve, the one historical ordering of its trades. A Monte Carlo simulation re-runs that result many times, each time resampling or perturbing it, and reports the distribution of the outcomes instead of the single historical path.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo.Plugins\n{\n    public partial class MonteCarloTest : Plugin\n    {\n        private BacktestingProcess _backtestingProcess;\n\n        protected override void OnStart()\n        {\n            if (AlgoRegistry.Get(RobotName, AlgoKind.Robot) is not RobotType robotType)\n            {\n                Print($\"Robot type {RobotName} not found\");\n                return;\n            }\n\n            var backtestingSettings = new BacktestingSettings\n            {\n                StartTimeUtc = StartTime,\n                EndTimeUtc = EndTime,\n                Balance = AccountBalance,\n                DataMode = BacktestingDataMode.M1,\n                SpreadPips = 1,\n                MonteCarlo = new MonteCarloSettings(MonteCarloMethod.BlockBootstrap, MonteCarloOutputPath)\n                {\n                    Iterations = 5000,\n                    Seed = 42,\n                    StartingEquity = AccountBalance,\n                    RuinFloor = 0,\n                    BlockSize = 10\n                }\n            };\n\n            _backtestingProcess = Backtesting.Start(robotType, Symbol.Name, TimeFrame, backtestingSettings);\n\n            _backtestingProcess.Completed += args => Print($\"Monte Carlo result: {_backtestingProcess.MonteCarloJsonReport}\");\n        }\n\n        protected override void OnStop()\n        {\n            _backtestingProcess?.Terminate();\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass MonteCarloTest():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(api.RobotName, AlgoKind.Robot)\n        if algoType is None:\n            print(f\"Robot type {api.RobotName} not found\")\n            return\n\n        robotType = RobotType(algoType)\n\n        backtestingSettings = BacktestingSettings()\n        backtestingSettings.StartTimeUtc = api.StartTime\n        backtestingSettings.EndTimeUtc = api.EndTime\n        backtestingSettings.Balance = api.AccountBalance\n        backtestingSettings.DataMode = BacktestingDataMode.M1\n        backtestingSettings.SpreadPips = 1\n\n        monteCarlo = MonteCarloSettings(MonteCarloMethod.BlockBootstrap, api.MonteCarloOutputPath)\n        monteCarlo.Iterations = 5000\n        monteCarlo.Seed = 42\n        monteCarlo.StartingEquity = api.AccountBalance\n        monteCarlo.RuinFloor = 0\n        monteCarlo.BlockSize = 10\n        backtestingSettings.MonteCarlo = monteCarlo\n\n        self.backtestingProcess = api.Backtesting.Start(robotType, api.Symbol.Name, api.TimeFrame, backtestingSettings)\n        self.backtestingProcess.Completed += lambda args: print(f\"Monte Carlo result: {self.backtestingProcess.MonteCarloJsonReport}\")\n\n    def on_stop(self):\n        if hasattr(self, \"backtestingProcess\") and self.backtestingProcess is not None:\n            self.backtestingProcess.Terminate()","config":"{\n  \"AccessRights\": \"FullAccess\",\n  \"Parameters\": [\n    {\n      \"Name\": \"RobotName\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample Breakout\"\n    },\n    {\n      \"Name\": \"Symbol\",\n      \"Type\": \"Symbol\",\n      \"DefaultValue\": \"EURUSD\"\n    },\n    {\n      \"Name\": \"TimeFrame\",\n      \"Type\": \"TimeFrame\",\n      \"DefaultValue\": \"Daily\"\n    },\n    {\n      \"Name\": \"StartTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2023-09-01T06:30:00\"\n    },\n    {\n      \"Name\": \"EndTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2025-09-01T06:30:00\"\n    },\n    {\n      \"Name\": \"AccountBalance\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10000\n    },\n    {\n      \"Name\": \"MonteCarloOutputPath\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"C:\\\\Temp\\\\montecarlo-result.json\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MonteCarloSettings.#ctor(cAlgo.API.MonteCarloMethod,System.String)","kind":"constructor","name":"MonteCarloSettings","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public MonteCarloSettings(MonteCarloMethod method, string outputFilePath)","python":"MonteCarloSettings(method: MonteCarloMethod, outputFilePath: str)","summary":"Initializes a new instance of the MonteCarloSettings record. The method and the output file path are required, every other setting is optional.","remarks":null,"parameters":[{"name":"method","csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"The Monte Carlo simulation method."},{"name":"outputFilePath","csharpType":"string","pythonType":"str","summary":"The destination file path for the Monte Carlo result JSON."}],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @\"C:\\Temp\\montecarlo-result.json\")\n{\n    Iterations = 2000,\n    Seed = 7\n};\nvar settings = new BacktestingSettings { Balance = 10000, MonteCarlo = monteCarlo };","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.Iterations = 2000\nmonteCarlo.Seed = 7\nsettings = BacktestingSettings()\nsettings.Balance = 10000\nsettings.MonteCarlo = monteCarlo"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.MonteCarloSettings.#ctor(cAlgo.API.MonteCarloSettings)","kind":"constructor","name":"MonteCarloSettings","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public MonteCarloSettings(MonteCarloSettings original)","python":"MonteCarloSettings(original: MonteCarloSettings)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"MonteCarloSettings","pythonType":"MonteCarloSettings","summary":""}],"returns":null,"exceptions":[],"since":"5.10","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.BlockSize","kind":"property","name":"BlockSize","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public int BlockSize {get; set;}","python":"monteCarloSettings.BlockSize: int","summary":"Gets the number of consecutive trades that are kept together when resampling. It is used only by the BlockBootstrap and StationaryBootstrap methods and is ignored by the others. It must be greater than or equal to 1 and the default value is 5.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.BlockBootstrap, @\"C:\\Temp\\montecarlo-result.json\") { BlockSize = 10 };\nPrint(\"Monte Carlo block size: {0}\", monteCarlo.BlockSize);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.BlockBootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.BlockSize = 10\napi.Print(f\"Monte Carlo block size: {monteCarlo.BlockSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/BlockSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/BlockSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.Iterations","kind":"property","name":"Iterations","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public int Iterations {get; set;}","python":"monteCarloSettings.Iterations: int","summary":"Gets the number of simulated iterations. When it is 0, the default, the method default is used, which is 1000 for the resampling methods and 100 for SyntheticPricePath. Any other value outside the range of the method, which is 100 to 100000 for the resampling methods and 100 to 1000 for SyntheticPricePath, is reported as an invalid settings error instead of being clamped.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @\"C:\\Temp\\montecarlo-result.json\") { Iterations = 5000 };\nPrint(\"Monte Carlo iterations: {0}\", monteCarlo.Iterations);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.Iterations = 5000\napi.Print(f\"Monte Carlo iterations: {monteCarlo.Iterations}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Iterations/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Iterations/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.Method","kind":"property","name":"Method","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public MonteCarloMethod Method {get;}","python":"monteCarloSettings.Method: MonteCarloMethod","summary":"Gets the Monte Carlo simulation method.","remarks":null,"parameters":[],"returns":{"csharpType":"MonteCarloMethod","pythonType":"MonteCarloMethod","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.StationaryBootstrap, @\"C:\\Temp\\montecarlo-result.json\");\nPrint(\"Monte Carlo method: {0}\", monteCarlo.Method);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.StationaryBootstrap, r\"C:\\Temp\\montecarlo-result.json\")\napi.Print(f\"Monte Carlo method: {monteCarlo.Method}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Method/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Method/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.OutputFilePath","kind":"property","name":"OutputFilePath","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public string OutputFilePath {get;}","python":"monteCarloSettings.OutputFilePath: str","summary":"Gets the destination file path for the Monte Carlo result JSON. The file uses the same snapshot format the desktop Monte Carlo tab saves, so it can be loaded back by the desktop application.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @\"C:\\Temp\\montecarlo-result.json\");\nPrint(\"Monte Carlo result will be saved to {0}\", monteCarlo.OutputFilePath);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r\"C:\\Temp\\montecarlo-result.json\")\napi.Print(f\"Monte Carlo result will be saved to {monteCarlo.OutputFilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/OutputFilePath/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/OutputFilePath/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.RuinFloor","kind":"property","name":"RuinFloor","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double RuinFloor {get; set;}","python":"monteCarloSettings.RuinFloor: float","summary":"Gets the equity level that is treated as account ruin. The risk of ruin is the share of the simulations whose equity drops to or below this level. It must be greater than or equal to 0 and the default value is 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @\"C:\\Temp\\montecarlo-result.json\") { RuinFloor = 5000 };\nPrint(\"Account ruin level: {0}\", monteCarlo.RuinFloor);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.RuinFloor = 5000\napi.Print(f\"Account ruin level: {monteCarlo.RuinFloor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/RuinFloor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/RuinFloor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.Seed","kind":"property","name":"Seed","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public int Seed {get; set;}","python":"monteCarloSettings.Seed: int","summary":"Gets the random seed that makes the simulation reproducible. The same seed with the same inputs produces the same result, even across application restarts. The default value is 0.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @\"C:\\Temp\\montecarlo-result.json\") { Seed = 42 };\nPrint(\"Monte Carlo seed: {0}\", monteCarlo.Seed);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.Seed = 42\napi.Print(f\"Monte Carlo seed: {monteCarlo.Seed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Seed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/Seed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.MonteCarloSettings.StartingEquity","kind":"property","name":"StartingEquity","type":"T:cAlgo.API.MonteCarloSettings","namespace":"cAlgo.API","group":"Backtesting","csharp":"public double StartingEquity {get; set;}","python":"monteCarloSettings.StartingEquity: float","summary":"Gets the starting equity used as the additive base for the simulated equity curves. When it is 0, the default, the initial balance of the backtest is used.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @\"C:\\Temp\\montecarlo-result.json\") { StartingEquity = 50000 };\nPrint(\"Monte Carlo starting equity: {0}\", monteCarlo.StartingEquity);","python":"monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r\"C:\\Temp\\montecarlo-result.json\")\nmonteCarlo.StartingEquity = 50000\napi.Print(f\"Monte Carlo starting equity: {monteCarlo.StartingEquity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/StartingEquity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/MonteCarloSettings/StartingEquity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Indicators.MovingAverage","kind":"interface","name":"MovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface MovingAverage","python":"MovingAverage","summary":"The Moving Average Indicator calculation.","remarks":"Used to smooth the price data to form a trend following indicator","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private MovingAverage _ma;\n\nprotected override void Initialize()\n{\n    _ma = Indicators.MovingAverage(Bars.ClosePrices, Periods, MAType);\n}\n\npublic override void Calculate(int index)\n{\n    Result[index] = _ma.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, api.Periods, api.MAType)\n\n    def calculate(self, index):\n        api.Result[index] = self.ma.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    },\n    {\n      \"Name\": \"MAType\",\n      \"DisplayName\": \"MA Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Simple\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Moving Average indicator\n    public partial class MovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private MovingAverage _fastMa;\n\n        private MovingAverage _slowMa;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastMa = Indicators.MovingAverage(FastMaSource, FastMaPeriod, FastMaType);\n            _slowMa = Indicators.MovingAverage(SlowMaSource, SlowMaPeriod, SlowMaType);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastMa.Result.HasCrossedAbove(_slowMa.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastMa.Result.HasCrossedBelow(_slowMa.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass MovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastMa = api.Indicators.MovingAverage(api.FastMaSource, api.FastMaPeriod, api.FastMaType)\n        self.slowMa = api.Indicators.MovingAverage(api.SlowMaSource, api.SlowMaPeriod, api.SlowMaType)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastMa.Result, self.slowMa.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastMa.Result, self.slowMa.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaType\",\n      \"DisplayName\": \"Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Exponential\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaType\",\n      \"DisplayName\": \"Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Exponential\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.MovingAverage.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.MovingAverage","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"movingAverage.Result: IndicatorDataSeries","summary":"The resulting time series of the calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var movingAverage = Indicators.MovingAverage(Bars.ClosePrices, 20, MovingAverageType.Exponential);\nif (Bars.ClosePrices.Last(1) > movingAverage.Result.Last(1))\n    Print(\"Close is above the moving average: {0}\", movingAverage.Result.Last(1));","python":"movingAverage = api.Indicators.MovingAverage(api.Bars.ClosePrices, 20, MovingAverageType.Exponential)\nif api.Bars.ClosePrices.Last(1) > movingAverage.Result.Last(1):\n    api.Print(f\"Close is above the moving average: {movingAverage.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverage/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverage/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MovingAverageType","kind":"enum","name":"MovingAverageType","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public enum MovingAverageType","python":"MovingAverageType","summary":"An enumeration of the different MovingAverage weighting (smoothing) methods.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    // A sample indicator that shows how to use different types of moving average\n    public partial class MovingAverageTypeSample : Indicator\n    {\n        private MovingAverage _ma;\n\n        protected override void Initialize()\n        {\n            _ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType);\n        }\n\n        public override void Calculate(int index)\n        {\n            Result[index] = _ma.Result[index];\n        }\n    }\n}","python":"class MovingAverageTypeSample():\n    def initialize(self):\n        self.ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, api.MovingAverageType)\n\n    def calculate(self, index):\n        api.Result[index] = self.ma.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"MovingAverageType\",\n      \"DisplayName\": \"Type\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.MovingAverageType\",\n      \"DefaultValue\": \"Simple\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.Simple","kind":"enum value","name":"Simple","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.Simple;","python":"MovingAverageType.Simple","summary":"Use uniform weighting. Represents indicator of SimpleMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Simple);\nPrint(\"Simple MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\napi.Print(f\"Simple MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.Exponential","kind":"enum value","name":"Exponential","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.Exponential;","python":"MovingAverageType.Exponential","summary":"Use exponential weighting. Represents indicator of ExponentialMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Exponential);\nPrint(\"Exponential MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Exponential)\napi.Print(f\"Exponential MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.TimeSeries","kind":"enum value","name":"TimeSeries","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.TimeSeries;","python":"MovingAverageType.TimeSeries","summary":"Represents indicator of TimeSeriesMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.TimeSeries);\nPrint(\"Time series MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.TimeSeries)\napi.Print(f\"Time series MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.Triangular","kind":"enum value","name":"Triangular","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.Triangular;","python":"MovingAverageType.Triangular","summary":"Represents indicator of TriangularMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Triangular);\nPrint(\"Triangular MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Triangular)\napi.Print(f\"Triangular MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.VIDYA","kind":"enum value","name":"VIDYA","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.VIDYA;","python":"MovingAverageType.VIDYA","summary":"VIDYA (Variable Index Dynamic Average) variable length weighting. Represents indicator of VariableIndexDynamicAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.VIDYA);\nPrint(\"VIDYA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.VIDYA)\napi.Print(f\"VIDYA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.Weighted","kind":"enum value","name":"Weighted","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.Weighted;","python":"MovingAverageType.Weighted","summary":"Represents indicator of WeightedMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Weighted);\nPrint(\"Weighted MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Weighted)\napi.Print(f\"Weighted MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.WilderSmoothing","kind":"enum value","name":"WilderSmoothing","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.WilderSmoothing;","python":"MovingAverageType.WilderSmoothing","summary":"Represents indicator of WellesWilderSmoothing type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.WilderSmoothing);\nPrint(\"Wilder smoothing: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.WilderSmoothing)\napi.Print(f\"Wilder smoothing: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.Hull","kind":"enum value","name":"Hull","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.Hull;","python":"MovingAverageType.Hull","summary":"Represents indicator of HullMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Hull);\nPrint(\"Hull MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Hull)\napi.Print(f\"Hull MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.DoubleExponential","kind":"enum value","name":"DoubleExponential","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.DoubleExponential;","python":"MovingAverageType.DoubleExponential","summary":"Represents indicator of DoubleExponentialMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.DoubleExponential);\nPrint(\"Double exponential MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.DoubleExponential)\napi.Print(f\"Double exponential MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.TripleExponential","kind":"enum value","name":"TripleExponential","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.TripleExponential;","python":"MovingAverageType.TripleExponential","summary":"Represents indicator of TripleExponentialMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.TripleExponential);\nPrint(\"Triple exponential MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.TripleExponential)\napi.Print(f\"Triple exponential MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.MovingAverageType.KaufmanAdaptive","kind":"enum value","name":"KaufmanAdaptive","type":"T:cAlgo.API.MovingAverageType","namespace":"cAlgo.API","group":"Indicators","csharp":"MovingAverageType.KaufmanAdaptive;","python":"MovingAverageType.KaufmanAdaptive","summary":"Represents indicator of KaufmanAdaptiveMovingAverage type.","remarks":null,"parameters":[],"returns":{"csharpType":"MovingAverageType","pythonType":"MovingAverageType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.KaufmanAdaptive);\nPrint(\"Kaufman adaptive MA: {0}\", ma.Result.LastValue);","python":"ma = api.Indicators.MovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.KaufmanAdaptive)\napi.Print(f\"Kaufman adaptive MA: {ma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverageType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.MultiSelect","kind":"class","name":"MultiSelect","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class MultiSelect : Control","python":"MultiSelect","summary":"A control that shows list of unique items and allows user to select multiple items from the list","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    public partial class MultiSelectTest : Robot\n    {\n        private MultiSelect _multiSelect;\n\n        protected override void OnStart()\n        {\n            _multiSelect = new MultiSelect();\n\n            if (Styled)\n            {\n                _multiSelect.BackgroundColor = Color.Red;\n                _multiSelect.FontWeight = FontWeight.UltraBold;\n                _multiSelect.ForegroundColor = Color.Yellow;\n                _multiSelect.FontSize = 40;\n                _multiSelect.FontFamily = \"Comic Sans MS\";\n            }\n\n            for (var i = 0; i < 10; i++)\n            {\n                _multiSelect.AddItem($\"Item {i}\");\n            }\n\n            _multiSelect.SelectedItemsChanged += args => Print($\"OnSelectedItemsChanged: {string.Join(\", \", _multiSelect.SelectedItems)}\");\n\n            var addItemTextBox = new TextBox();\n\n            var addItemButton = new Button() { Text = \"Add Item\" };\n\n            addItemButton.Click += args =>\n            {\n                if (string.IsNullOrWhiteSpace(addItemTextBox.Text))\n                    return;\n\n                Print($\"Add Result of {addItemTextBox.Text}: {_multiSelect.AddItem(addItemTextBox.Text)}\");\n            };\n\n            var removeItemTextBox = new TextBox();\n\n            var removeItemButton = new Button() { Text = \"Remove Item\" };\n\n            removeItemButton.Click += args =>\n            {\n                if (string.IsNullOrWhiteSpace(removeItemTextBox.Text))\n                    return;\n\n                Print($\"Remove Result of {removeItemTextBox.Text}: {_multiSelect.RemoveItem(removeItemTextBox.Text)}\");\n            };\n\n            var selectItemTextBox = new TextBox();\n\n            var selectItemButton = new Button() { Text = \"Select Item\" };\n\n            selectItemButton.Click += args =>\n            {\n                if (string.IsNullOrWhiteSpace(selectItemTextBox.Text))\n                    return;\n\n                Print($\"Select Result of {selectItemTextBox.Text}: {_multiSelect.SelectItem(selectItemTextBox.Text)}\");\n            };\n\n            var unselectItemTextBox = new TextBox();\n\n            var unselectItemButton = new Button() { Text = \"Unselect Item\" };\n\n            unselectItemButton.Click += args =>\n            {\n                if (string.IsNullOrWhiteSpace(unselectItemTextBox.Text))\n                    return;\n\n                Print($\"Unselect Result of {unselectItemTextBox.Text}: {_multiSelect.UnselectItem(unselectItemTextBox.Text)}\");\n            };\n\n            var selectAllItemsButton = new Button() { Text = \"Select All Items\" };\n\n            selectAllItemsButton.Click += args =>\n            {\n                _multiSelect.SelectAllItems();\n            };\n\n            var unselectAllItemsButton = new Button() { Text = \"Unselect All Items\" };\n\n            unselectAllItemsButton.Click += args =>\n            {\n                _multiSelect.UnselectAllItems();\n            };\n\n            var showItemsButton = new Button() { Text = \"Show Items\" };\n\n            showItemsButton.Click += args => Print($\"Items: {string.Join(\", \", _multiSelect.Items)}\");\n\n            var showSelectedItemsButton = new Button() { Text = \"Show Selected Items\" };\n\n            showSelectedItemsButton.Click += args => Print($\"Selected Items: {string.Join(\", \", _multiSelect.SelectedItems)}\");\n\n            var panel = new StackPanel() { Orientation = Orientation.Vertical, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };\n\n            panel.AddChild(_multiSelect);\n            panel.AddChild(addItemTextBox);\n            panel.AddChild(addItemButton);\n            panel.AddChild(removeItemTextBox);\n            panel.AddChild(removeItemButton);\n            panel.AddChild(selectItemTextBox);\n            panel.AddChild(selectItemButton);\n            panel.AddChild(unselectItemTextBox);\n            panel.AddChild(unselectItemButton);\n            panel.AddChild(selectAllItemsButton);\n            panel.AddChild(unselectAllItemsButton);\n            panel.AddChild(showItemsButton);\n            panel.AddChild(showSelectedItemsButton);\n\n            Chart.AddControl(panel);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_add_item_button_clicked(self, args):\n        if self.addItemTextBox.Text is None:\n            return\n\n        api.Print(f\"Add Result of {self.addItemTextBox.Text}: {self.multiSelect.AddItem(self.addItemTextBox.Text)}\")\n\n    def on_remove_item_button_clicked(self, args):\n        if self.removeItemTextBox.Text is None:\n            return\n\n        api.Print(f\"Remove Result of {self.removeItemTextBox.Text}: {self.multiSelect.RemoveItem(self.removeItemTextBox.Text)}\")\n\n    def on_select_item_button_clicked(self, args):\n        if self.selectItemTextBox.Text is None:\n            return\n\n        api.Print(f\"Select Result of {self.selectItemTextBox.Text}: {self.multiSelect.SelectItem(self.selectItemTextBox.Text)}\")\n\n    def on_unselect_item_button_clicked(self, args):\n        if self.unselectItemTextBox.Text is None:\n            return\n\n        api.Print(f\"Unselect Result of {self.unselectItemTextBox.Text}: {self.multiSelect.UnselectItem(self.unselectItemTextBox.Text)}\")\n\n    def on_start(self):\n        self.multiSelect = MultiSelect()\n\n        if api.Styled:\n            self.multiSelect.BackgroundColor = Color.Red\n            self.multiSelect.FontWeight = FontWeight.UltraBold\n            self.multiSelect.ForegroundColor = Color.Yellow\n            self.multiSelect.FontSize = 40\n            self.multiSelect.FontFamily = \"Comic Sans MS\"\n\n        for i in range(10):\n            self.multiSelect.AddItem(f\"Item {i}\")\n\n        self.multiSelect.SelectedItemsChanged += lambda args: api.Print(f\"OnSelectedItemsChanged: {', '.join(self.multiSelect.SelectedItems)}\")\n\n        self.addItemTextBox = TextBox()\n\n        addItemButton = Button()\n        addItemButton.Text = \"Add Item\"\n        addItemButton.Click += self.on_add_item_button_clicked\n\n        self.removeItemTextBox = TextBox()\n\n        removeItemButton = Button()\n        removeItemButton.Text = \"Remove Item\"\n        removeItemButton.Click += self.on_remove_item_button_clicked\n\n        self.selectItemTextBox = TextBox()\n\n        selectItemButton = Button()\n        selectItemButton.Text = \"Select Item\"\n        selectItemButton.Click += self.on_select_item_button_clicked\n\n        self.unselectItemTextBox = TextBox()\n\n        unselectItemButton = Button()\n        unselectItemButton.Text = \"Unselect Item\"\n        unselectItemButton.Click += self.on_unselect_item_button_clicked\n\n        selectAllItemsButton = Button()\n        selectAllItemsButton.Text = \"Select All Items\"\n        selectAllItemsButton.Click += lambda _: self.multiSelect.SelectAllItems()\n\n        unselectAllItemsButton = Button()\n        unselectAllItemsButton.Text = \"Unselect All Items\"\n        unselectAllItemsButton.Click += lambda _: self.multiSelect.UnselectAllItems()\n\n        showItemsButton = Button()\n        showItemsButton.Text = \"Show Items\"\n        showItemsButton.Click += lambda _: api.Print(f\"Items: {', '.join(self.multiSelect.Items)}\")\n\n        showSelectedItemsButton = Button()\n        showSelectedItemsButton.Text = \"Show Selected Items\"\n        showSelectedItemsButton.Click += lambda _: api.Print(f\"Selected Items: {', '.join(self.multiSelect.SelectedItems)}\")\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        panel.AddChild(self.multiSelect)\n        panel.AddChild(self.addItemTextBox)\n        panel.AddChild(addItemButton)\n        panel.AddChild(self.removeItemTextBox)\n        panel.AddChild(removeItemButton)\n        panel.AddChild(self.selectItemTextBox)\n        panel.AddChild(selectItemButton)\n        panel.AddChild(self.unselectItemTextBox)\n        panel.AddChild(unselectItemButton)\n        panel.AddChild(selectAllItemsButton)\n        panel.AddChild(unselectAllItemsButton)\n        panel.AddChild(showItemsButton)\n        panel.AddChild(showSelectedItemsButton)\n\n        api.Chart.AddControl(panel)","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Styled\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.#ctor","kind":"constructor","name":"MultiSelect","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public MultiSelect()","python":"MultiSelect()","summary":"Creates a new empty MultiSelect with default MultiSelect Style","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect { Width = 150 };\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n    multiSelect.AddItem(symbolName);\nChart.AddControl(multiSelect);","python":"multiSelect = MultiSelect()\nmultiSelect.Width = 150\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n    multiSelect.AddItem(symbolName)\napi.Chart.AddControl(multiSelect)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.AddItem(System.String)","kind":"method","name":"AddItem","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public bool AddItem(string item)","python":"multiSelect.AddItem(item: str) -> bool","summary":"Adds a new item to the MultiSelect","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The string value that will be added on MultiSelect"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if add succeeded otherwise False","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nvar isAdded = multiSelect.AddItem(\"XAUUSD\");\nvar isDuplicateAdded = multiSelect.AddItem(\"XAUUSD\");\nChart.AddControl(multiSelect);\nPrint(\"Added: {0}, duplicate added: {1}\", isAdded, isDuplicateAdded);","python":"multiSelect = MultiSelect()\nisAdded = multiSelect.AddItem(\"XAUUSD\")\nisDuplicateAdded = multiSelect.AddItem(\"XAUUSD\")\napi.Chart.AddControl(multiSelect)\napi.Print(f\"Added: {isAdded}, duplicate added: {isDuplicateAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/AddItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/AddItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.RemoveItem(System.String)","kind":"method","name":"RemoveItem","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public bool RemoveItem(string item)","python":"multiSelect.RemoveItem(item: str) -> bool","summary":"Removes an existing item from the MultiSelect","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The string value that will be removed from MultiSelect"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if remove succeeded otherwise False","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(\"EURUSD\");\nmultiSelect.AddItem(\"XAUUSD\");\nvar isRemoved = multiSelect.RemoveItem(\"XAUUSD\");\nChart.AddControl(multiSelect);\nPrint(\"Removed: {0}, items left: {1}\", isRemoved, multiSelect.Items.Count);","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(\"EURUSD\")\nmultiSelect.AddItem(\"XAUUSD\")\nisRemoved = multiSelect.RemoveItem(\"XAUUSD\")\napi.Chart.AddControl(multiSelect)\napi.Print(f\"Removed: {isRemoved}, items left: {multiSelect.Items.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/RemoveItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/RemoveItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.SelectAllItems","kind":"method","name":"SelectAllItems","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public void SelectAllItems()","python":"multiSelect.SelectAllItems() -> None","summary":"Selects all items on the MultiSelect","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nforeach (var position in Positions)\n    multiSelect.AddItem(position.Id.ToString());\nmultiSelect.SelectAllItems();\nChart.AddControl(multiSelect);","python":"multiSelect = MultiSelect()\nfor position in api.Positions:\n    multiSelect.AddItem(str(position.Id))\nmultiSelect.SelectAllItems()\napi.Chart.AddControl(multiSelect)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectAllItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectAllItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.SelectItem(System.String)","kind":"method","name":"SelectItem","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public bool SelectItem(string item)","python":"multiSelect.SelectItem(item: str) -> bool","summary":"Selects item on the MultiSelect","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The item that will be selected on MultiSelect"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if select succeeded otherwise False","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(SymbolName);\nvar isSelected = multiSelect.SelectItem(SymbolName);\nChart.AddControl(multiSelect);\nPrint(\"Selected {0}: {1}\", SymbolName, isSelected);","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(api.SymbolName)\nisSelected = multiSelect.SelectItem(api.SymbolName)\napi.Chart.AddControl(multiSelect)\napi.Print(f\"Selected {api.SymbolName}: {isSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.SelectItems(System.Collections.Generic.IEnumerable{System.String})","kind":"method","name":"SelectItems","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public void SelectItems(IEnumerable<string> items)","python":"multiSelect.SelectItems(items: Iterable[str]) -> None","summary":"Selects items on the MultiSelect","remarks":null,"parameters":[{"name":"items","csharpType":"IEnumerable<string>","pythonType":"Iterable[str]","summary":"The items that will be selected on MultiSelect"}],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n    multiSelect.AddItem(symbolName);\nmultiSelect.SelectItems(new[] { \"EURUSD\", \"USDJPY\" });\nChart.AddControl(multiSelect);","python":"multiSelect = MultiSelect()\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n    multiSelect.AddItem(symbolName)\nmultiSelect.SelectItems([\"EURUSD\", \"USDJPY\"])\napi.Chart.AddControl(multiSelect)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.UnselectAllItems","kind":"method","name":"UnselectAllItems","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public void UnselectAllItems()","python":"multiSelect.UnselectAllItems() -> None","summary":"Unselects all items on the MultiSelect","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(\"EURUSD\");\nmultiSelect.SelectAllItems();\nvar clearButton = new Button { Text = \"Clear selection\" };\nclearButton.Click += args => multiSelect.UnselectAllItems();\nvar panel = new StackPanel();\npanel.AddChild(multiSelect);\npanel.AddChild(clearButton);\nChart.AddControl(panel);","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(\"EURUSD\")\nmultiSelect.SelectAllItems()\nclearButton = Button()\nclearButton.Text = \"Clear selection\"\nclearButton.Click += lambda args: multiSelect.UnselectAllItems()\npanel = StackPanel()\npanel.AddChild(multiSelect)\npanel.AddChild(clearButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectAllItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectAllItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.UnselectItem(System.String)","kind":"method","name":"UnselectItem","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public bool UnselectItem(string item)","python":"multiSelect.UnselectItem(item: str) -> bool","summary":"Unselects item on the MultiSelect","remarks":null,"parameters":[{"name":"item","csharpType":"string","pythonType":"str","summary":"The item that will be unselected on MultiSelect"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if unselect succeeded otherwise False","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(\"EURUSD\");\nmultiSelect.SelectItem(\"EURUSD\");\nvar isUnselected = multiSelect.UnselectItem(\"EURUSD\");\nPrint(\"Unselected: {0}\", isUnselected);","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(\"EURUSD\")\nmultiSelect.SelectItem(\"EURUSD\")\nisUnselected = multiSelect.UnselectItem(\"EURUSD\")\napi.Print(f\"Unselected: {isUnselected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.MultiSelect.UnselectItems(System.Collections.Generic.IEnumerable{System.String})","kind":"method","name":"UnselectItems","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public void UnselectItems(IEnumerable<string> items)","python":"multiSelect.UnselectItems(items: Iterable[str]) -> None","summary":"Unselects items on the MultiSelect","remarks":null,"parameters":[{"name":"items","csharpType":"IEnumerable<string>","pythonType":"Iterable[str]","summary":"The items that will be unselected on MultiSelect"}],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n    multiSelect.AddItem(symbolName);\nmultiSelect.SelectAllItems();\nmultiSelect.UnselectItems(new[] { \"GBPUSD\", \"USDJPY\" });\nPrint(\"Still selected: {0}\", multiSelect.SelectedItems.Count);","python":"multiSelect = MultiSelect()\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n    multiSelect.AddItem(symbolName)\nmultiSelect.SelectAllItems()\nmultiSelect.UnselectItems([\"GBPUSD\", \"USDJPY\"])\napi.Print(f\"Still selected: {multiSelect.SelectedItems.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/UnselectItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.MultiSelect.Items","kind":"property","name":"Items","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public IReadonlyList<string> Items {get;}","python":"multiSelect.Items: IReadonlyList[str]","summary":"Get the read-only copy of MultiSelect items","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<string>","pythonType":"IReadonlyList[str]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(\"EURUSD\");\nmultiSelect.AddItem(\"GBPUSD\");\nforeach (var item in multiSelect.Items)\n    Print(\"Item: {0}\", item);","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(\"EURUSD\")\nmultiSelect.AddItem(\"GBPUSD\")\nfor item in multiSelect.Items:\n    api.Print(f\"Item: {item}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/Items/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/Items/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.MultiSelect.SelectedItems","kind":"property","name":"SelectedItems","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public IReadonlyList<string> SelectedItems {get;}","python":"multiSelect.SelectedItems: IReadonlyList[str]","summary":"Get the read-only copy of MultiSelect selected items","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<string>","pythonType":"IReadonlyList[str]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nmultiSelect.AddItem(\"EURUSD\");\nmultiSelect.AddItem(\"GBPUSD\");\nmultiSelect.SelectItem(\"GBPUSD\");\nChart.AddControl(multiSelect);\nPrint(\"Selected: {0}\", string.Join(\", \", multiSelect.SelectedItems));","python":"multiSelect = MultiSelect()\nmultiSelect.AddItem(\"EURUSD\")\nmultiSelect.AddItem(\"GBPUSD\")\nmultiSelect.SelectItem(\"GBPUSD\")\napi.Chart.AddControl(multiSelect)\napi.Print(f\"Selected: {', '.join(multiSelect.SelectedItems)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectedItems/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectedItems/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.MultiSelect.SelectedItemsChanged","kind":"event","name":"SelectedItemsChanged","type":"T:cAlgo.API.MultiSelect","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<MultiSelectSelectedItemsChangedEventArgs> SelectedItemsChanged;","python":"multiSelect.SelectedItemsChanged += handler  # handler(obj: MultiSelectSelectedItemsChangedEventArgs)","summary":"This event will trigger if the MultiSelect selected items changed","remarks":null,"parameters":[],"returns":{"csharpType":"Action<MultiSelectSelectedItemsChangedEventArgs>","pythonType":"Callable[[MultiSelectSelectedItemsChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var multiSelect = new MultiSelect();\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\" })\n    multiSelect.AddItem(symbolName);\nmultiSelect.SelectedItemsChanged += args => Print(\"Selected symbols: {0}\", string.Join(\", \", args.MultiSelect.SelectedItems));\nChart.AddControl(multiSelect);","python":"def on_start(self):\n    multiSelect = MultiSelect()\n    for symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\"]:\n        multiSelect.AddItem(symbolName)\n    multiSelect.SelectedItemsChanged += self.on_selected_items_changed\n    api.Chart.AddControl(multiSelect)\n\ndef on_selected_items_changed(self, args):\n    api.Print(f\"Selected symbols: {', '.join(args.MultiSelect.SelectedItems)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectedItemsChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/SelectedItemsChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.MultiSelectSelectedItemsChangedEventArgs","kind":"class","name":"MultiSelectSelectedItemsChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class MultiSelectSelectedItemsChangedEventArgs","python":"MultiSelectSelectedItemsChangedEventArgs","summary":"Provides data for MultiSelect SelectedItemsChanged event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var multiSelect = new MultiSelect();\n    multiSelect.AddItem(\"EURUSD\");\n    multiSelect.AddItem(\"GBPUSD\");\n    multiSelect.AddItem(\"USDJPY\");\n    multiSelect.SelectedItemsChanged += OnSelectedItemsChanged;\n    Chart.AddControl(multiSelect);\n}\n\nprivate void OnSelectedItemsChanged(MultiSelectSelectedItemsChangedEventArgs args)\n{\n    Print(\"Selected symbols: {0}\", string.Join(\", \", args.MultiSelect.SelectedItems));\n}","python":"def on_start(self):\n    multiSelect = MultiSelect()\n    multiSelect.AddItem(\"EURUSD\")\n    multiSelect.AddItem(\"GBPUSD\")\n    multiSelect.AddItem(\"USDJPY\")\n    multiSelect.SelectedItemsChanged += self.on_selected_items_changed\n    api.Chart.AddControl(multiSelect)\n\ndef on_selected_items_changed(self, args):\n    api.Print(\"Selected symbols: \" + \", \".join(args.MultiSelect.SelectedItems))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MultiSelectSelectedItemsChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MultiSelectSelectedItemsChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (MultiSelect.SelectedItemsChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (MultiSelect.SelectedItemsChanged)."}]}
{"id":"P:cAlgo.API.MultiSelectSelectedItemsChangedEventArgs.MultiSelect","kind":"property","name":"MultiSelect","type":"T:cAlgo.API.MultiSelectSelectedItemsChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public MultiSelect MultiSelect {get;}","python":"multiSelectSelectedItemsChangedEventArgs.MultiSelect: MultiSelect","summary":"The ComboBox that it is selected item changed","remarks":null,"parameters":[],"returns":{"csharpType":"MultiSelect","pythonType":"MultiSelect","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var multiSelect = new MultiSelect();\n    multiSelect.AddItem(\"EURUSD\");\n    multiSelect.AddItem(\"GBPUSD\");\n    multiSelect.SelectedItemsChanged += OnSelectedItemsChanged;\n    Chart.AddControl(multiSelect);\n}\n\nprivate void OnSelectedItemsChanged(MultiSelectSelectedItemsChangedEventArgs args)\n{\n    Print(\"{0} of {1} items selected\", args.MultiSelect.SelectedItems.Count, args.MultiSelect.Items.Count);\n}","python":"def on_start(self):\n    multiSelect = MultiSelect()\n    multiSelect.AddItem(\"EURUSD\")\n    multiSelect.AddItem(\"GBPUSD\")\n    multiSelect.SelectedItemsChanged += self.on_selected_items_changed\n    api.Chart.AddControl(multiSelect)\n\ndef on_selected_items_changed(self, args):\n    api.Print(f\"{args.MultiSelect.SelectedItems.Count} of {args.MultiSelect.Items.Count} items selected\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MultiSelectSelectedItemsChangedEventArgs/MultiSelect/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/MultiSelectSelectedItemsChangedEventArgs/MultiSelect/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (MultiSelect.SelectedItemsChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (MultiSelect.SelectedItemsChanged)."}]}
{"id":"T:cAlgo.API.Indicators.NegativeVolumeIndex","kind":"interface","name":"NegativeVolumeIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface NegativeVolumeIndex","python":"NegativeVolumeIndex","summary":"Dysart's Negative Volume Index assumes that the smart money is active on days when volume decreases and the not-so-smart money is active on days when volume increases (measured by the Positive Volume Index).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private NegativeVolumeIndex _negativeVolume;\n\nprotected override void Initialize()\n{\n   _negativeVolume = Indicators.NegativeVolumeIndex(Source);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _negativeVolume.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.negativeVolumeIndex = api.Indicators.NegativeVolumeIndex(api.Source)\n\n    def calculate(self, index):\n        api.Result[index] = self.negativeVolumeIndex.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Positive/Negative Volume Index indicators\n    public partial class VolumeIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PositiveVolumeIndex _positiveVolumeIndex;\n        private NegativeVolumeIndex _negativeVolumeIndex;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _positiveVolumeIndex = Indicators.PositiveVolumeIndex(Bars.ClosePrices);\n            _negativeVolumeIndex = Indicators.NegativeVolumeIndex(Bars.ClosePrices);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (BotPositions.Length == 0 && _negativeVolumeIndex.Result.Last(1) > _positiveVolumeIndex.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (BotPositions.Length == 0 && _negativeVolumeIndex.Result.Last(1) > _positiveVolumeIndex.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.positiveVolumeIndex = api.Indicators.PositiveVolumeIndex(api.Bars.ClosePrices)\n        self.negativeVolumeIndex = api.Indicators.NegativeVolumeIndex(api.Bars.ClosePrices)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar(self):\n        if api.Bars.ClosePrices.Last(1) > self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            if len(self.get_bot_positions()) == 0 and self.negativeVolumeIndex.Result.Last(1) > self.positiveVolumeIndex.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(1) < self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            if len(self.get_bot_positions()) == 0 and self.negativeVolumeIndex.Result.Last(1) > self.positiveVolumeIndex.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/NegativeVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/NegativeVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.NegativeVolumeIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.NegativeVolumeIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"negativeVolumeIndex.Result: IndicatorDataSeries","summary":"The time series of the Negative Volume Index indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private NegativeVolumeIndex _negativeVolume;\n\nprotected override void OnStart()\n{\n    _negativeVolume = Indicators.NegativeVolumeIndex(Source);\n}\nprotected override void OnBar()\n{\n    var currentValue = _negativeVolume.Result.LastValue;\n    Print(\"Negative Volume Index: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.negativeVolume = api.Indicators.NegativeVolumeIndex(api.Source)\n\ndef on_bar(self):\n    currentValue = self.negativeVolume.Result.LastValue\n    api.Print(f\"Negative Volume Index: {currentValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/NegativeVolumeIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/NegativeVolumeIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.NewOrderDialog","kind":"class","name":"NewOrderDialog","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public class NewOrderDialog","python":"NewOrderDialog","summary":"Represents a common dialog box that allows a user to create a new order.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var newOrderDialog = new NewOrderDialog\n        {\n            TradeType = TradeType.Sell,\n            OrderType = OrderType.Limit,\n            SymbolName = SymbolName,\n            Volume = Symbol.VolumeInUnitsMin * 10,\n            StopLossPips = 20,\n            TakeProfitPips = 40\n        };\n\n        newOrderDialog.ShowDialog();\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        newOrderDialog = NewOrderDialog()\n        newOrderDialog.TradeType = TradeType.Sell\n        newOrderDialog.OrderType = OrderType.Limit\n        newOrderDialog.SymbolName = api.SymbolName\n        newOrderDialog.Volume = api.Symbol.VolumeInUnitsMin * 10\n        newOrderDialog.StopLossPips = 20\n        newOrderDialog.TakeProfitPips = 40\n\n        newOrderDialog.ShowDialog()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"M:cAlgo.API.NewOrderDialog.#ctor","kind":"constructor","name":"NewOrderDialog","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public NewOrderDialog()","python":"NewOrderDialog()","summary":"Creates a NewOrderDialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, TradeType = TradeType.Buy, OrderType = OrderType.Market };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.TradeType = TradeType.Buy\nnewOrderDialog.OrderType = OrderType.Market\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"M:cAlgo.API.NewOrderDialog.ShowDialog","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void ShowDialog()","python":"newOrderDialog.ShowDialog() -> None","summary":"Shows the dialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var orderButton = new Button { Text = \"New order\" };\norderButton.Click += args => new NewOrderDialog { SymbolName = SymbolName, Volume = Symbol.QuantityToVolumeInUnits(0.01) }.ShowDialog();\nChart.AddControl(orderButton);","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.Volume = api.Symbol.QuantityToVolumeInUnits(0.01)\norderButton = Button()\norderButton.Text = \"New order\"\norderButton.Click += lambda args: newOrderDialog.ShowDialog()\napi.Chart.AddControl(orderButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns normally, no exception."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns normally, no exception."}]}
{"id":"P:cAlgo.API.NewOrderDialog.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Comment {get; set;}","python":"newOrderDialog.Comment: str","summary":"Gets or sets the Comment.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, Comment = \"Breakout entry\" };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.Comment = \"Breakout entry\"\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.Expiration","kind":"property","name":"Expiration","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public DateTime? Expiration {get; set;}","python":"newOrderDialog.Expiration: DateTime | None","summary":"Gets or sets the Expiration.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.Limit, TargetPrice = Symbol.Bid - 10 * Symbol.PipSize };\nnewOrderDialog.Expiration = Server.Time.AddHours(4);\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.OrderType = OrderType.Limit\nnewOrderDialog.TargetPrice = api.Symbol.Bid - 10 * api.Symbol.PipSize\nnewOrderDialog.Expiration = api.Server.Time.AddHours(4)\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Expiration/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Expiration/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.HasTrailingStop","kind":"property","name":"HasTrailingStop","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool HasTrailingStop {get; set;}","python":"newOrderDialog.HasTrailingStop: bool","summary":"Gets or sets the HasTrailingStop.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, StopLossPips = 25, HasTrailingStop = true };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.StopLossPips = 25\nnewOrderDialog.HasTrailingStop = True\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/HasTrailingStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/HasTrailingStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.MarketRangePips","kind":"property","name":"MarketRangePips","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? MarketRangePips {get; set;}","python":"newOrderDialog.MarketRangePips: float | None","summary":"Gets or sets the MarketRangePips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.Market, MarketRangePips = 3 };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.OrderType = OrderType.Market\nnewOrderDialog.MarketRangePips = 3\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/MarketRangePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/MarketRangePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.OrderType","kind":"property","name":"OrderType","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public OrderType OrderType {get; set;}","python":"newOrderDialog.OrderType: OrderType","summary":"Gets or sets the OrderType.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.Stop, TargetPrice = Symbol.Ask + 20 * Symbol.PipSize };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.OrderType = OrderType.Stop\nnewOrderDialog.TargetPrice = api.Symbol.Ask + 20 * api.Symbol.PipSize\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.StopLimitRangePips","kind":"property","name":"StopLimitRangePips","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? StopLimitRangePips {get; set;}","python":"newOrderDialog.StopLimitRangePips: float | None","summary":"Gets or sets the StopLimitRangePips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.StopLimit, TargetPrice = Symbol.Ask + 10 * Symbol.PipSize, StopLimitRangePips = 2 };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.OrderType = OrderType.StopLimit\nnewOrderDialog.TargetPrice = api.Symbol.Ask + 10 * api.Symbol.PipSize\nnewOrderDialog.StopLimitRangePips = 2\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLimitRangePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLimitRangePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.StopLossPips","kind":"property","name":"StopLossPips","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? StopLossPips {get; set;}","python":"newOrderDialog.StopLossPips: float | None","summary":"Gets or sets the StopLossPips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, StopLossPips = 20 };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.StopLossPips = 20\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLossPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLossPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.StopLossTriggerMethod","kind":"property","name":"StopLossTriggerMethod","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public StopTriggerMethod? StopLossTriggerMethod {get; set;}","python":"newOrderDialog.StopLossTriggerMethod: StopTriggerMethod | None","summary":"Gets or sets Trigger method for order StopLoss","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, StopLossPips = 20, StopLossTriggerMethod = StopTriggerMethod.Opposite };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.StopLossPips = 20\nnewOrderDialog.StopLossTriggerMethod = StopTriggerMethod.Opposite\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLossTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopLossTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.StopOrderTriggerMethod","kind":"property","name":"StopOrderTriggerMethod","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public StopTriggerMethod? StopOrderTriggerMethod {get; set;}","python":"newOrderDialog.StopOrderTriggerMethod: StopTriggerMethod | None","summary":"Gets or sets the HasTrailingStop.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, OrderType = OrderType.Stop, TargetPrice = Symbol.Ask + 15 * Symbol.PipSize };\nnewOrderDialog.StopOrderTriggerMethod = StopTriggerMethod.DoubleTrade;\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.OrderType = OrderType.Stop\nnewOrderDialog.TargetPrice = api.Symbol.Ask + 15 * api.Symbol.PipSize\nnewOrderDialog.StopOrderTriggerMethod = StopTriggerMethod.DoubleTrade\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopOrderTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/StopOrderTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string SymbolName {get; set;}","python":"newOrderDialog.SymbolName: str","summary":"Gets or sets the SymbolName.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = \"GBPUSD\" };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = \"GBPUSD\"\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.TakeProfitPips","kind":"property","name":"TakeProfitPips","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? TakeProfitPips {get; set;}","python":"newOrderDialog.TakeProfitPips: float | None","summary":"Gets or sets the TakeProfitPips.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, StopLossPips = 20, TakeProfitPips = 40 };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.StopLossPips = 20\nnewOrderDialog.TakeProfitPips = 40\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TakeProfitPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TakeProfitPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.TargetPrice","kind":"property","name":"TargetPrice","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? TargetPrice {get; set;}","python":"newOrderDialog.TargetPrice: float | None","summary":"Gets or sets the TargetPrice.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, TradeType = TradeType.Buy, OrderType = OrderType.Limit };\nnewOrderDialog.TargetPrice = Symbol.Bid - 15 * Symbol.PipSize;\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.TradeType = TradeType.Buy\nnewOrderDialog.OrderType = OrderType.Limit\nnewOrderDialog.TargetPrice = api.Symbol.Bid - 15 * api.Symbol.PipSize\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TargetPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TargetPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public TradeType TradeType {get; set;}","python":"newOrderDialog.TradeType: TradeType","summary":"Gets or sets the TradeType.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, TradeType = TradeType.Sell };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.TradeType = TradeType.Sell\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"P:cAlgo.API.NewOrderDialog.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.NewOrderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public double? Volume {get; set;}","python":"newOrderDialog.Volume: float | None","summary":"Gets or sets the Volume.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog { SymbolName = SymbolName, Volume = Symbol.QuantityToVolumeInUnits(0.1) };\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.Volume = api.Symbol.QuantityToVolumeInUnits(0.1)\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/NewOrderDialog/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything and the order settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything and the order settings are only stored."}]}
{"id":"T:cAlgo.API.OhlcvBar","kind":"struct","name":"OhlcvBar","type":null,"namespace":"cAlgo.API","group":"Bars","csharp":"public sealed struct OhlcvBar : ValueType","python":"OhlcvBar","summary":"Represents a OHLCV Bar object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var lastBar = Bars.LastBar;\nvar ohlcvBar = new OhlcvBar(lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, lastBar.TickVolume);\nPrint(\"OHLCV bar: {0}\", ohlcvBar);","python":"lastBar = api.Bars.LastBar\nohlcvBar = OhlcvBar(lastBar.Open, lastBar.High, lastBar.Low, lastBar.Close, lastBar.TickVolume)\napi.Print(f\"OHLCV bar: {ohlcvBar}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.OhlcvBar.#ctor(System.Double,System.Double,System.Double,System.Double,System.Int64)","kind":"constructor","name":"OhlcvBar","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public OhlcvBar(double open, double high, double low, double close, long tickVolume)","python":"OhlcvBar(open: float, high: float, low: float, close: float, tickVolume: int)","summary":"Create a OHLCV bar.","remarks":null,"parameters":[{"name":"open","csharpType":"double","pythonType":"float","summary":"Open price"},{"name":"high","csharpType":"double","pythonType":"float","summary":"High price"},{"name":"low","csharpType":"double","pythonType":"float","summary":"Low price"},{"name":"close","csharpType":"double","pythonType":"float","summary":"Close price"},{"name":"tickVolume","csharpType":"long","pythonType":"int","summary":"Tick volume"}],"returns":null,"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Range: {0}\", bar.High - bar.Low);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Range: {bar.High - bar.Low}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OhlcvBar.Close","kind":"property","name":"Close","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Close {get;}","python":"ohlcvBar.Close: float","summary":"Gets the Close price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Close: {0}, bullish: {1}\", bar.Close, bar.Close > bar.Open);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Close: {bar.Close}, bullish: {bar.Close > bar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OhlcvBar.High","kind":"property","name":"High","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public double High {get;}","python":"ohlcvBar.High: float","summary":"Gets the High price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"High: {0}\", bar.High);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"High: {bar.High}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/High/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/High/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OhlcvBar.Low","kind":"property","name":"Low","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Low {get;}","python":"ohlcvBar.Low: float","summary":"Gets the Low price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Low: {0}\", bar.Low);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Low: {bar.Low}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Low/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Low/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OhlcvBar.Open","kind":"property","name":"Open","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public double Open {get;}","python":"ohlcvBar.Open: float","summary":"Gets the open price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Open: {0}\", bar.Open);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Open: {bar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Open/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/Open/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OhlcvBar.TickVolume","kind":"property","name":"TickVolume","type":"T:cAlgo.API.OhlcvBar","namespace":"cAlgo.API","group":"Bars","csharp":"public long TickVolume {get;}","python":"ohlcvBar.TickVolume: int","summary":"Gets the Tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bar = new OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500);\nPrint(\"Tick volume: {0}\", bar.TickVolume);","python":"bar = OhlcvBar(1.1000, 1.1050, 1.0980, 1.1020, 1500)\napi.Print(f\"Tick volume: {bar.TickVolume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Bars/OhlcvBar/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.OnBalanceVolume","kind":"interface","name":"OnBalanceVolume","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface OnBalanceVolume","python":"OnBalanceVolume","summary":"On Balance Volume measures buying and selling pressure as a cumulative indicator that adds volume on up days and subtracts volume on down days.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private OnBalanceVolume _onBalanceVolume;\n\nprotected override void Initialize()\n{\n   _onBalanceVolume = Indicators.OnBalanceVolume(Source);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _onBalanceVolume.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.onBalanceVolume = api.Indicators.OnBalanceVolume(api.Source)\n\n    def calculate(self, index):\n        api.Result[index] = self.onBalanceVolume.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the On Balance Volume indicator\n    public partial class OnBalanceVolumeSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private OnBalanceVolume _onBalanceVolume;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _onBalanceVolume = Indicators.OnBalanceVolume(Bars.ClosePrices);\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_onBalanceVolume.Result, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_onBalanceVolume.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_onBalanceVolume.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass OnBalanceVolumeSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.onBalanceVolume = api.Indicators.OnBalanceVolume(api.Bars.ClosePrices)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.onBalanceVolume.Result, 9)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.onBalanceVolume.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.onBalanceVolume.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/OnBalanceVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/OnBalanceVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.OnBalanceVolume.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.OnBalanceVolume","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"onBalanceVolume.Result: IndicatorDataSeries","summary":"Gets or sets the time series of the On Balance Volume indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private OnBalanceVolume _onBalanceVolume;\n\nprotected override void OnStart()\n{\n    _onBalanceVolume = Indicators.OnBalanceVolume(Source);\n}\nprotected override void OnBar()\n{\n    var currentValue = _onBalanceVolume.Result.LastValue;\n    Print(\"On Balance Volume: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.onBalanceVolume = api.Indicators.OnBalanceVolume(api.Source)\n\ndef on_bar(self):\n    currentValue = self.onBalanceVolume.Result.LastValue\n    api.Print(f\"On Balance Volume: {currentValue}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/OnBalanceVolume/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/OnBalanceVolume/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.OpenFileDialog","kind":"class","name":"OpenFileDialog","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public class OpenFileDialog","python":"OpenFileDialog","summary":"Represents a common dialog box that allows a user to specify a filename for one or more files to open.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var openFileDialog = new OpenFileDialog\n        {\n            Title = \"Select File(s)\",\n            Multiselect = true,\n            AddExtension = true,\n        };\n\n        var result = openFileDialog.ShowDialog();\n\n        if (result == FileDialogResult.Cancel)\n            return;\n\n        foreach (var fileName in openFileDialog.FileNames)\n        {\n            Print(fileName);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        openFileDialog = OpenFileDialog()\n        openFileDialog.Title = \"Select File(s)\"\n        openFileDialog.Multiselect = True\n        openFileDialog.AddExtension = True\n\n        result = openFileDialog.ShowDialog()\n\n        if result == FileDialogResult.Cancel:\n            return\n\n        for fileName in openFileDialog.FileNames:\n            api.Print(fileName)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFileDialog.#ctor","kind":"constructor","name":"OpenFileDialog","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public OpenFileDialog()","python":"OpenFileDialog()","summary":"Creates an OpenFileDialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Title = \"Select a CSV file\", Filter = \"CSV files (*.csv)|*.csv\" };\nif (openFileDialog.ShowDialog() == FileDialogResult.OK)\n    Print(\"Selected file: {0}\", openFileDialog.FileName);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Title = \"Select a CSV file\"\nopenFileDialog.Filter = \"CSV files (*.csv)|*.csv\"\nif openFileDialog.ShowDialog() == FileDialogResult.OK:\n    api.Print(f\"Selected file: {openFileDialog.FileName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFileDialog.Reset","kind":"method","name":"Reset","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void Reset()","python":"openFileDialog.Reset() -> None","summary":"Resets all dialog properties to their default values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Title = \"Import\", Multiselect = true };\nopenFileDialog.ShowDialog();\nopenFileDialog.Reset();\nPrint(\"Multiselect after reset: {0}\", openFileDialog.Multiselect);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Title = \"Import\"\nopenFileDialog.Multiselect = True\nopenFileDialog.ShowDialog()\nopenFileDialog.Reset()\napi.Print(f\"Multiselect after reset: {openFileDialog.Multiselect}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Reset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Reset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFileDialog.ShowDialog","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog()","python":"openFileDialog.ShowDialog() -> FileDialogResult","summary":"Shows a file dialog, with the owner as the main Window","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Filter = \"CSV files (*.csv)|*.csv\" };\nvar result = openFileDialog.ShowDialog();\nif (result == FileDialogResult.OK)\n    Print(\"Importing {0}\", openFileDialog.FileName);\nelse\n    Print(\"Dialog result: {0}\", result);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Filter = \"CSV files (*.csv)|*.csv\"\nresult = openFileDialog.ShowDialog()\nif result == FileDialogResult.OK:\n    api.Print(f\"Importing {openFileDialog.FileName}\")\nelse:\n    api.Print(f\"Dialog result: {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FileName and FileNames are unchanged."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FileName and FileNames are unchanged."}]}
{"id":"M:cAlgo.API.OpenFileDialog.ShowDialog(cAlgo.API.Window)","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog(Window owner)","python":"openFileDialog.ShowDialog(owner: Window) -> FileDialogResult","summary":"Shows a file dialog, with the passed owner window.","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the file dialog."}],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Import\", Width = 300, Height = 150 };\nvar browseButton = new Button { Text = \"Browse\" };\nbrowseButton.Click += args =>\n{\n    var openFileDialog = new OpenFileDialog();\n    if (openFileDialog.ShowDialog(window) == FileDialogResult.OK)\n        Print(\"File: {0}\", openFileDialog.FileName);\n};\nwindow.Child = browseButton;\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Import\"\nwindow.Width = 300\nwindow.Height = 150\nwindow.Show()\nopenFileDialog = OpenFileDialog()\nif openFileDialog.ShowDialog(window) == FileDialogResult.OK:\n    api.Print(f\"File: {openFileDialog.FileName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FileName and FileNames are unchanged."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FileName and FileNames are unchanged."}]}
{"id":"P:cAlgo.API.OpenFileDialog.AddExtension","kind":"property","name":"AddExtension","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool AddExtension {get; set;}","python":"openFileDialog.AddExtension: bool","summary":"Gets or sets a value indicating whether a file dialog automatically adds an extension to a file name if the user omits an extension.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { AddExtension = true, DefaultExt = \"csv\" };\nopenFileDialog.ShowDialog();","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.AddExtension = True\nopenFileDialog.DefaultExt = \"csv\"\nopenFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/AddExtension/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/AddExtension/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.DefaultExt","kind":"property","name":"DefaultExt","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string DefaultExt {get; set;}","python":"openFileDialog.DefaultExt: str","summary":"Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { DefaultExt = \"txt\", Filter = \"Text files (*.txt)|*.txt\" };\nopenFileDialog.ShowDialog();\nPrint(\"Default extension: {0}\", openFileDialog.DefaultExt);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.DefaultExt = \"txt\"\nopenFileDialog.Filter = \"Text files (*.txt)|*.txt\"\nopenFileDialog.ShowDialog()\napi.Print(f\"Default extension: {openFileDialog.DefaultExt}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/DefaultExt/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/DefaultExt/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.FileName","kind":"property","name":"FileName","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string FileName {get;}","python":"openFileDialog.FileName: str","summary":"Gets a string containing the full path of the file selected in a file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Filter = \"Text files (*.txt)|*.txt\" };\nif (openFileDialog.ShowDialog() == FileDialogResult.OK)\n    Print(\"File: {0}\", openFileDialog.FileName);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Filter = \"Text files (*.txt)|*.txt\"\nif openFileDialog.ShowDialog() == FileDialogResult.OK:\n    api.Print(f\"File: {openFileDialog.FileName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/FileName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/FileName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.FileNames","kind":"property","name":"FileNames","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string[] FileNames {get;}","python":"openFileDialog.FileNames: list[str]","summary":"Gets an array that contains one file name for each selected file.","remarks":null,"parameters":[],"returns":{"csharpType":"string[]","pythonType":"list[str]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Multiselect = true };\nif (openFileDialog.ShowDialog() == FileDialogResult.OK)\n{\n    foreach (var fileName in openFileDialog.FileNames)\n        Print(\"Selected: {0}\", fileName);\n}","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Multiselect = True\nif openFileDialog.ShowDialog() == FileDialogResult.OK:\n    for fileName in openFileDialog.FileNames:\n        api.Print(f\"Selected: {fileName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/FileNames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/FileNames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.Filter","kind":"property","name":"Filter","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Filter {get; set;}","python":"openFileDialog.Filter: str","summary":"Gets or sets the filter string that determines what types of files are displayed in file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Filter = \"CSV files (*.csv)|*.csv|All files (*.*)|*.*\" };\nopenFileDialog.ShowDialog();","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Filter = \"CSV files (*.csv)|*.csv|All files (*.*)|*.*\"\nopenFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Filter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Filter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.InitialDirectory","kind":"property","name":"InitialDirectory","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string InitialDirectory {get; set;}","python":"openFileDialog.InitialDirectory: str","summary":"Gets or sets the initial directory that is displayed by a file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) };\nopenFileDialog.ShowDialog();","python":"from System import Environment\nopenFileDialog = OpenFileDialog()\nopenFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)\nopenFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/InitialDirectory/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/InitialDirectory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.Multiselect","kind":"property","name":"Multiselect","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool Multiselect {get; set;}","python":"openFileDialog.Multiselect: bool","summary":"Gets or sets an option indicating whether OpenFileDialog allows users to select multiple files.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Multiselect = true, Filter = \"CSV files (*.csv)|*.csv\" };\nif (openFileDialog.ShowDialog() == FileDialogResult.OK)\n    Print(\"Selected {0} file(s)\", openFileDialog.FileNames.Length);","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Multiselect = True\nopenFileDialog.Filter = \"CSV files (*.csv)|*.csv\"\nif openFileDialog.ShowDialog() == FileDialogResult.OK:\n    api.Print(f\"Selected {len(openFileDialog.FileNames)} file(s)\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Multiselect/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Multiselect/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.Title","kind":"property","name":"Title","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Title {get; set;}","python":"openFileDialog.Title: str","summary":"Gets or sets a string shown in the title bar of the dialog. If this property is null, a localized default from the operating system itself will be used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { Title = \"Import trade signals\" };\nopenFileDialog.ShowDialog();","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.Title = \"Import trade signals\"\nopenFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFileDialog.ValidateNames","kind":"property","name":"ValidateNames","type":"T:cAlgo.API.OpenFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool ValidateNames {get; set;}","python":"openFileDialog.ValidateNames: bool","summary":"Gets or sets a value indicating whether the dialog accepts only valid file names.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFileDialog = new OpenFileDialog { ValidateNames = true };\nopenFileDialog.ShowDialog();","python":"openFileDialog = OpenFileDialog()\nopenFileDialog.ValidateNames = True\nopenFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ValidateNames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFileDialog/ValidateNames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"T:cAlgo.API.OpenFolderDialog","kind":"class","name":"OpenFolderDialog","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public class OpenFolderDialog","python":"OpenFolderDialog","summary":"Represents a common dialog box that allows the user to open one or more folders.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var openFolderDialog = new OpenFolderDialog\n        {\n            Title = \"Select File(s)\",\n        };\n\n        var result = openFolderDialog.ShowDialog();\n\n        if (result == FileDialogResult.Cancel)\n            return;\n\n        Print(openFolderDialog.FolderName);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        openFolderDialog = OpenFolderDialog()\n        openFolderDialog.Title = \"Select File(s)\"\n        result = openFolderDialog.ShowDialog()\n\n        if result == FileDialogResult.Cancel:\n            return\n\n        api.Print(openFolderDialog.FolderName)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFolderDialog.#ctor","kind":"constructor","name":"OpenFolderDialog","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public OpenFolderDialog()","python":"OpenFolderDialog()","summary":"Creates an OpenFolderDialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog { Title = \"Select export folder\" };\nif (openFolderDialog.ShowDialog() == FileDialogResult.OK)\n    Print(\"Selected folder: {0}\", openFolderDialog.FolderName);","python":"openFolderDialog = OpenFolderDialog()\nopenFolderDialog.Title = \"Select export folder\"\nif openFolderDialog.ShowDialog() == FileDialogResult.OK:\n    api.Print(f\"Selected folder: {openFolderDialog.FolderName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFolderDialog.Reset","kind":"method","name":"Reset","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void Reset()","python":"openFolderDialog.Reset() -> None","summary":"Resets all dialog properties to their default values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog { Title = \"First selection\" };\nopenFolderDialog.ShowDialog();\nopenFolderDialog.Reset();\nPrint(\"Folder after reset: '{0}'\", openFolderDialog.FolderName);","python":"openFolderDialog = OpenFolderDialog()\nopenFolderDialog.Title = \"First selection\"\nopenFolderDialog.ShowDialog()\nopenFolderDialog.Reset()\napi.Print(f\"Folder after reset: '{openFolderDialog.FolderName}'\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Reset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Reset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.OpenFolderDialog.ShowDialog","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog()","python":"openFolderDialog.ShowDialog() -> FileDialogResult","summary":"Shows a file dialog, with the owner as the main Window","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog { Title = \"Select folder\" };\nvar result = openFolderDialog.ShowDialog();\nPrint(\"Dialog result: {0}, folder: {1}\", result, openFolderDialog.FolderName);","python":"openFolderDialog = OpenFolderDialog()\nopenFolderDialog.Title = \"Select folder\"\nresult = openFolderDialog.ShowDialog()\napi.Print(f\"Dialog result: {result}, folder: {openFolderDialog.FolderName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FolderName is unchanged."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FolderName is unchanged."}]}
{"id":"M:cAlgo.API.OpenFolderDialog.ShowDialog(cAlgo.API.Window)","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog(Window owner)","python":"openFolderDialog.ShowDialog(owner: Window) -> FileDialogResult","summary":"Shows a file dialog, with the passed owner window.","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the file dialog."}],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Settings\", Width = 300, Height = 200 };\nvar browseButton = new Button { Text = \"Browse\" };\nbrowseButton.Click += args =>\n{\n    var openFolderDialog = new OpenFolderDialog();\n    if (openFolderDialog.ShowDialog(window) == FileDialogResult.OK)\n        Print(\"Folder: {0}\", openFolderDialog.FolderName);\n};\nwindow.Child = browseButton;\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Settings\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.Show()\nopenFolderDialog = OpenFolderDialog()\nif openFolderDialog.ShowDialog(window) == FileDialogResult.OK:\n    api.Print(f\"Folder: {openFolderDialog.FolderName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FolderName is unchanged."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None; FolderName is unchanged."}]}
{"id":"P:cAlgo.API.OpenFolderDialog.FolderName","kind":"property","name":"FolderName","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string FolderName {get;}","python":"openFolderDialog.FolderName: str","summary":"Gets a string containing the full path of the folder selected in an open folder dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog();\nif (openFolderDialog.ShowDialog() == FileDialogResult.OK)\n    Print(\"Folder: {0}\", openFolderDialog.FolderName);","python":"openFolderDialog = OpenFolderDialog()\nif openFolderDialog.ShowDialog() == FileDialogResult.OK:\n    api.Print(f\"Folder: {openFolderDialog.FolderName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/FolderName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/FolderName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFolderDialog.InitialDirectory","kind":"property","name":"InitialDirectory","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string InitialDirectory {get; set;}","python":"openFolderDialog.InitialDirectory: str","summary":"Gets or sets the initial directory that is displayed by a file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) };\nopenFolderDialog.ShowDialog();","python":"from System import Environment\nopenFolderDialog = OpenFolderDialog()\nopenFolderDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)\nopenFolderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/InitialDirectory/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/InitialDirectory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.OpenFolderDialog.Title","kind":"property","name":"Title","type":"T:cAlgo.API.OpenFolderDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Title {get; set;}","python":"openFolderDialog.Title: str","summary":"Gets or sets a string shown in the title bar of the dialog. If this property is null, a localized default from the operating system itself will be used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var openFolderDialog = new OpenFolderDialog { Title = \"Choose a folder for backtest reports\" };\nopenFolderDialog.ShowDialog();","python":"openFolderDialog = OpenFolderDialog()\nopenFolderDialog.Title = \"Choose a folder for backtest reports\"\nopenFolderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/OpenFolderDialog/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored."}]}
{"id":"T:cAlgo.API.Optimization","kind":"interface","name":"Optimization","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public interface Optimization","python":"Optimization","summary":"Provides methods and events to manage and monitor cBot parameter optimization processes.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        private OptimizationProcess _optimizationProcess;\n\n        protected override void OnStart()\n        {\n            if (AlgoRegistry.Get(RobotName, AlgoKind.Robot) is not RobotType robotType)\n            {\n                Print($\"Robot type {RobotName} not found\");\n                return;\n            }\n\n            var settings = new OptimizationSettings(\n                StartTime, EndTime, AccountBalance,\n                new[]\n                {\n                    new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)\n                })\n            {\n                DataMode = BacktestingDataMode.M1,\n                Commission = 30,\n                CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume,\n                ApplyCommissionAutomatically = false,\n                SpreadPips = 2,\n                Method = OptimizationMethod.Grid,\n                Cores = 4,\n                AutoSelectBest = true,\n                PreciseConversion = true\n            };\n\n            var slowPeriods = new OptimizationIntegerParameter(\"SlowPeriods\", min: 5, max: 50, step: 5);\n            var maType = new OptimizationEnumParameter(\"MAType\", new[] { \"Simple\", \"Exponential\", \"Weighted\" });\n\n            // Optimize across multiple time frames (as in the desktop UI).\n            var timeFrames = new[] { TimeFrame.Minute15, TimeFrame, TimeFrame.Hour4 };\n            _optimizationProcess = Optimization.Start(robotType, Symbol.Name, timeFrames, settings, slowPeriods, maType);\n\n            _optimizationProcess.ProgressChanged += args => Print($\"Optimization progress: {args.Operation} {args.Progress}\");\n            _optimizationProcess.PassCompleted += args => Print($\"Pass {args.Pass.Id} done: {args.Pass.TimeFrame} fitness {args.Pass.Fitness}\");\n            _optimizationProcess.Completed += args => Print($\"Optimization completed. Best pass: {args.BestPass?.Id}\");\n\n            if (_optimizationProcess.IsCompleted)\n                Print($\"Optimization completed, error: {_optimizationProcess.OptimizationError}\");\n        }\n\n        protected override void OnStop()\n        {\n            _optimizationProcess?.Terminate();\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(api.RobotName, AlgoKind.Robot)\n        if algoType is None:\n            print(f\"Robot type {api.RobotName} not found\")\n            return\n\n        robotType = RobotType(algoType)\n\n        criteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\n        settings = OptimizationSettings(api.StartTime, api.EndTime, api.AccountBalance, criteria)\n        settings.DataMode = BacktestingDataMode.M1\n        settings.Commission = 30\n        settings.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\n        settings.ApplyCommissionAutomatically = False\n        settings.SpreadPips = 2\n        settings.Method = OptimizationMethod.Grid\n        settings.Cores = 4\n        settings.AutoSelectBest = True\n        settings.PreciseConversion = True\n\n        slowPeriods = OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5)\n        maType = OptimizationEnumParameter(\"MAType\", [\"Simple\", \"Exponential\", \"Weighted\"])\n\n        # Optimize across multiple time frames (as in the desktop UI).\n        timeFrames = [TimeFrame.Minute15, api.TimeFrame, TimeFrame.Hour4]\n        self.optimizationProcess = api.Optimization.Start(robotType, api.Symbol.Name, timeFrames, settings, slowPeriods, maType)\n        self.optimizationProcess.ProgressChanged += lambda args: print(f\"Optimization progress: {args.Operation} {args.Progress}\")\n        self.optimizationProcess.PassCompleted += lambda args: print(f\"Pass {args.Pass.Id} done: {args.Pass.TimeFrame}\")\n        self.optimizationProcess.Completed += lambda args: print(f\"Optimization completed\")\n\n        if self.optimizationProcess.IsCompleted:\n            print(f\"Optimization completed, error: {self.optimizationProcess.OptimizationError}\")\n\n    def on_stop(self):\n        if hasattr(self, \"optimizationProcess\") and self.optimizationProcess is not None:\n            self.optimizationProcess.Terminate()","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"RobotName\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample Trend cBot\"\n    },\n    {\n      \"Name\": \"Symbol\",\n      \"Type\": \"Symbol\",\n      \"DefaultValue\": \"EURUSD\"\n    },\n    {\n      \"Name\": \"TimeFrame\",\n      \"Type\": \"TimeFrame\",\n      \"DefaultValue\": \"Hour\"\n    },\n    {\n      \"Name\": \"StartTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2025-01-01T00:00:00\"\n    },\n    {\n      \"Name\": \"EndTime\",\n      \"Type\": \"DateTime\",\n      \"DefaultValue\": \"2025-02-01T00:00:00\"\n    },\n    {\n      \"Name\": \"AccountBalance\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 100000\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Optimization.Start(cAlgo.API.RobotType,System.String,cAlgo.API.TimeFrame,cAlgo.API.OptimizationSettings,cAlgo.API.OptimizationParameter[])","kind":"method","name":"Start","type":"T:cAlgo.API.Optimization","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationProcess Start(RobotType robotType, string symbolName, TimeFrame timeFrame, OptimizationSettings settings, OptimizationParameter[] parameters)","python":"api.Optimization.Start(robotType: RobotType, symbolName: str, timeFrame: TimeFrame, settings: OptimizationSettings, parameters: list[OptimizationParameter]) -> OptimizationProcess","summary":"Starts an optimization process.","remarks":null,"parameters":[{"name":"robotType","csharpType":"RobotType","pythonType":"RobotType","summary":"The type of the robot to optimize"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name for which the optimization is performed"},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The time frame for the optimization"},{"name":"settings","csharpType":"OptimizationSettings","pythonType":"OptimizationSettings","summary":"The settings to configure the optimization process"},{"name":"parameters","csharpType":"OptimizationParameter[]","pythonType":"list[OptimizationParameter]","summary":"The cBot parameters to optimize (ranges, discrete values, or fixed)"}],"returns":{"csharpType":"OptimizationProcess","pythonType":"OptimizationProcess","summary":"The optimization process instance","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria) { Method = OptimizationMethod.Grid };\nvar process = Optimization.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.Completed += args => Print(\"Best pass: {0}, net profit {1}\", args.BestPass?.Id, args.BestPass?.NetProfit);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.Completed += lambda args: api.Print(f\"Best pass: {args.BestPass.Id if args.BestPass is not None else None}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.Optimization.Start(cAlgo.API.RobotType,System.String,System.Collections.Generic.IEnumerable{cAlgo.API.TimeFrame},cAlgo.API.OptimizationSettings,cAlgo.API.OptimizationParameter[])","kind":"method","name":"Start","type":"T:cAlgo.API.Optimization","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationProcess Start(RobotType robotType, string symbolName, IEnumerable<TimeFrame> timeFrames, OptimizationSettings settings, OptimizationParameter[] parameters)","python":"api.Optimization.Start(robotType: RobotType, symbolName: str, timeFrames: Iterable[TimeFrame], settings: OptimizationSettings, parameters: list[OptimizationParameter]) -> OptimizationProcess","summary":"Starts an optimization process across multiple time frames. Use this overload to optimize the time frame alongside the cBot parameters, mirroring the desktop UI where the time frame can itself be part of the optimization. Each time frame is combined with the supplied parameter set during the optimization.","remarks":null,"parameters":[{"name":"robotType","csharpType":"RobotType","pythonType":"RobotType","summary":"The type of the robot to optimize"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name for which the optimization is performed"},{"name":"timeFrames","csharpType":"IEnumerable<TimeFrame>","pythonType":"Iterable[TimeFrame]","summary":"The time frames to optimize over"},{"name":"settings","csharpType":"OptimizationSettings","pythonType":"OptimizationSettings","summary":"The settings to configure the optimization process"},{"name":"parameters","csharpType":"OptimizationParameter[]","pythonType":"list[OptimizationParameter]","summary":"The cBot parameters to optimize (ranges, discrete values, or fixed)"}],"returns":{"csharpType":"OptimizationProcess","pythonType":"OptimizationProcess","summary":"The optimization process instance","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.ProfitFactor, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria);\nvar timeFrames = new[] { TimeFrame.Minute15, TimeFrame.Hour, TimeFrame.Hour4 };\nvar process = Optimization.Start(robotType, \"EURUSD\", timeFrames, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.PassCompleted += args => Print(\"Pass {0} on {1}: profit factor {2}\", args.Pass.Id, args.Pass.TimeFrame, args.Pass.ProfitFactor);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.ProfitFactor, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\ntimeFrames = [TimeFrame.Minute15, TimeFrame.Hour, TimeFrame.Hour4]\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", timeFrames, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} on {args.Pass.TimeFrame}: profit factor {args.Pass.ProfitFactor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Optimization.Completed","kind":"event","name":"Completed","type":"T:cAlgo.API.Optimization","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationCompletedEventArgs> Completed;","python":"api.Optimization.Completed += handler  # handler(obj: OptimizationCompletedEventArgs)","summary":"Occurs when the optimization process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationCompletedEventArgs>","pythonType":"Callable[[OptimizationCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    if (args.BestPass != null)\n        Print(\"Best pass {0}, fitness {1}\", args.BestPass.Id, args.BestPass.Fitness);\n    else\n        Print(\"Optimization finished without passes, error: {0}\", args.Process.OptimizationError);\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    if args.BestPass is not None:\n        api.Print(f\"Best pass {args.BestPass.Id}, fitness {args.BestPass.Fitness}\")\n    else:\n        api.Print(f\"Optimization finished without passes, error: {args.Process.OptimizationError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Completed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/Completed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Optimization.PassCompleted","kind":"event","name":"PassCompleted","type":"T:cAlgo.API.Optimization","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationPassCompletedEventArgs> PassCompleted;","python":"api.Optimization.PassCompleted += handler  # handler(obj: OptimizationPassCompletedEventArgs)","summary":"Occurs when an individual optimization pass completes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationPassCompletedEventArgs>","pythonType":"Callable[[OptimizationPassCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.PassCompleted += OnOptimizationPassCompleted;\n}\n\nprivate void OnOptimizationPassCompleted(OptimizationPassCompletedEventArgs args)\n{\n    Print(\"Pass {0} completed, net profit {1}, trades {2}\", args.Pass.Id, args.Pass.NetProfit, args.Pass.TotalTrades);\n}","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_optimization_pass_completed\n\ndef on_optimization_pass_completed(self, args):\n    api.Print(f\"Pass {args.Pass.Id} completed, net profit {args.Pass.NetProfit}, trades {args.Pass.TotalTrades}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/PassCompleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/PassCompleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.Optimization.ProgressChanged","kind":"event","name":"ProgressChanged","type":"T:cAlgo.API.Optimization","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationProgressChangedEventArgs> ProgressChanged;","python":"api.Optimization.ProgressChanged += handler  # handler(obj: OptimizationProgressChangedEventArgs)","summary":"Occurs when the optimization progress changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationProgressChangedEventArgs>","pythonType":"Callable[[OptimizationProgressChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.ProgressChanged += OnOptimizationProgressChanged;\n}\n\nprivate void OnOptimizationProgressChanged(OptimizationProgressChangedEventArgs args)\n{\n    Print(\"Optimization progress: {0:F1}% ({1})\", args.Progress, args.Operation);\n}","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_optimization_progress_changed\n\ndef on_optimization_progress_changed(self, args):\n    api.Print(f\"Optimization progress: {args.Progress:.1f}% ({args.Operation})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/ProgressChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/Optimization/ProgressChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationBooleanParameter","kind":"record","name":"OptimizationBooleanParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationBooleanParameter : OptimizationParameter`1","python":"OptimizationBooleanParameter","summary":"A bool cBot parameter, optimized over a set of values or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var optimized = new OptimizationBooleanParameter(\"UseTrailingStop\", new[] { true, false });\nvar fixedValue = new OptimizationBooleanParameter(\"UseStopLoss\", true);\nPrint(\"{0} optimized: {1}, {2} fixed at {3}\", optimized.Name, optimized.IsOptimized, fixedValue.Name, fixedValue.Value);","python":"optimized = OptimizationBooleanParameter(\"UseTrailingStop\", [True, False])\nfixedValue = OptimizationBooleanParameter(\"UseStopLoss\", True)\napi.Print(f\"{optimized.Name} optimized: {optimized.IsOptimized}, {fixedValue.Name} fixed at {fixedValue.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationBooleanParameter.#ctor(System.String,System.Collections.Generic.IEnumerable{System.Boolean})","kind":"constructor","name":"OptimizationBooleanParameter","type":"T:cAlgo.API.OptimizationBooleanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationBooleanParameter(string name, IEnumerable<bool> values)","python":"OptimizationBooleanParameter(name: str, values: Iterable[bool])","summary":"Optimizes the parameter over the given values.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"values","csharpType":"IEnumerable<bool>","pythonType":"Iterable[bool]","summary":"The discrete set of values to optimize over."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationBooleanParameter(\"UseTrailingStop\", new[] { true, false });\nPrint(\"{0} is optimized over {1} values\", parameter.Name, parameter.Values.Count);","python":"parameter = OptimizationBooleanParameter(\"UseTrailingStop\", [True, False])\napi.Print(f\"{parameter.Name} is optimized over {parameter.Values.Count} values\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationBooleanParameter.#ctor(System.String,System.Boolean)","kind":"constructor","name":"OptimizationBooleanParameter","type":"T:cAlgo.API.OptimizationBooleanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationBooleanParameter(string name, bool value)","python":"OptimizationBooleanParameter(name: str, value: bool)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"bool","pythonType":"bool","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationBooleanParameter(\"UseStopLoss\", true);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationBooleanParameter(\"UseStopLoss\", True)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationBooleanParameter.#ctor(cAlgo.API.OptimizationBooleanParameter)","kind":"constructor","name":"OptimizationBooleanParameter","type":"T:cAlgo.API.OptimizationBooleanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationBooleanParameter(OptimizationBooleanParameter original)","python":"OptimizationBooleanParameter(original: OptimizationBooleanParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationBooleanParameter","pythonType":"OptimizationBooleanParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationBooleanParameter.Values","kind":"property","name":"Values","type":"T:cAlgo.API.OptimizationBooleanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public IReadOnlyList<bool> Values {get;}","python":"optimizationBooleanParameter.Values: Sequence[bool]","summary":"Gets the discrete set of values to optimize over.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<bool>","pythonType":"Sequence[bool]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationBooleanParameter(\"UseTrailingStop\", new[] { true, false });\nforeach (var value in parameter.Values)\n    Print(\"{0} candidate: {1}\", parameter.Name, value);","python":"parameter = OptimizationBooleanParameter(\"UseTrailingStop\", [True, False])\nfor value in parameter.Values:\n    api.Print(f\"{parameter.Name} candidate: {value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Values/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationBooleanParameter/Values/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationColorParameter","kind":"record","name":"OptimizationColorParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationColorParameter : OptimizationParameter`1","python":"OptimizationColorParameter","summary":"A Color cBot parameter. Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationColorParameter(\"LineColor\", Color.Red);\nPrint(\"{0} is fixed at {1}, optimized: {2}\", parameter.Name, parameter.Value, parameter.IsOptimized);","python":"parameter = OptimizationColorParameter(\"LineColor\", Color.Red)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}, optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationColorParameter.#ctor(System.String,cAlgo.API.Color)","kind":"constructor","name":"OptimizationColorParameter","type":"T:cAlgo.API.OptimizationColorParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationColorParameter(string name, Color value)","python":"OptimizationColorParameter(name: str, value: Color)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"Color","pythonType":"Color","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationColorParameter(\"LineColor\", Color.FromHex(\"#FF2F4BFF\"));\nPrint(\"{0} = {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationColorParameter(\"LineColor\", Color.FromHex(\"#FF2F4BFF\"))\napi.Print(f\"{parameter.Name} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationColorParameter.#ctor(cAlgo.API.OptimizationColorParameter)","kind":"constructor","name":"OptimizationColorParameter","type":"T:cAlgo.API.OptimizationColorParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationColorParameter(OptimizationColorParameter original)","python":"OptimizationColorParameter(original: OptimizationColorParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationColorParameter","pythonType":"OptimizationColorParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationCompletedEventArgs","kind":"record","name":"OptimizationCompletedEventArgs","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationCompletedEventArgs","python":"OptimizationCompletedEventArgs","summary":"Provides data for the optimization completed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    Print(\"Optimization completed, error: {0}, best pass: {1}\", args.Process.OptimizationError, args.BestPass?.Id);\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    api.Print(f\"Optimization completed, error: {args.Process.OptimizationError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationCompletedEventArgs.#ctor(cAlgo.API.OptimizationCompletedEventArgs)","kind":"constructor","name":"OptimizationCompletedEventArgs","type":"T:cAlgo.API.OptimizationCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationCompletedEventArgs(OptimizationCompletedEventArgs original)","python":"OptimizationCompletedEventArgs(original: OptimizationCompletedEventArgs)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationCompletedEventArgs","pythonType":"OptimizationCompletedEventArgs","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationCompletedEventArgs.BestPass","kind":"property","name":"BestPass","type":"T:cAlgo.API.OptimizationCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationPass BestPass {get;}","python":"optimizationCompletedEventArgs.BestPass: OptimizationPass","summary":"Gets the best pass by the configured criteria or custom fitness, or null if no pass completed.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationPass","pythonType":"OptimizationPass","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    var bestPass = args.BestPass;\n    if (bestPass == null)\n        return;\n    foreach (var parameter in bestPass.ParameterValues)\n        Print(\"Best {0} = {1}\", parameter.Key, parameter.Value);\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    bestPass = args.BestPass\n    if bestPass is None:\n        return\n    for parameter in bestPass.ParameterValues:\n        api.Print(f\"Best {parameter.Key} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/BestPass/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/BestPass/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationCompletedEventArgs.JsonReport","kind":"property","name":"JsonReport","type":"T:cAlgo.API.OptimizationCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public string JsonReport {get;}","python":"optimizationCompletedEventArgs.JsonReport: str","summary":"Gets the full optimization result as JSON (the .optres content).","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    if (args.JsonReport != null)\n        LocalStorage.SetString(\"LastOptimizationResult\", args.JsonReport);\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    if args.JsonReport is not None:\n        api.LocalStorage.SetString(\"LastOptimizationResult\", args.JsonReport)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/JsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/JsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationCompletedEventArgs.Process","kind":"property","name":"Process","type":"T:cAlgo.API.OptimizationCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationProcess Process {get;}","python":"optimizationCompletedEventArgs.Process: OptimizationProcess","summary":"Gets the optimization process that has completed.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationProcess","pythonType":"OptimizationProcess","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    Print(\"Passes completed: {0}\", args.Process.Passes.Count);\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    api.Print(f\"Passes completed: {args.Process.Passes.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/Process/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/Process/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationCriterion","kind":"struct","name":"OptimizationCriterion","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public sealed struct OptimizationCriterion : ValueType","python":"OptimizationCriterion","summary":"A single optimization criterion: a performance index and the direction to optimize it.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var netProfit = new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize);\nvar drawdown = new OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize);\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, new[] { netProfit, drawdown });\nPrint(\"Criteria: {0}\", settings.Criteria.Count);","python":"from System import DateTime\nnetProfit = OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)\ndrawdown = OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize)\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, [netProfit, drawdown])\napi.Print(f\"Criteria: {settings.Criteria.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationCriterion.#ctor(cAlgo.API.OptimizationCriterionType,cAlgo.API.OptimizationCriterionDirection)","kind":"constructor","name":"OptimizationCriterion","type":"T:cAlgo.API.OptimizationCriterion","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationCriterion(OptimizationCriterionType Type, OptimizationCriterionDirection Direction)","python":"OptimizationCriterion(Type: OptimizationCriterionType, Direction: OptimizationCriterionDirection)","summary":"A single optimization criterion: a performance index and the direction to optimize it.","remarks":null,"parameters":[{"name":"Type","csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"The performance index to optimize."},{"name":"Direction","csharpType":"OptimizationCriterionDirection","pythonType":"OptimizationCriterionDirection","summary":"Whether to maximize or minimize the index."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var netProfit = new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize);\nvar drawdown = new OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize);\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, new[] { netProfit, drawdown });\nPrint(\"Criteria: {0}\", settings.Criteria.Count);","python":"from System import DateTime\nnetProfit = OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)\ndrawdown = OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize)\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, [netProfit, drawdown])\napi.Print(f\"Criteria: {settings.Criteria.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationCriterion.Direction","kind":"property","name":"Direction","type":"T:cAlgo.API.OptimizationCriterion","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationCriterionDirection Direction {get; set;}","python":"optimizationCriterion.Direction: OptimizationCriterionDirection","summary":"Whether to maximize or minimize the index.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionDirection","pythonType":"OptimizationCriterionDirection","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Direction/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Direction/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationCriterion.Type","kind":"property","name":"Type","type":"T:cAlgo.API.OptimizationCriterion","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationCriterionType Type {get; set;}","python":"optimizationCriterion.Type: OptimizationCriterionType","summary":"The performance index to optimize.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterion/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationCriterionDirection","kind":"enum","name":"OptimizationCriterionDirection","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public enum OptimizationCriterionDirection","python":"OptimizationCriterionDirection","summary":"The direction in which an optimization criterion is optimized.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criterion = new OptimizationCriterion(OptimizationCriterionType.MaxBalanceDrawdown, OptimizationCriterionDirection.Minimize);\nPrint(\"{0} is optimized with direction {1}\", criterion.Type, criterion.Direction);","python":"criterion = OptimizationCriterion(OptimizationCriterionType.MaxBalanceDrawdown, OptimizationCriterionDirection.Minimize)\napi.Print(f\"{criterion.Type} is optimized with direction {criterion.Direction}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionDirection.Maximize","kind":"enum value","name":"Maximize","type":"T:cAlgo.API.OptimizationCriterionDirection","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionDirection.Maximize;","python":"OptimizationCriterionDirection.Maximize","summary":"Maximize the index.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionDirection","pythonType":"OptimizationCriterionDirection","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionDirection.Minimize","kind":"enum value","name":"Minimize","type":"T:cAlgo.API.OptimizationCriterionDirection","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionDirection.Minimize;","python":"OptimizationCriterionDirection.Minimize","summary":"Minimize the index.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionDirection","pythonType":"OptimizationCriterionDirection","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationCriterionType","kind":"enum","name":"OptimizationCriterionType","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public enum OptimizationCriterionType","python":"OptimizationCriterionType","summary":"The performance index used as an optimization criterion.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criterion = new OptimizationCriterion(OptimizationCriterionType.WinningTrades, OptimizationCriterionDirection.Maximize);\nPrint(\"Optimization criterion: {0}\", criterion.Type);","python":"criterion = OptimizationCriterion(OptimizationCriterionType.WinningTrades, OptimizationCriterionDirection.Maximize)\napi.Print(f\"Optimization criterion: {criterion.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.NetProfit","kind":"enum value","name":"NetProfit","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.NetProfit;","python":"OptimizationCriterionType.NetProfit","summary":"Net profit.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.ProfitFactor","kind":"enum value","name":"ProfitFactor","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.ProfitFactor;","python":"OptimizationCriterionType.ProfitFactor","summary":"Profit factor.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.MaxEquityDrawdownPercentages","kind":"enum value","name":"MaxEquityDrawdownPercentages","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.MaxEquityDrawdownPercentages;","python":"OptimizationCriterionType.MaxEquityDrawdownPercentages","summary":"Maximum equity drawdown, as a percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.MaxBalanceDrawdownPercentages","kind":"enum value","name":"MaxBalanceDrawdownPercentages","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.MaxBalanceDrawdownPercentages;","python":"OptimizationCriterionType.MaxBalanceDrawdownPercentages","summary":"Maximum balance drawdown, as a percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.MaxEquityDrawdown","kind":"enum value","name":"MaxEquityDrawdown","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.MaxEquityDrawdown;","python":"OptimizationCriterionType.MaxEquityDrawdown","summary":"Maximum equity drawdown, in deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.MaxBalanceDrawdown","kind":"enum value","name":"MaxBalanceDrawdown","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.MaxBalanceDrawdown;","python":"OptimizationCriterionType.MaxBalanceDrawdown","summary":"Maximum balance drawdown, in deposit currency.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.WinningTrades","kind":"enum value","name":"WinningTrades","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.WinningTrades;","python":"OptimizationCriterionType.WinningTrades","summary":"Number of winning trades.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.LosingTrades","kind":"enum value","name":"LosingTrades","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.LosingTrades;","python":"OptimizationCriterionType.LosingTrades","summary":"Number of losing trades.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.TotalTrades","kind":"enum value","name":"TotalTrades","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.TotalTrades;","python":"OptimizationCriterionType.TotalTrades","summary":"Total number of trades.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationCriterionType.AverageTrade","kind":"enum value","name":"AverageTrade","type":"T:cAlgo.API.OptimizationCriterionType","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationCriterionType.AverageTrade;","python":"OptimizationCriterionType.AverageTrade","summary":"Average trade result.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationCriterionType","pythonType":"OptimizationCriterionType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCriterionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationDataSeriesParameter","kind":"record","name":"OptimizationDataSeriesParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationDataSeriesParameter : OptimizationParameter`1","python":"OptimizationDataSeriesParameter","summary":"A DataSeries cBot parameter, held fixed at a standard series type. The selector is StandardSeriesType — a live DataSeries cannot itself be an optimization input, and data series parameters cannot be optimized over multiple values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDataSeriesParameter(\"Source\", StandardSeriesType.Close);\nPrint(\"{0} uses {1} prices\", parameter.Name, parameter.Value);","python":"parameter = OptimizationDataSeriesParameter(\"Source\", StandardSeriesType.Close)\napi.Print(f\"{parameter.Name} uses {parameter.Value} prices\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDataSeriesParameter.#ctor(System.String,cAlgo.API.StandardSeriesType)","kind":"constructor","name":"OptimizationDataSeriesParameter","type":"T:cAlgo.API.OptimizationDataSeriesParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDataSeriesParameter(string name, StandardSeriesType value)","python":"OptimizationDataSeriesParameter(name: str, value: StandardSeriesType)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDataSeriesParameter(\"Source\", StandardSeriesType.Typical);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationDataSeriesParameter(\"Source\", StandardSeriesType.Typical)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDataSeriesParameter.#ctor(cAlgo.API.OptimizationDataSeriesParameter)","kind":"constructor","name":"OptimizationDataSeriesParameter","type":"T:cAlgo.API.OptimizationDataSeriesParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDataSeriesParameter(OptimizationDataSeriesParameter original)","python":"OptimizationDataSeriesParameter(original: OptimizationDataSeriesParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationDataSeriesParameter","pythonType":"OptimizationDataSeriesParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDataSeriesParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationDateOnlyParameter","kind":"record","name":"OptimizationDateOnlyParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationDateOnlyParameter : OptimizationParameter`1","python":"OptimizationDateOnlyParameter","summary":"A DateOnly cBot parameter, optimized over a date range or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));\nPrint(\"{0}: {1} to {2} by {3}\", parameter.Name, parameter.Min, parameter.Max, parameter.Step);","python":"from System import DateOnly, TimeSpan\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))\napi.Print(f\"{parameter.Name}: {parameter.Min} to {parameter.Max} by {parameter.Step}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateOnlyParameter.#ctor(System.String,System.DateOnly,System.DateOnly,System.TimeSpan)","kind":"constructor","name":"OptimizationDateOnlyParameter","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateOnlyParameter(string name, DateOnly min, DateOnly max, TimeSpan step)","python":"OptimizationDateOnlyParameter(name: str, min: DateOnly, max: DateOnly, step: TimeSpan)","summary":"Optimizes the parameter over the range the minimum to the maximum by the step.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"min","csharpType":"DateOnly","pythonType":"DateOnly","summary":"The inclusive minimum of the range."},{"name":"max","csharpType":"DateOnly","pythonType":"DateOnly","summary":"The inclusive maximum of the range."},{"name":"step","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The step of the range, as a time span."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(14));\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import DateOnly, TimeSpan\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(14))\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateOnlyParameter.#ctor(System.String,System.DateOnly)","kind":"constructor","name":"OptimizationDateOnlyParameter","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateOnlyParameter(string name, DateOnly value)","python":"OptimizationDateOnlyParameter(name: str, value: DateOnly)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"DateOnly","pythonType":"DateOnly","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 2, 3));\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"from System import DateOnly\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 2, 3))\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateOnlyParameter.#ctor(cAlgo.API.OptimizationDateOnlyParameter)","kind":"constructor","name":"OptimizationDateOnlyParameter","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateOnlyParameter(OptimizationDateOnlyParameter original)","python":"OptimizationDateOnlyParameter(original: OptimizationDateOnlyParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationDateOnlyParameter","pythonType":"OptimizationDateOnlyParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateOnlyParameter.Max","kind":"property","name":"Max","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateOnly Max {get;}","python":"optimizationDateOnlyParameter.Max: DateOnly","summary":"Gets the inclusive maximum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"DateOnly","pythonType":"DateOnly","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));\nPrint(\"Range ends at {0}\", parameter.Max);","python":"from System import DateOnly, TimeSpan\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))\napi.Print(f\"Range ends at {parameter.Max}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Max/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Max/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateOnlyParameter.Min","kind":"property","name":"Min","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateOnly Min {get;}","python":"optimizationDateOnlyParameter.Min: DateOnly","summary":"Gets the inclusive minimum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"DateOnly","pythonType":"DateOnly","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));\nPrint(\"Range starts at {0}\", parameter.Min);","python":"from System import DateOnly, TimeSpan\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))\napi.Print(f\"Range starts at {parameter.Min}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Min/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Min/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateOnlyParameter.Step","kind":"property","name":"Step","type":"T:cAlgo.API.OptimizationDateOnlyParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public TimeSpan Step {get;}","python":"optimizationDateOnlyParameter.Step: TimeSpan","summary":"Gets the step of the range, as a time span.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateOnlyParameter(\"TradingStartDate\", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));\nPrint(\"Range step: {0} days\", parameter.Step.TotalDays);","python":"from System import DateOnly, TimeSpan\nparameter = OptimizationDateOnlyParameter(\"TradingStartDate\", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))\napi.Print(f\"Range step: {parameter.Step.TotalDays} days\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateOnlyParameter/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationDateTimeParameter","kind":"record","name":"OptimizationDateTimeParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationDateTimeParameter : OptimizationParameter`1","python":"OptimizationDateTimeParameter","summary":"A DateTime cBot parameter, optimized over a date-time range or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));\nPrint(\"{0}: {1} to {2} by {3}\", parameter.Name, parameter.Min, parameter.Max, parameter.Step);","python":"from System import DateTime, TimeSpan\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))\napi.Print(f\"{parameter.Name}: {parameter.Min} to {parameter.Max} by {parameter.Step}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateTimeParameter.#ctor(System.String,System.DateTime,System.DateTime,System.TimeSpan)","kind":"constructor","name":"OptimizationDateTimeParameter","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateTimeParameter(string name, DateTime min, DateTime max, TimeSpan step)","python":"OptimizationDateTimeParameter(name: str, min: DateTime, max: DateTime, step: TimeSpan)","summary":"Optimizes the parameter over the range the minimum to the maximum by the step.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"min","csharpType":"DateTime","pythonType":"DateTime","summary":"The inclusive minimum of the range."},{"name":"max","csharpType":"DateTime","pythonType":"DateTime","summary":"The inclusive maximum of the range."},{"name":"step","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The step of the range, as a time span."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromMinutes(30));\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import DateTime, TimeSpan\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromMinutes(30))\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateTimeParameter.#ctor(System.String,System.DateTime)","kind":"constructor","name":"OptimizationDateTimeParameter","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateTimeParameter(string name, DateTime value)","python":"OptimizationDateTimeParameter(name: str, value: DateTime)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"DateTime","pythonType":"DateTime","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 8, 0, 0));\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"from System import DateTime\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 8, 0, 0))\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDateTimeParameter.#ctor(cAlgo.API.OptimizationDateTimeParameter)","kind":"constructor","name":"OptimizationDateTimeParameter","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDateTimeParameter(OptimizationDateTimeParameter original)","python":"OptimizationDateTimeParameter(original: OptimizationDateTimeParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationDateTimeParameter","pythonType":"OptimizationDateTimeParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateTimeParameter.Max","kind":"property","name":"Max","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateTime Max {get;}","python":"optimizationDateTimeParameter.Max: DateTime","summary":"Gets the inclusive maximum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));\nPrint(\"Range ends at {0}\", parameter.Max);","python":"from System import DateTime, TimeSpan\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))\napi.Print(f\"Range ends at {parameter.Max}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Max/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Max/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateTimeParameter.Min","kind":"property","name":"Min","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateTime Min {get;}","python":"optimizationDateTimeParameter.Min: DateTime","summary":"Gets the inclusive minimum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));\nPrint(\"Range starts at {0}\", parameter.Min);","python":"from System import DateTime, TimeSpan\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))\napi.Print(f\"Range starts at {parameter.Min}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Min/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Min/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDateTimeParameter.Step","kind":"property","name":"Step","type":"T:cAlgo.API.OptimizationDateTimeParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public TimeSpan Step {get;}","python":"optimizationDateTimeParameter.Step: TimeSpan","summary":"Gets the step of the range, as a time span.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDateTimeParameter(\"SessionStart\", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));\nPrint(\"Range step: {0} hours\", parameter.Step.TotalHours);","python":"from System import DateTime, TimeSpan\nparameter = OptimizationDateTimeParameter(\"SessionStart\", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))\napi.Print(f\"Range step: {parameter.Step.TotalHours} hours\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDateTimeParameter/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationDoubleParameter","kind":"record","name":"OptimizationDoubleParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationDoubleParameter : OptimizationParameter`1","python":"OptimizationDoubleParameter","summary":"A double cBot parameter, optimized over a numeric range or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var takeProfit = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nvar stopLoss = new OptimizationDoubleParameter(\"StopLossPips\", 20);\nPrint(\"{0}: {1} to {2} by {3}, {4} fixed at {5}\", takeProfit.Name, takeProfit.Min, takeProfit.Max, takeProfit.Step, stopLoss.Name, stopLoss.Value);","python":"takeProfit = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\nstopLoss = OptimizationDoubleParameter(\"StopLossPips\", 20.0)\napi.Print(f\"{takeProfit.Name}: {takeProfit.Min} to {takeProfit.Max} by {takeProfit.Step}, {stopLoss.Name} fixed at {stopLoss.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDoubleParameter.#ctor(System.String,System.Double,System.Double,System.Double)","kind":"constructor","name":"OptimizationDoubleParameter","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDoubleParameter(string name, double min, double max, double step)","python":"OptimizationDoubleParameter(name: str, min: float, max: float, step: float)","summary":"Optimizes the parameter over the range the minimum to the maximum by the step.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"min","csharpType":"double","pythonType":"float","summary":"The inclusive minimum of the range."},{"name":"max","csharpType":"double","pythonType":"float","summary":"The inclusive maximum of the range."},{"name":"step","csharpType":"double","pythonType":"float","summary":"The step of the range."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDoubleParameter.#ctor(System.String,System.Double)","kind":"constructor","name":"OptimizationDoubleParameter","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDoubleParameter(string name, double value)","python":"OptimizationDoubleParameter(name: str, value: float)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"double","pythonType":"float","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDoubleParameter(\"StopLossPips\", 20);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationDoubleParameter(\"StopLossPips\", 20.0)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationDoubleParameter.#ctor(cAlgo.API.OptimizationDoubleParameter)","kind":"constructor","name":"OptimizationDoubleParameter","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationDoubleParameter(OptimizationDoubleParameter original)","python":"OptimizationDoubleParameter(original: OptimizationDoubleParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationDoubleParameter","pythonType":"OptimizationDoubleParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDoubleParameter.Max","kind":"property","name":"Max","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Max {get;}","python":"optimizationDoubleParameter.Max: float","summary":"Gets the inclusive maximum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nPrint(\"Range maximum: {0}\", parameter.Max);","python":"parameter = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\napi.Print(f\"Range maximum: {parameter.Max}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Max/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Max/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDoubleParameter.Min","kind":"property","name":"Min","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Min {get;}","python":"optimizationDoubleParameter.Min: float","summary":"Gets the inclusive minimum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nPrint(\"Range minimum: {0}\", parameter.Min);","python":"parameter = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\napi.Print(f\"Range minimum: {parameter.Min}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Min/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Min/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationDoubleParameter.Step","kind":"property","name":"Step","type":"T:cAlgo.API.OptimizationDoubleParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Step {get;}","python":"optimizationDoubleParameter.Step: float","summary":"Gets the step of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nvar valueCount = (int)((parameter.Max - parameter.Min) / parameter.Step) + 1;\nPrint(\"Step {0} gives {1} values\", parameter.Step, valueCount);","python":"parameter = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\nvalueCount = int((parameter.Max - parameter.Min) / parameter.Step) + 1\napi.Print(f\"Step {parameter.Step} gives {valueCount} values\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationDoubleParameter/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationEnumParameter","kind":"record","name":"OptimizationEnumParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationEnumParameter : OptimizationParameter`1","python":"OptimizationEnumParameter","summary":"An enum cBot parameter, optimized over a set of members or held fixed. The CLR enum type is resolved from the cBot metadata, so members are supplied by their string names.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var optimized = new OptimizationEnumParameter(\"MAType\", new[] { \"Simple\", \"Exponential\", \"Weighted\" });\nvar fixedValue = new OptimizationEnumParameter(\"Source\", \"Close\");\nPrint(\"{0} values: {1}, {2} fixed at {3}\", optimized.Name, optimized.Values.Count, fixedValue.Name, fixedValue.Value);","python":"optimized = OptimizationEnumParameter(\"MAType\", [\"Simple\", \"Exponential\", \"Weighted\"])\nfixedValue = OptimizationEnumParameter(\"Source\", \"Close\")\napi.Print(f\"{optimized.Name} values: {optimized.Values.Count}, {fixedValue.Name} fixed at {fixedValue.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationEnumParameter.#ctor(System.String,System.Collections.Generic.IEnumerable{System.String})","kind":"constructor","name":"OptimizationEnumParameter","type":"T:cAlgo.API.OptimizationEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationEnumParameter(string name, IEnumerable<string> values)","python":"OptimizationEnumParameter(name: str, values: Iterable[str])","summary":"Optimizes over the enum members named by the given values.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"values","csharpType":"IEnumerable<string>","pythonType":"Iterable[str]","summary":"The discrete set of enum member names to optimize over."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationEnumParameter(\"MAType\", new[] { \"Simple\", \"Exponential\" });\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationEnumParameter(\"MAType\", [\"Simple\", \"Exponential\"])\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationEnumParameter.#ctor(System.String,System.String)","kind":"constructor","name":"OptimizationEnumParameter","type":"T:cAlgo.API.OptimizationEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationEnumParameter(string name, string value)","python":"OptimizationEnumParameter(name: str, value: str)","summary":"Holds the parameter fixed at the enum member named by the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"string","pythonType":"str","summary":"The fixed enum member name."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationEnumParameter(\"MAType\", \"Exponential\");\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationEnumParameter(\"MAType\", \"Exponential\")\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationEnumParameter.#ctor(cAlgo.API.OptimizationEnumParameter)","kind":"constructor","name":"OptimizationEnumParameter","type":"T:cAlgo.API.OptimizationEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationEnumParameter(OptimizationEnumParameter original)","python":"OptimizationEnumParameter(original: OptimizationEnumParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationEnumParameter","pythonType":"OptimizationEnumParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationEnumParameter.Values","kind":"property","name":"Values","type":"T:cAlgo.API.OptimizationEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public IReadOnlyList<string> Values {get;}","python":"optimizationEnumParameter.Values: Sequence[str]","summary":"Gets the discrete set of enum member names to optimize over.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<string>","pythonType":"Sequence[str]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationEnumParameter(\"MAType\", new[] { \"Simple\", \"Exponential\", \"Weighted\" });\nPrint(\"{0} candidates: {1}\", parameter.Name, string.Join(\", \", parameter.Values));","python":"parameter = OptimizationEnumParameter(\"MAType\", [\"Simple\", \"Exponential\", \"Weighted\"])\napi.Print(f\"{parameter.Name} candidates: {', '.join(parameter.Values)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Values/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationEnumParameter/Values/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationError","kind":"enum","name":"OptimizationError","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public enum OptimizationError","python":"OptimizationError","summary":"Describes why an optimization process failed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.Completed += OnOptimizationCompleted;\n}\n\nprivate void OnOptimizationCompleted(OptimizationCompletedEventArgs args)\n{\n    if (args.Process.OptimizationError == OptimizationError.InvalidParameters)\n        Print(\"Check that at least one parameter is optimized and its range is valid\");\n}","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    if args.Process.OptimizationError == OptimizationError.InvalidParameters:\n        api.Print(\"Check that at least one parameter is optimized and its range is valid\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.None","kind":"enum value","name":"None","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.None;","python":"OptimizationError.None","summary":"No error.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.Other","kind":"enum value","name":"Other","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.Other;","python":"OptimizationError.Other","summary":"An unspecified error occurred.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.Net4IsNotSupported","kind":"enum value","name":"Net4IsNotSupported","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.Net4IsNotSupported;","python":"OptimizationError.Net4IsNotSupported","summary":"Optimization is not supported on .NET Framework 4.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.NoConnection","kind":"enum value","name":"NoConnection","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.NoConnection;","python":"OptimizationError.NoConnection","summary":"No connection to the server.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.NoHistoricalData","kind":"enum value","name":"NoHistoricalData","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.NoHistoricalData;","python":"OptimizationError.NoHistoricalData","summary":"No historical data is available for the requested period.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.NotSupported","kind":"enum value","name":"NotSupported","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.NotSupported;","python":"OptimizationError.NotSupported","summary":"Optimization is not supported in the current environment.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.InvalidSettings","kind":"enum value","name":"InvalidSettings","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.InvalidSettings;","python":"OptimizationError.InvalidSettings","summary":"The optimization settings are invalid.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationError.InvalidParameters","kind":"enum value","name":"InvalidParameters","type":"T:cAlgo.API.OptimizationError","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError.InvalidParameters;","python":"OptimizationError.InvalidParameters","summary":"No parameter was marked for optimization, or a parameter's range or values are invalid.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationFileParameter","kind":"record","name":"OptimizationFileParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationFileParameter : OptimizationParameter`1","python":"OptimizationFileParameter","summary":"A File cBot parameter (a file path). Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationFileParameter(\"SignalsFile\", @\"C:\\Data\\signals.csv\");\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationFileParameter(\"SignalsFile\", r\"C:\\Data\\signals.csv\")\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationFileParameter.#ctor(System.String,System.String)","kind":"constructor","name":"OptimizationFileParameter","type":"T:cAlgo.API.OptimizationFileParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationFileParameter(string name, string value)","python":"OptimizationFileParameter(name: str, value: str)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"string","pythonType":"str","summary":"The fixed file path."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationFileParameter(\"SignalsFile\", @\"C:\\Data\\signals.csv\");\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationFileParameter(\"SignalsFile\", r\"C:\\Data\\signals.csv\")\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationFileParameter.#ctor(cAlgo.API.OptimizationFileParameter)","kind":"constructor","name":"OptimizationFileParameter","type":"T:cAlgo.API.OptimizationFileParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationFileParameter(OptimizationFileParameter original)","python":"OptimizationFileParameter(original: OptimizationFileParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationFileParameter","pythonType":"OptimizationFileParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationFileParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationIntegerParameter","kind":"record","name":"OptimizationIntegerParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationIntegerParameter : OptimizationParameter`1","python":"OptimizationIntegerParameter","summary":"An int cBot parameter, optimized over an integer range or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var slowPeriods = new OptimizationIntegerParameter(\"SlowPeriods\", min: 20, max: 100, step: 10);\nvar fastPeriods = new OptimizationIntegerParameter(\"FastPeriods\", 9);\nPrint(\"{0}: {1} to {2} by {3}, {4} fixed at {5}\", slowPeriods.Name, slowPeriods.Min, slowPeriods.Max, slowPeriods.Step, fastPeriods.Name, fastPeriods.Value);","python":"slowPeriods = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\nfastPeriods = OptimizationIntegerParameter(\"FastPeriods\", 9)\napi.Print(f\"{slowPeriods.Name}: {slowPeriods.Min} to {slowPeriods.Max} by {slowPeriods.Step}, {fastPeriods.Name} fixed at {fastPeriods.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationIntegerParameter.#ctor(System.String,System.Int32,System.Int32,System.Int32)","kind":"constructor","name":"OptimizationIntegerParameter","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationIntegerParameter(string name, int min, int max, int step)","python":"OptimizationIntegerParameter(name: str, min: int, max: int, step: int)","summary":"Optimizes the parameter over the range the minimum to the maximum by the step.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"min","csharpType":"int","pythonType":"int","summary":"The inclusive minimum of the range."},{"name":"max","csharpType":"int","pythonType":"int","summary":"The inclusive maximum of the range."},{"name":"step","csharpType":"int","pythonType":"int","summary":"The step of the range."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10);\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationIntegerParameter.#ctor(System.String,System.Int32)","kind":"constructor","name":"OptimizationIntegerParameter","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationIntegerParameter(string name, int value)","python":"OptimizationIntegerParameter(name: str, value: int)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"int","pythonType":"int","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationIntegerParameter(\"FastPeriods\", 9);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationIntegerParameter(\"FastPeriods\", 9)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationIntegerParameter.#ctor(cAlgo.API.OptimizationIntegerParameter)","kind":"constructor","name":"OptimizationIntegerParameter","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationIntegerParameter(OptimizationIntegerParameter original)","python":"OptimizationIntegerParameter(original: OptimizationIntegerParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationIntegerParameter","pythonType":"OptimizationIntegerParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationIntegerParameter.Max","kind":"property","name":"Max","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public int Max {get;}","python":"optimizationIntegerParameter.Max: int","summary":"Gets the inclusive maximum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10);\nPrint(\"Range maximum: {0}\", parameter.Max);","python":"parameter = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\napi.Print(f\"Range maximum: {parameter.Max}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Max/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Max/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationIntegerParameter.Min","kind":"property","name":"Min","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public int Min {get;}","python":"optimizationIntegerParameter.Min: int","summary":"Gets the inclusive minimum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10);\nPrint(\"Range minimum: {0}\", parameter.Min);","python":"parameter = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\napi.Print(f\"Range minimum: {parameter.Min}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Min/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Min/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationIntegerParameter.Step","kind":"property","name":"Step","type":"T:cAlgo.API.OptimizationIntegerParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public int Step {get;}","python":"optimizationIntegerParameter.Step: int","summary":"Gets the step of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10);\nPrint(\"Passes for this parameter: {0}\", (parameter.Max - parameter.Min) / parameter.Step + 1);","python":"parameter = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\napi.Print(f\"Passes for this parameter: {int((parameter.Max - parameter.Min) / parameter.Step) + 1}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationMethod","kind":"enum","name":"OptimizationMethod","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public enum OptimizationMethod","python":"OptimizationMethod","summary":"Specifies the method used to explore the parameter space during optimization.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria) { Method = OptimizationMethod.Grid };\nPrint(\"Optimization method: {0}\", settings.Method);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nsettings.Method = OptimizationMethod.Grid\napi.Print(f\"Optimization method: {settings.Method}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationMethod.Genetic","kind":"enum value","name":"Genetic","type":"T:cAlgo.API.OptimizationMethod","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationMethod.Genetic;","python":"OptimizationMethod.Genetic","summary":"Genetic algorithm — explores a subset of parameter combinations heuristically.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationMethod","pythonType":"OptimizationMethod","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"F:cAlgo.API.OptimizationMethod.Grid","kind":"enum value","name":"Grid","type":"T:cAlgo.API.OptimizationMethod","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationMethod.Grid;","python":"OptimizationMethod.Grid","summary":"Grid search — exhaustively evaluates every parameter combination.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationMethod","pythonType":"OptimizationMethod","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationMultiEnumParameter","kind":"record","name":"OptimizationMultiEnumParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationMultiEnumParameter : OptimizationParameter`1","python":"OptimizationMultiEnumParameter","summary":"An Enum[] (multi-enum) cBot parameter. Not optimizable; always held fixed. Members are supplied by their string names.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiEnumParameter(\"TradingDays\", new[] { \"Monday\", \"Wednesday\", \"Friday\" });\nPrint(\"{0} is fixed at {1}\", parameter.Name, string.Join(\", \", parameter.Value));","python":"from System import Array, String\nparameter = OptimizationMultiEnumParameter(\"TradingDays\", Array[String]([\"Monday\", \"Wednesday\", \"Friday\"]))\napi.Print(f\"{parameter.Name} is fixed at {', '.join(parameter.Value)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiEnumParameter.#ctor(System.String,System.Collections.Generic.IReadOnlyList{System.String})","kind":"constructor","name":"OptimizationMultiEnumParameter","type":"T:cAlgo.API.OptimizationMultiEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiEnumParameter(string name, IReadOnlyList<string> value)","python":"OptimizationMultiEnumParameter(name: str, value: Sequence[str])","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"IReadOnlyList<string>","pythonType":"Sequence[str]","summary":"The fixed set of enum member names."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiEnumParameter(\"TradingDays\", new[] { \"Tuesday\", \"Thursday\" });\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import Array, String\nparameter = OptimizationMultiEnumParameter(\"TradingDays\", Array[String]([\"Tuesday\", \"Thursday\"]))\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiEnumParameter.#ctor(cAlgo.API.OptimizationMultiEnumParameter)","kind":"constructor","name":"OptimizationMultiEnumParameter","type":"T:cAlgo.API.OptimizationMultiEnumParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiEnumParameter(OptimizationMultiEnumParameter original)","python":"OptimizationMultiEnumParameter(original: OptimizationMultiEnumParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationMultiEnumParameter","pythonType":"OptimizationMultiEnumParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiEnumParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationMultiFileParameter","kind":"record","name":"OptimizationMultiFileParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationMultiFileParameter : OptimizationParameter`1","python":"OptimizationMultiFileParameter","summary":"A MultiFile (a set of file paths) cBot parameter. Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiFileParameter(\"DataFiles\", new[] { @\"C:\\Data\\eurusd.csv\", @\"C:\\Data\\gbpusd.csv\" });\nPrint(\"{0} holds {1} files\", parameter.Name, parameter.Value.Count);","python":"from System import Array, String\nparameter = OptimizationMultiFileParameter(\"DataFiles\", Array[String]([r\"C:\\Data\\eurusd.csv\", r\"C:\\Data\\gbpusd.csv\"]))\napi.Print(f\"{parameter.Name} holds {parameter.Value.Count} files\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiFileParameter.#ctor(System.String,System.Collections.Generic.IReadOnlyList{System.String})","kind":"constructor","name":"OptimizationMultiFileParameter","type":"T:cAlgo.API.OptimizationMultiFileParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiFileParameter(string name, IReadOnlyList<string> value)","python":"OptimizationMultiFileParameter(name: str, value: Sequence[str])","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"IReadOnlyList<string>","pythonType":"Sequence[str]","summary":"The fixed set of file paths."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiFileParameter(\"DataFiles\", new[] { @\"C:\\Data\\signals.csv\" });\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import Array, String\nparameter = OptimizationMultiFileParameter(\"DataFiles\", Array[String]([r\"C:\\Data\\signals.csv\"]))\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiFileParameter.#ctor(cAlgo.API.OptimizationMultiFileParameter)","kind":"constructor","name":"OptimizationMultiFileParameter","type":"T:cAlgo.API.OptimizationMultiFileParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiFileParameter(OptimizationMultiFileParameter original)","python":"OptimizationMultiFileParameter(original: OptimizationMultiFileParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationMultiFileParameter","pythonType":"OptimizationMultiFileParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiFileParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationMultiSymbolParameter","kind":"record","name":"OptimizationMultiSymbolParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationMultiSymbolParameter : OptimizationParameter`1","python":"OptimizationMultiSymbolParameter","summary":"A Symbol[] (multi-symbol) cBot parameter. Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiSymbolParameter(\"Basket\", Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\"));\nPrint(\"{0} holds {1} symbols\", parameter.Name, parameter.Value.Count);","python":"parameter = OptimizationMultiSymbolParameter(\"Basket\", api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\"))\napi.Print(f\"{parameter.Name} holds {parameter.Value.Count} symbols\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiSymbolParameter.#ctor(System.String,System.Collections.Generic.IReadOnlyList{cAlgo.API.Internals.Symbol})","kind":"constructor","name":"OptimizationMultiSymbolParameter","type":"T:cAlgo.API.OptimizationMultiSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiSymbolParameter(string name, IReadOnlyList<Symbol> value)","python":"OptimizationMultiSymbolParameter(name: str, value: Sequence[Symbol])","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"IReadOnlyList<Symbol>","pythonType":"Sequence[Symbol]","summary":"The fixed set of symbols."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiSymbolParameter(\"Basket\", Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"));\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationMultiSymbolParameter(\"Basket\", api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"))\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiSymbolParameter.#ctor(cAlgo.API.OptimizationMultiSymbolParameter)","kind":"constructor","name":"OptimizationMultiSymbolParameter","type":"T:cAlgo.API.OptimizationMultiSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiSymbolParameter(OptimizationMultiSymbolParameter original)","python":"OptimizationMultiSymbolParameter(original: OptimizationMultiSymbolParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationMultiSymbolParameter","pythonType":"OptimizationMultiSymbolParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiSymbolParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationMultiTimeFrameParameter","kind":"record","name":"OptimizationMultiTimeFrameParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationMultiTimeFrameParameter : OptimizationParameter`1","python":"OptimizationMultiTimeFrameParameter","summary":"A TimeFrame[] (multi-time-frame) cBot parameter. Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiTimeFrameParameter(\"TrendTimeFrames\", new[] { TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily });\nPrint(\"{0} holds {1} time frames\", parameter.Name, parameter.Value.Count);","python":"from System import Array\nparameter = OptimizationMultiTimeFrameParameter(\"TrendTimeFrames\", Array[TimeFrame]([TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily]))\napi.Print(f\"{parameter.Name} holds {parameter.Value.Count} time frames\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiTimeFrameParameter.#ctor(System.String,System.Collections.Generic.IReadOnlyList{cAlgo.API.TimeFrame})","kind":"constructor","name":"OptimizationMultiTimeFrameParameter","type":"T:cAlgo.API.OptimizationMultiTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiTimeFrameParameter(string name, IReadOnlyList<TimeFrame> value)","python":"OptimizationMultiTimeFrameParameter(name: str, value: Sequence[TimeFrame])","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"IReadOnlyList<TimeFrame>","pythonType":"Sequence[TimeFrame]","summary":"The fixed set of time frames."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationMultiTimeFrameParameter(\"TrendTimeFrames\", new[] { TimeFrame.Hour4, TimeFrame.Daily });\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import Array\nparameter = OptimizationMultiTimeFrameParameter(\"TrendTimeFrames\", Array[TimeFrame]([TimeFrame.Hour4, TimeFrame.Daily]))\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationMultiTimeFrameParameter.#ctor(cAlgo.API.OptimizationMultiTimeFrameParameter)","kind":"constructor","name":"OptimizationMultiTimeFrameParameter","type":"T:cAlgo.API.OptimizationMultiTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMultiTimeFrameParameter(OptimizationMultiTimeFrameParameter original)","python":"OptimizationMultiTimeFrameParameter(original: OptimizationMultiTimeFrameParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationMultiTimeFrameParameter","pythonType":"OptimizationMultiTimeFrameParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationMultiTimeFrameParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationParameter","kind":"record","name":"OptimizationParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public abstract class OptimizationParameter","python":"OptimizationParameter","summary":"Base type for a cBot parameter's optimization configuration. One derived record exists for each AlgoParameterType.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameters = new OptimizationParameter[]\n{\n    new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10),\n    new OptimizationBooleanParameter(\"UseTrailingStop\", false)\n};\nforeach (var parameter in parameters)\n    Print(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameters = [OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10), OptimizationBooleanParameter(\"UseTrailingStop\", False)]\nfor parameter in parameters:\n    api.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationParameter.IsOptimized","kind":"property","name":"IsOptimized","type":"T:cAlgo.API.OptimizationParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public bool IsOptimized {get;}","python":"optimizationParameter.IsOptimized: bool","summary":"Gets a value indicating whether the parameter is included in the sweep. When false, the parameter is held fixed at its value.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"OptimizationParameter optimized = new OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10);\nOptimizationParameter fixedValue = new OptimizationIntegerParameter(\"FastPeriods\", 9);\nPrint(\"{0}: {1}, {2}: {3}\", optimized.Name, optimized.IsOptimized, fixedValue.Name, fixedValue.IsOptimized);","python":"optimized = OptimizationIntegerParameter(\"SlowPeriods\", 20, 100, 10)\nfixedValue = OptimizationIntegerParameter(\"FastPeriods\", 9)\napi.Print(f\"{optimized.Name}: {optimized.IsOptimized}, {fixedValue.Name}: {fixedValue.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/IsOptimized/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/IsOptimized/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationParameter.Name","kind":"property","name":"Name","type":"T:cAlgo.API.OptimizationParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public string Name {get;}","python":"optimizationParameter.Name: str","summary":"Gets the cBot parameter name (must match its property name).","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"OptimizationParameter parameter = new OptimizationDoubleParameter(\"TakeProfitPips\", 10, 50, 5);\nPrint(\"Parameter name: {0}\", parameter.Name);","python":"parameter = OptimizationDoubleParameter(\"TakeProfitPips\", 10.0, 50.0, 5.0)\napi.Print(f\"Parameter name: {parameter.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationParameter`1","kind":"record","name":"OptimizationParameter<T>","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public abstract class OptimizationParameter<T> : OptimizationParameter","python":"OptimizationParameter-API","summary":"Base type for a typed optimization parameter that carries a scalar value (used when the parameter is held fixed).","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"OptimizationParameter<int> parameter = new OptimizationIntegerParameter(\"FastPeriods\", 9);\nPrint(\"{0} fixed value: {1}\", parameter.Name, parameter.Value);","python":"# Not available in Python: generic type arguments, use the concrete parameter types\nparameter = OptimizationIntegerParameter(\"FastPeriods\", 9)\napi.Print(f\"{parameter.Name} fixed value: {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter-API/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter-API/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationParameter`1.Value","kind":"property","name":"Value","type":"T:cAlgo.API.OptimizationParameter`1","namespace":"cAlgo.API","group":"Optimization","csharp":"public T Value {get;}","python":"optimizationParameter.Value: T","summary":"Gets the scalar value used when the parameter is held fixed.","remarks":null,"parameters":[],"returns":{"csharpType":"T","pythonType":"T","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeFrameParameter(\"SignalTimeFrame\", TimeFrame.Hour4);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationTimeFrameParameter(\"SignalTimeFrame\", TimeFrame.Hour4)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter-API/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter-API/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationPass","kind":"interface","name":"OptimizationPass","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public interface OptimizationPass","python":"OptimizationPass","summary":"Represents a single completed optimization pass and its key statistics.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.PassCompleted += args => PrintPass(args.Pass);\n}\n\nprivate void PrintPass(OptimizationPass pass)\n{\n    Print(\"Pass {0} ({1}): net profit {2}, profit factor {3}, max DD {4}%, trades {5}\",\n        pass.Id, pass.TimeFrame, pass.NetProfit, pass.ProfitFactor, pass.MaxEquityDrawdownPercentages, pass.TotalTrades);\n}","python":"def on_start(self):\n    api.Optimization.PassCompleted += lambda args: self.print_pass(args.Pass)\n\ndef print_pass(self, optimizationPass):\n    api.Print(f\"Pass {optimizationPass.Id} ({optimizationPass.TimeFrame}): net profit {optimizationPass.NetProfit}, profit factor {optimizationPass.ProfitFactor}, max DD {optimizationPass.MaxEquityDrawdownPercentages}%, trades {optimizationPass.TotalTrades}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.Fitness","kind":"property","name":"Fitness","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"double Fitness {get;}","python":"optimizationPass.Fitness: float","summary":"Gets the fitness value of the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} fitness: {1}\", args.Pass.Id, args.Pass.Fitness);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} fitness: {args.Pass.Fitness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/Fitness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/Fitness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.Id","kind":"property","name":"Id","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"int Id {get;}","python":"optimizationPass.Id: int","summary":"Gets the pass id.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} completed\", args.Pass.Id);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} completed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.JsonReport","kind":"property","name":"JsonReport","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"string JsonReport {get;}","python":"optimizationPass.JsonReport: str","summary":"Gets the full per-pass backtest result as JSON.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} report length: {1}\", args.Pass.Id, args.Pass.JsonReport?.Length);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} report: {args.Pass.JsonReport}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/JsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/JsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.MaxEquityDrawdownPercentages","kind":"property","name":"MaxEquityDrawdownPercentages","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"double MaxEquityDrawdownPercentages {get;}","python":"optimizationPass.MaxEquityDrawdownPercentages: float","summary":"Gets the maximum equity drawdown of the pass, as a percentage.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} max equity drawdown: {1}%\", args.Pass.Id, args.Pass.MaxEquityDrawdownPercentages);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} max equity drawdown: {args.Pass.MaxEquityDrawdownPercentages}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/MaxEquityDrawdownPercentages/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/MaxEquityDrawdownPercentages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.NetProfit","kind":"property","name":"NetProfit","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"double NetProfit {get;}","python":"optimizationPass.NetProfit: float","summary":"Gets the net profit of the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} net profit: {1}\", args.Pass.Id, args.Pass.NetProfit);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} net profit: {args.Pass.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/NetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/NetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.ParameterValues","kind":"property","name":"ParameterValues","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"IReadOnlyDictionary<string, string> ParameterValues {get;}","python":"optimizationPass.ParameterValues: dict[str, str]","summary":"Gets the exact parameter values this pass used, keyed by parameter name.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyDictionary<string, string>","pythonType":"dict[str, str]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args =>\n{\n    foreach (var parameter in args.Pass.ParameterValues)\n        Print(\"Pass {0}: {1} = {2}\", args.Pass.Id, parameter.Key, parameter.Value);\n};","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    for parameter in args.Pass.ParameterValues:\n        api.Print(f\"Pass {args.Pass.Id}: {parameter.Key} = {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/ParameterValues/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/ParameterValues/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.ProfitFactor","kind":"property","name":"ProfitFactor","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"double ProfitFactor {get;}","python":"optimizationPass.ProfitFactor: float","summary":"Gets the profit factor of the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args =>\n{\n    if (args.Pass.ProfitFactor > 1.5)\n        Print(\"Pass {0} has a good profit factor: {1}\", args.Pass.Id, args.Pass.ProfitFactor);\n};","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    if args.Pass.ProfitFactor > 1.5:\n        api.Print(f\"Pass {args.Pass.Id} has a good profit factor: {args.Pass.ProfitFactor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/ProfitFactor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/ProfitFactor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"TimeFrame TimeFrame {get;}","python":"optimizationPass.TimeFrame: TimeFrame","summary":"Gets the time frame of the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} ran on {1}\", args.Pass.Id, args.Pass.TimeFrame);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} ran on {args.Pass.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPass.TotalTrades","kind":"property","name":"TotalTrades","type":"T:cAlgo.API.OptimizationPass","namespace":"cAlgo.API","group":"Optimization","csharp":"int TotalTrades {get;}","python":"optimizationPass.TotalTrades: int","summary":"Gets the total number of trades in the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args => Print(\"Pass {0} trades: {1}\", args.Pass.Id, args.Pass.TotalTrades);","python":"api.Optimization.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id} trades: {args.Pass.TotalTrades}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/TotalTrades/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPass/TotalTrades/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationPassCompletedEventArgs","kind":"record","name":"OptimizationPassCompletedEventArgs","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationPassCompletedEventArgs","python":"OptimizationPassCompletedEventArgs","summary":"Provides data for the optimization pass completed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.PassCompleted += OnPassCompleted;\n}\n\nprivate void OnPassCompleted(OptimizationPassCompletedEventArgs args)\n{\n    Print(\"Pass {0} done, {1} passes completed so far\", args.Pass.Id, args.Process.Passes.Count);\n}","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    api.Print(f\"Pass {args.Pass.Id} done, {args.Process.Passes.Count} passes completed so far\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationPassCompletedEventArgs.#ctor(cAlgo.API.OptimizationPassCompletedEventArgs)","kind":"constructor","name":"OptimizationPassCompletedEventArgs","type":"T:cAlgo.API.OptimizationPassCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationPassCompletedEventArgs(OptimizationPassCompletedEventArgs original)","python":"OptimizationPassCompletedEventArgs(original: OptimizationPassCompletedEventArgs)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationPassCompletedEventArgs","pythonType":"OptimizationPassCompletedEventArgs","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPassCompletedEventArgs.Pass","kind":"property","name":"Pass","type":"T:cAlgo.API.OptimizationPassCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationPass Pass {get;}","python":"optimizationPassCompletedEventArgs.Pass: OptimizationPass","summary":"Gets the pass that completed.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationPass","pythonType":"OptimizationPass","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.PassCompleted += OnPassCompleted;\n}\n\nprivate void OnPassCompleted(OptimizationPassCompletedEventArgs args)\n{\n    var pass = args.Pass;\n    Print(\"Pass {0}: fitness {1}, profit factor {2}\", pass.Id, pass.Fitness, pass.ProfitFactor);\n}","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    optimizationPass = args.Pass\n    api.Print(f\"Pass {optimizationPass.Id}: fitness {optimizationPass.Fitness}, profit factor {optimizationPass.ProfitFactor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Pass/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Pass/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationPassCompletedEventArgs.Process","kind":"property","name":"Process","type":"T:cAlgo.API.OptimizationPassCompletedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationProcess Process {get;}","python":"optimizationPassCompletedEventArgs.Process: OptimizationProcess","summary":"Gets the optimization process that produced the pass.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationProcess","pythonType":"OptimizationProcess","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.PassCompleted += OnPassCompleted;\n}\n\nprivate void OnPassCompleted(OptimizationPassCompletedEventArgs args)\n{\n    if (args.Pass.NetProfit < 0 && args.Process.Passes.Count > 100)\n        args.Process.Terminate();\n}","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    if args.Pass.NetProfit < 0 and args.Process.Passes.Count > 100:\n        args.Process.Terminate()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Process/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationPassCompletedEventArgs/Process/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationProcess","kind":"interface","name":"OptimizationProcess","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public interface OptimizationProcess","python":"OptimizationProcess","summary":"Represents an optimization process with methods and properties to monitor its status and results.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria);\nvar process = Optimization.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.ProgressChanged += args => Print(\"Progress: {0:F1}%\", args.Progress);\nprocess.Completed += args => Print(\"Completed with {0} passes, error: {1}\", process.Passes.Count, process.OptimizationError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.ProgressChanged += lambda args: api.Print(f\"Progress: {args.Progress:.1f}%\")\nprocess.Completed += lambda args: api.Print(f\"Completed with {args.Process.Passes.Count} passes, error: {args.Process.OptimizationError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationProcess.Terminate","kind":"method","name":"Terminate","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"void Terminate()","python":"optimizationProcess.Terminate() -> None","summary":"Terminates the optimization process.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args =>\n{\n    if (args.Process.Passes.Count >= 200)\n    {\n        Print(\"Pass limit reached, terminating optimization\");\n        args.Process.Terminate();\n    }\n};","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    if args.Process.Passes.Count >= 200:\n        api.Print(\"Pass limit reached, terminating optimization\")\n        args.Process.Terminate()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Terminate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Terminate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProcess.BestPass","kind":"property","name":"BestPass","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationPass BestPass {get;}","python":"optimizationProcess.BestPass: OptimizationPass","summary":"Gets the best pass by the configured criteria or custom fitness, or null if no pass has completed.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationPass","pythonType":"OptimizationPass","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.PassCompleted += args =>\n{\n    var bestPass = args.Process.BestPass;\n    if (bestPass != null)\n        Print(\"Current best pass: {0}, fitness {1}\", bestPass.Id, bestPass.Fitness);\n};","python":"def on_start(self):\n    api.Optimization.PassCompleted += self.on_pass_completed\n\ndef on_pass_completed(self, args):\n    bestPass = args.Process.BestPass\n    if bestPass is not None:\n        api.Print(f\"Current best pass: {bestPass.Id}, fitness {bestPass.Fitness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/BestPass/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/BestPass/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProcess.IsCompleted","kind":"property","name":"IsCompleted","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"bool IsCompleted {get;}","python":"optimizationProcess.IsCompleted: bool","summary":"Gets a value indicating whether the optimization process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.ProgressChanged += args =>\n{\n    if (!args.Process.IsCompleted)\n        Print(\"Optimization is still running: {0:F1}%\", args.Progress);\n};","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_progress_changed\n\ndef on_progress_changed(self, args):\n    if not args.Process.IsCompleted:\n        api.Print(f\"Optimization is still running: {args.Progress:.1f}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/IsCompleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/IsCompleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProcess.JsonReport","kind":"property","name":"JsonReport","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"string JsonReport {get;}","python":"optimizationProcess.JsonReport: str","summary":"Gets the optimization result as JSON (the .optres content): configuration plus every pass with its statistics. Returns null if the optimization is not finished or an error occurred. The format matches the desktop optimization \"Save results\", so the JSON can be opened or imported by the desktop optimization UI.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.Completed += args =>\n{\n    var report = args.Process.JsonReport;\n    if (report != null)\n        LocalStorage.SetString(\"OptimizationResult\", report);\n};","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    report = args.Process.JsonReport\n    if report is not None:\n        api.LocalStorage.SetString(\"OptimizationResult\", report)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/JsonReport/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/JsonReport/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProcess.OptimizationError","kind":"property","name":"OptimizationError","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"OptimizationError OptimizationError {get;}","python":"optimizationProcess.OptimizationError: OptimizationError","summary":"Gets the error information if the optimization process failed.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationError","pythonType":"OptimizationError","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.Completed += args =>\n{\n    if (args.Process.OptimizationError != OptimizationError.None)\n        Print(\"Optimization failed: {0}\", args.Process.OptimizationError);\n};","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    # None is a Python keyword, so the enum value is read with getattr\n    if args.Process.OptimizationError != getattr(OptimizationError, \"None\"):\n        api.Print(f\"Optimization failed: {args.Process.OptimizationError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/OptimizationError/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/OptimizationError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProcess.Passes","kind":"property","name":"Passes","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"IReadOnlyList<OptimizationPass> Passes {get;}","python":"optimizationProcess.Passes: Sequence[OptimizationPass]","summary":"Gets the passes completed so far, ordered by pass id. While running this grows as passes finish; on completion it holds every pass.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<OptimizationPass>","pythonType":"Sequence[OptimizationPass]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"Optimization.Completed += args =>\n{\n    var profitablePasses = args.Process.Passes.Count(pass => pass.NetProfit > 0);\n    Print(\"{0} of {1} passes were profitable\", profitablePasses, args.Process.Passes.Count);\n};","python":"def on_start(self):\n    api.Optimization.Completed += self.on_optimization_completed\n\ndef on_optimization_completed(self, args):\n    profitablePasses = len([p for p in args.Process.Passes if p.NetProfit > 0])\n    api.Print(f\"{profitablePasses} of {args.Process.Passes.Count} passes were profitable\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Passes/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Passes/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.OptimizationProcess.Completed","kind":"event","name":"Completed","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationCompletedEventArgs> Completed;","python":"optimizationProcess.Completed += handler  # handler(obj: OptimizationCompletedEventArgs)","summary":"Occurs when the optimization process is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationCompletedEventArgs>","pythonType":"Callable[[OptimizationCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria);\nvar process = Optimization.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.Completed += args => Print(\"Optimization completed, best pass: {0}\", args.BestPass?.Id);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.Completed += lambda args: api.Print(f\"Optimization completed, passes: {args.Process.Passes.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Completed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/Completed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.OptimizationProcess.PassCompleted","kind":"event","name":"PassCompleted","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationPassCompletedEventArgs> PassCompleted;","python":"optimizationProcess.PassCompleted += handler  # handler(obj: OptimizationPassCompletedEventArgs)","summary":"Occurs when an individual optimization pass completes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationPassCompletedEventArgs>","pythonType":"Callable[[OptimizationPassCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria);\nvar process = Optimization.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.PassCompleted += args => Print(\"Pass {0}: net profit {1}\", args.Pass.Id, args.Pass.NetProfit);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.PassCompleted += lambda args: api.Print(f\"Pass {args.Pass.Id}: net profit {args.Pass.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/PassCompleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/PassCompleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.OptimizationProcess.ProgressChanged","kind":"event","name":"ProgressChanged","type":"T:cAlgo.API.OptimizationProcess","namespace":"cAlgo.API","group":"Optimization","csharp":"event Action<OptimizationProgressChangedEventArgs> ProgressChanged;","python":"optimizationProcess.ProgressChanged += handler  # handler(obj: OptimizationProgressChangedEventArgs)","summary":"Occurs when the optimization progress changes.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<OptimizationProgressChangedEventArgs>","pythonType":"Callable[[OptimizationProgressChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 10000, criteria);\nvar process = Optimization.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings, new OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5));\nprocess.ProgressChanged += args => Print(\"{0}: {1:F1}%\", args.Operation, args.Progress);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 10000, criteria)\nprocess = api.Optimization.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings, OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\nprocess.ProgressChanged += lambda args: api.Print(f\"{args.Operation}: {args.Progress:.1f}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/ProgressChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProcess/ProgressChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationProgressChangedEventArgs","kind":"record","name":"OptimizationProgressChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationProgressChangedEventArgs","python":"OptimizationProgressChangedEventArgs","summary":"Provides data for the optimization progress changed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.ProgressChanged += OnProgressChanged;\n}\n\nprivate void OnProgressChanged(OptimizationProgressChangedEventArgs args)\n{\n    Print(\"{0}: {1:F1}%, completed: {2}\", args.Operation, args.Progress, args.Process.IsCompleted);\n}","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_progress_changed\n\ndef on_progress_changed(self, args):\n    api.Print(f\"{args.Operation}: {args.Progress:.1f}%, completed: {args.Process.IsCompleted}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationProgressChangedEventArgs.#ctor(cAlgo.API.OptimizationProgressChangedEventArgs)","kind":"constructor","name":"OptimizationProgressChangedEventArgs","type":"T:cAlgo.API.OptimizationProgressChangedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationProgressChangedEventArgs(OptimizationProgressChangedEventArgs original)","python":"OptimizationProgressChangedEventArgs(original: OptimizationProgressChangedEventArgs)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationProgressChangedEventArgs","pythonType":"OptimizationProgressChangedEventArgs","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProgressChangedEventArgs.Operation","kind":"property","name":"Operation","type":"T:cAlgo.API.OptimizationProgressChangedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public string Operation {get;}","python":"optimizationProgressChangedEventArgs.Operation: str","summary":"Gets the description of the current operation.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.ProgressChanged += OnProgressChanged;\n}\n\nprivate void OnProgressChanged(OptimizationProgressChangedEventArgs args)\n{\n    Print(\"Current optimization operation: {0}\", args.Operation);\n}","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_progress_changed\n\ndef on_progress_changed(self, args):\n    api.Print(f\"Current optimization operation: {args.Operation}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Operation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Operation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProgressChangedEventArgs.Process","kind":"property","name":"Process","type":"T:cAlgo.API.OptimizationProgressChangedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationProcess Process {get;}","python":"optimizationProgressChangedEventArgs.Process: OptimizationProcess","summary":"Gets the optimization process that reported progress.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationProcess","pythonType":"OptimizationProcess","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.ProgressChanged += OnProgressChanged;\n}\n\nprivate void OnProgressChanged(OptimizationProgressChangedEventArgs args)\n{\n    Print(\"Passes completed: {0}\", args.Process.Passes.Count);\n}","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_progress_changed\n\ndef on_progress_changed(self, args):\n    api.Print(f\"Passes completed: {args.Process.Passes.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Process/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Process/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationProgressChangedEventArgs.Progress","kind":"property","name":"Progress","type":"T:cAlgo.API.OptimizationProgressChangedEventArgs","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Progress {get;}","python":"optimizationProgressChangedEventArgs.Progress: float","summary":"Gets the progress percentage of the current operation.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Optimization.ProgressChanged += OnProgressChanged;\n}\n\nprivate void OnProgressChanged(OptimizationProgressChangedEventArgs args)\n{\n    Print(\"Optimization progress: {0:F1}%\", args.Progress);\n}","python":"def on_start(self):\n    api.Optimization.ProgressChanged += self.on_progress_changed\n\ndef on_progress_changed(self, args):\n    api.Print(f\"Optimization progress: {args.Progress:.1f}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Progress/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationProgressChangedEventArgs/Progress/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationSettings","kind":"record","name":"OptimizationSettings","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationSettings","python":"OptimizationSettings","summary":"Represents settings for configuring an optimization process.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria)\n{\n    DataMode = BacktestingDataMode.M1,\n    Method = OptimizationMethod.Genetic,\n    SpreadPips = 1,\n    Cores = 4,\n    AutoSelectBest = true\n};\nPrint(\"Optimizing {0} to {1} with {2} cores\", settings.StartTimeUtc, settings.EndTimeUtc, settings.Cores);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.DataMode = BacktestingDataMode.M1\nsettings.Method = OptimizationMethod.Genetic\nsettings.SpreadPips = 1\nsettings.Cores = 4\nsettings.AutoSelectBest = True\napi.Print(f\"Optimizing {settings.StartTimeUtc} to {settings.EndTimeUtc} with {settings.Cores} cores\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationSettings.#ctor(System.DateTime,System.DateTime,System.Double,System.Collections.Generic.IEnumerable{cAlgo.API.OptimizationCriterion})","kind":"constructor","name":"OptimizationSettings","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationSettings(DateTime startTimeUtc, DateTime endTimeUtc, double balance, IEnumerable<OptimizationCriterion> criteria)","python":"OptimizationSettings(startTimeUtc: DateTime, endTimeUtc: DateTime, balance: float, criteria: Iterable[OptimizationCriterion])","summary":"Initializes a new instance of the OptimizationSettings record.","remarks":null,"parameters":[{"name":"startTimeUtc","csharpType":"DateTime","pythonType":"DateTime","summary":"The start time in UTC for the optimization period."},{"name":"endTimeUtc","csharpType":"DateTime","pythonType":"DateTime","summary":"The end time in UTC for the optimization period."},{"name":"balance","csharpType":"double","pythonType":"float","summary":"The initial balance for each pass."},{"name":"criteria","csharpType":"IEnumerable<OptimizationCriterion>","pythonType":"Iterable[OptimizationCriterion]","summary":"The standard optimization criteria. When OptimizationSettings.UseCustomFitness is true the criteria are ignored in favor of the cBot's custom GetFitness ."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[]\n{\n    new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize),\n    new OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize)\n};\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria);","python":"from System import DateTime\ncriteria = [\n    OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize),\n    OptimizationCriterion(OptimizationCriterionType.MaxEquityDrawdownPercentages, OptimizationCriterionDirection.Minimize)\n]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationSettings.#ctor(cAlgo.API.OptimizationSettings)","kind":"constructor","name":"OptimizationSettings","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationSettings(OptimizationSettings original)","python":"OptimizationSettings(original: OptimizationSettings)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationSettings","pythonType":"OptimizationSettings","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.ApplyCommissionAutomatically","kind":"property","name":"ApplyCommissionAutomatically","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public bool ApplyCommissionAutomatically {get; set;}","python":"optimizationSettings.ApplyCommissionAutomatically: bool","summary":"Gets a value that indicates whether the commission type and value of the optimized symbol are applied automatically. When it is set to true the Commission and CommissionType properties are ignored. The default value is false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { ApplyCommissionAutomatically = true };\nPrint(\"Use symbol commission: {0}\", settings.ApplyCommissionAutomatically);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.ApplyCommissionAutomatically = True\napi.Print(f\"Use symbol commission: {settings.ApplyCommissionAutomatically}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/ApplyCommissionAutomatically/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/ApplyCommissionAutomatically/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.AutoSelectBest","kind":"property","name":"AutoSelectBest","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public bool AutoSelectBest {get; set;}","python":"optimizationSettings.AutoSelectBest: bool","summary":"Gets a value indicating whether the best pass is auto-selected on completion.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { AutoSelectBest = true };\nPrint(\"Auto select best pass: {0}\", settings.AutoSelectBest);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.AutoSelectBest = True\napi.Print(f\"Auto select best pass: {settings.AutoSelectBest}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/AutoSelectBest/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/AutoSelectBest/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.Balance","kind":"property","name":"Balance","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Balance {get;}","python":"optimizationSettings.Balance: float","summary":"Gets the initial balance for each pass.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 50000, criteria);\nPrint(\"Initial balance of each pass: {0}\", settings.Balance);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 50000, criteria)\napi.Print(f\"Initial balance of each pass: {settings.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Balance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Balance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.Commission","kind":"property","name":"Commission","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public double Commission {get; set;}","python":"optimizationSettings.Commission: float","summary":"Gets the commission value, it is interpreted based on the CommissionType property value. It is ignored when ApplyCommissionAutomatically is set to true. The default value is 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria)\n{\n    Commission = 30,\n    CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\n};\nPrint(\"Commission: {0}\", settings.Commission);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.Commission = 30\nsettings.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume\napi.Print(f\"Commission: {settings.Commission}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Commission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Commission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.CommissionType","kind":"property","name":"CommissionType","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public SymbolCommissionType CommissionType {get; set;}","python":"optimizationSettings.CommissionType: SymbolCommissionType","summary":"Gets the commission type that defines how the Commission property value is interpreted. It is ignored when ApplyCommissionAutomatically is set to true. The default value is SymbolCommissionType.UsdPerMillionUsdVolume.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria)\n{\n    Commission = 3.5,\n    CommissionType = SymbolCommissionType.UsdPerOneLot\n};\nPrint(\"Commission type: {0}\", settings.CommissionType);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.Commission = 3.5\nsettings.CommissionType = SymbolCommissionType.UsdPerOneLot\napi.Print(f\"Commission type: {settings.CommissionType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/CommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/CommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.Cores","kind":"property","name":"Cores","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public int Cores {get; set;}","python":"optimizationSettings.Cores: int","summary":"Gets the number of CPU cores used to run passes in parallel. Must be greater than or equal to 1. Zero will use the platform default which is ProcessorCount / 2 + 1.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { Cores = Environment.ProcessorCount / 2 };\nPrint(\"Optimization cores: {0}\", settings.Cores);","python":"from System import DateTime, Environment\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.Cores = int(Environment.ProcessorCount / 2)\napi.Print(f\"Optimization cores: {settings.Cores}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Cores/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Cores/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.Criteria","kind":"property","name":"Criteria","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public IReadOnlyList<OptimizationCriterion> Criteria {get;}","python":"optimizationSettings.Criteria: Sequence[OptimizationCriterion]","summary":"Gets the standard optimization criteria. Ignored when OptimizationSettings.UseCustomFitness is true.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<OptimizationCriterion>","pythonType":"Sequence[OptimizationCriterion]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.ProfitFactor, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria);\nforeach (var criterion in settings.Criteria)\n    Print(\"Criterion: {0} {1}\", criterion.Direction, criterion.Type);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.ProfitFactor, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nfor criterion in settings.Criteria:\n    api.Print(f\"Criterion: {criterion.Direction} {criterion.Type}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Criteria/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Criteria/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.DataFile","kind":"property","name":"DataFile","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public string DataFile {get; set;}","python":"optimizationSettings.DataFile: str","summary":"Gets the path to the data file used for the optimization.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria)\n{\n    DataMode = BacktestingDataMode.M1Csv,\n    DataFile = @\"C:\\Data\\EURUSD_M1.csv\"\n};\nPrint(\"Optimization data file: {0}\", settings.DataFile);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.DataMode = BacktestingDataMode.M1Csv\nsettings.DataFile = r\"C:\\Data\\EURUSD_M1.csv\"\napi.Print(f\"Optimization data file: {settings.DataFile}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/DataFile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/DataFile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.DataMode","kind":"property","name":"DataMode","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public BacktestingDataMode DataMode {get; set;}","python":"optimizationSettings.DataMode: BacktestingDataMode","summary":"Gets the data mode used for the optimization.","remarks":null,"parameters":[],"returns":{"csharpType":"BacktestingDataMode","pythonType":"BacktestingDataMode","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { DataMode = BacktestingDataMode.OpenPrices };\nPrint(\"Optimization data mode: {0}\", settings.DataMode);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.DataMode = BacktestingDataMode.OpenPrices\napi.Print(f\"Optimization data mode: {settings.DataMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/DataMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/DataMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.EndTimeUtc","kind":"property","name":"EndTimeUtc","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateTime EndTimeUtc {get;}","python":"optimizationSettings.EndTimeUtc: DateTime","summary":"Gets the end time in UTC for the optimization period.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(Server.TimeInUtc.AddMonths(-6), Server.TimeInUtc, 10000, criteria);\nPrint(\"Optimization ends at {0:u}\", settings.EndTimeUtc);","python":"criteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(api.Server.TimeInUtc.AddMonths(-6), api.Server.TimeInUtc, 10000, criteria)\napi.Print(f\"Optimization ends at {settings.EndTimeUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/EndTimeUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/EndTimeUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.Method","kind":"property","name":"Method","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationMethod Method {get; set;}","python":"optimizationSettings.Method: OptimizationMethod","summary":"Gets the optimization method. Defaults to OptimizationMethod.Genetic.","remarks":null,"parameters":[],"returns":{"csharpType":"OptimizationMethod","pythonType":"OptimizationMethod","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { Method = OptimizationMethod.Grid };\nPrint(\"Optimization method: {0}\", settings.Method);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.Method = OptimizationMethod.Grid\napi.Print(f\"Optimization method: {settings.Method}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Method/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/Method/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.PreciseConversion","kind":"property","name":"PreciseConversion","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public bool PreciseConversion {get; set;}","python":"optimizationSettings.PreciseConversion: bool","summary":"Gets a value indicating whether historical data for additional symbols is downloaded to convert profit and margin into the account deposit currency precisely. When true, real historical exchange rates of the additional symbols are used; when false, the default, approximated rates are used. Enabling it can increase the run time and the amount of downloaded data.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.10","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { PreciseConversion = true };\nPrint(\"Precise conversion: {0}\", settings.PreciseConversion);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.PreciseConversion = True\napi.Print(f\"Precise conversion: {settings.PreciseConversion}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/PreciseConversion/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/PreciseConversion/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.SpreadPips","kind":"property","name":"SpreadPips","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public double SpreadPips {get; set;}","python":"optimizationSettings.SpreadPips: float","summary":"Gets the spread in pips.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, criteria) { SpreadPips = 1.5 };\nPrint(\"Optimization spread: {0} pips\", settings.SpreadPips);","python":"from System import DateTime\ncriteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, criteria)\nsettings.SpreadPips = 1.5\napi.Print(f\"Optimization spread: {settings.SpreadPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/SpreadPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/SpreadPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.StartTimeUtc","kind":"property","name":"StartTimeUtc","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public DateTime StartTimeUtc {get;}","python":"optimizationSettings.StartTimeUtc: DateTime","summary":"Gets the start time in UTC for the optimization period.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var criteria = new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) };\nvar settings = new OptimizationSettings(Server.TimeInUtc.AddMonths(-6), Server.TimeInUtc, 10000, criteria);\nPrint(\"Optimization starts at {0:u}\", settings.StartTimeUtc);","python":"criteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\nsettings = OptimizationSettings(api.Server.TimeInUtc.AddMonths(-6), api.Server.TimeInUtc, 10000, criteria)\napi.Print(f\"Optimization starts at {settings.StartTimeUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/StartTimeUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/StartTimeUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.UseCustomFitness","kind":"property","name":"UseCustomFitness","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public bool UseCustomFitness {get; set;}","python":"optimizationSettings.UseCustomFitness: bool","summary":"Gets a value indicating whether to use the cBot's custom GetFitness instead of OptimizationSettings.Criteria.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var settings = new OptimizationSettings(new DateTime(2025, 1, 1), new DateTime(2025, 3, 1), 10000, Array.Empty<OptimizationCriterion>())\n{\n    UseCustomFitness = true\n};\nPrint(\"Use cBot GetFitness: {0}\", settings.UseCustomFitness);","python":"from System import DateTime\nsettings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 3, 1), 10000, [])\nsettings.UseCustomFitness = True\napi.Print(f\"Use cBot GetFitness: {settings.UseCustomFitness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/UseCustomFitness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/UseCustomFitness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSettings.CommissionUsdPerMillionUsd","kind":"property","name":"CommissionUsdPerMillionUsd","type":"T:cAlgo.API.OptimizationSettings","namespace":"cAlgo.API","group":"Optimization","csharp":"public double CommissionUsdPerMillionUsd {get; set;}","python":"optimizationSettings.CommissionUsdPerMillionUsd: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":"Use Commission with CommissionType instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationStringParameter","kind":"record","name":"OptimizationStringParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationStringParameter : OptimizationParameter`1","python":"OptimizationStringParameter","summary":"A string cBot parameter. Not optimizable; always held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationStringParameter(\"Label\", \"Optimization\");\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationStringParameter(\"Label\", \"Optimization\")\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationStringParameter.#ctor(System.String,System.String)","kind":"constructor","name":"OptimizationStringParameter","type":"T:cAlgo.API.OptimizationStringParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationStringParameter(string name, string value)","python":"OptimizationStringParameter(name: str, value: str)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"string","pythonType":"str","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationStringParameter(\"Comment\", \"Optimized by my plugin\");\nPrint(\"{0} optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationStringParameter(\"Comment\", \"Optimized by my plugin\")\napi.Print(f\"{parameter.Name} optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationStringParameter.#ctor(cAlgo.API.OptimizationStringParameter)","kind":"constructor","name":"OptimizationStringParameter","type":"T:cAlgo.API.OptimizationStringParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationStringParameter(OptimizationStringParameter original)","python":"OptimizationStringParameter(original: OptimizationStringParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationStringParameter","pythonType":"OptimizationStringParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationStringParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationSymbolParameter","kind":"record","name":"OptimizationSymbolParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationSymbolParameter : OptimizationParameter`1","python":"OptimizationSymbolParameter","summary":"A Symbol cBot parameter, optimized over a set of symbols or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var optimized = new OptimizationSymbolParameter(\"HedgeSymbol\", Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\"));\nvar fixedValue = new OptimizationSymbolParameter(\"BaseSymbol\", Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"{0} candidates: {1}, {2} fixed at {3}\", optimized.Name, optimized.Values.Count, fixedValue.Name, fixedValue.Value.Name);","python":"optimized = OptimizationSymbolParameter(\"HedgeSymbol\", api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\"))\nfixedValue = OptimizationSymbolParameter(\"BaseSymbol\", api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"{optimized.Name} candidates: {optimized.Values.Count}, {fixedValue.Name} fixed at {fixedValue.Value.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationSymbolParameter.#ctor(System.String,System.Collections.Generic.IEnumerable{cAlgo.API.Internals.Symbol})","kind":"constructor","name":"OptimizationSymbolParameter","type":"T:cAlgo.API.OptimizationSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationSymbolParameter(string name, IEnumerable<Symbol> values)","python":"OptimizationSymbolParameter(name: str, values: Iterable[Symbol])","summary":"Optimizes the parameter over the given values.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"values","csharpType":"IEnumerable<Symbol>","pythonType":"Iterable[Symbol]","summary":"The discrete set of symbols to optimize over."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationSymbolParameter(\"HedgeSymbol\", Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"));\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationSymbolParameter(\"HedgeSymbol\", api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"))\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationSymbolParameter.#ctor(System.String,cAlgo.API.Internals.Symbol)","kind":"constructor","name":"OptimizationSymbolParameter","type":"T:cAlgo.API.OptimizationSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationSymbolParameter(string name, Symbol value)","python":"OptimizationSymbolParameter(name: str, value: Symbol)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"Symbol","pythonType":"Symbol","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationSymbolParameter(\"BaseSymbol\", Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value.Name);","python":"parameter = OptimizationSymbolParameter(\"BaseSymbol\", api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationSymbolParameter.#ctor(cAlgo.API.OptimizationSymbolParameter)","kind":"constructor","name":"OptimizationSymbolParameter","type":"T:cAlgo.API.OptimizationSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationSymbolParameter(OptimizationSymbolParameter original)","python":"OptimizationSymbolParameter(original: OptimizationSymbolParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationSymbolParameter","pythonType":"OptimizationSymbolParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationSymbolParameter.Values","kind":"property","name":"Values","type":"T:cAlgo.API.OptimizationSymbolParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public IReadOnlyList<Symbol> Values {get;}","python":"optimizationSymbolParameter.Values: Sequence[Symbol]","summary":"Gets the discrete set of symbols to optimize over.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<Symbol>","pythonType":"Sequence[Symbol]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationSymbolParameter(\"HedgeSymbol\", Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"));\nforeach (var symbol in parameter.Values)\n    Print(\"Candidate symbol: {0}\", symbol.Name);","python":"parameter = OptimizationSymbolParameter(\"HedgeSymbol\", api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\"))\nfor symbol in parameter.Values:\n    api.Print(f\"Candidate symbol: {symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Values/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationSymbolParameter/Values/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationTimeFrameParameter","kind":"record","name":"OptimizationTimeFrameParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationTimeFrameParameter : OptimizationParameter`1","python":"OptimizationTimeFrameParameter","summary":"A TimeFrame cBot parameter, optimized over a set of time frames or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var optimized = new OptimizationTimeFrameParameter(\"SignalTimeFrame\", new[] { TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily });\nvar fixedValue = new OptimizationTimeFrameParameter(\"TrendTimeFrame\", TimeFrame.Weekly);\nPrint(\"{0} candidates: {1}, {2} fixed at {3}\", optimized.Name, optimized.Values.Count, fixedValue.Name, fixedValue.Value);","python":"optimized = OptimizationTimeFrameParameter(\"SignalTimeFrame\", [TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily])\nfixedValue = OptimizationTimeFrameParameter(\"TrendTimeFrame\", TimeFrame.Weekly)\napi.Print(f\"{optimized.Name} candidates: {optimized.Values.Count}, {fixedValue.Name} fixed at {fixedValue.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeFrameParameter.#ctor(System.String,System.Collections.Generic.IEnumerable{cAlgo.API.TimeFrame})","kind":"constructor","name":"OptimizationTimeFrameParameter","type":"T:cAlgo.API.OptimizationTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeFrameParameter(string name, IEnumerable<TimeFrame> values)","python":"OptimizationTimeFrameParameter(name: str, values: Iterable[TimeFrame])","summary":"Optimizes the parameter over the given values.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"values","csharpType":"IEnumerable<TimeFrame>","pythonType":"Iterable[TimeFrame]","summary":"The discrete set of time frames to optimize over."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeFrameParameter(\"SignalTimeFrame\", new[] { TimeFrame.Minute15, TimeFrame.Hour });\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"parameter = OptimizationTimeFrameParameter(\"SignalTimeFrame\", [TimeFrame.Minute15, TimeFrame.Hour])\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeFrameParameter.#ctor(System.String,cAlgo.API.TimeFrame)","kind":"constructor","name":"OptimizationTimeFrameParameter","type":"T:cAlgo.API.OptimizationTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeFrameParameter(string name, TimeFrame value)","python":"OptimizationTimeFrameParameter(name: str, value: TimeFrame)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeFrameParameter(\"TrendTimeFrame\", TimeFrame.Daily);\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"parameter = OptimizationTimeFrameParameter(\"TrendTimeFrame\", TimeFrame.Daily)\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeFrameParameter.#ctor(cAlgo.API.OptimizationTimeFrameParameter)","kind":"constructor","name":"OptimizationTimeFrameParameter","type":"T:cAlgo.API.OptimizationTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeFrameParameter(OptimizationTimeFrameParameter original)","python":"OptimizationTimeFrameParameter(original: OptimizationTimeFrameParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationTimeFrameParameter","pythonType":"OptimizationTimeFrameParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationTimeFrameParameter.Values","kind":"property","name":"Values","type":"T:cAlgo.API.OptimizationTimeFrameParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public IReadOnlyList<TimeFrame> Values {get;}","python":"optimizationTimeFrameParameter.Values: Sequence[TimeFrame]","summary":"Gets the discrete set of time frames to optimize over.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlyList<TimeFrame>","pythonType":"Sequence[TimeFrame]","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeFrameParameter(\"SignalTimeFrame\", new[] { TimeFrame.Hour, TimeFrame.Hour4 });\nforeach (var timeFrame in parameter.Values)\n    Print(\"Candidate time frame: {0}\", timeFrame);","python":"parameter = OptimizationTimeFrameParameter(\"SignalTimeFrame\", [TimeFrame.Hour, TimeFrame.Hour4])\nfor timeFrame in parameter.Values:\n    api.Print(f\"Candidate time frame: {timeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Values/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeFrameParameter/Values/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OptimizationTimeSpanParameter","kind":"record","name":"OptimizationTimeSpanParameter","type":null,"namespace":"cAlgo.API","group":"Optimization","csharp":"public class OptimizationTimeSpanParameter : OptimizationParameter`1","python":"OptimizationTimeSpanParameter","summary":"A TimeSpan cBot parameter, optimized over a range or held fixed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var maxHoldTime = new OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));\nvar cooldown = new OptimizationTimeSpanParameter(\"Cooldown\", TimeSpan.FromMinutes(30));\nPrint(\"{0}: {1} to {2} by {3}, {4} fixed at {5}\", maxHoldTime.Name, maxHoldTime.Min, maxHoldTime.Max, maxHoldTime.Step, cooldown.Name, cooldown.Value);","python":"from System import TimeSpan\nmaxHoldTime = OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))\ncooldown = OptimizationTimeSpanParameter(\"Cooldown\", TimeSpan.FromMinutes(30))\napi.Print(f\"{maxHoldTime.Name}: {maxHoldTime.Min} to {maxHoldTime.Max} by {maxHoldTime.Step}, {cooldown.Name} fixed at {cooldown.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeSpanParameter.#ctor(System.String,System.TimeSpan,System.TimeSpan,System.TimeSpan)","kind":"constructor","name":"OptimizationTimeSpanParameter","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeSpanParameter(string name, TimeSpan min, TimeSpan max, TimeSpan step)","python":"OptimizationTimeSpanParameter(name: str, min: TimeSpan, max: TimeSpan, step: TimeSpan)","summary":"Optimizes the parameter over the range the minimum to the maximum by the step.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"min","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The inclusive minimum of the range."},{"name":"max","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The inclusive maximum of the range."},{"name":"step","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The step of the range."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));\nPrint(\"{0} is optimized: {1}\", parameter.Name, parameter.IsOptimized);","python":"from System import TimeSpan\nparameter = OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))\napi.Print(f\"{parameter.Name} is optimized: {parameter.IsOptimized}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeSpanParameter.#ctor(System.String,System.TimeSpan)","kind":"constructor","name":"OptimizationTimeSpanParameter","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeSpanParameter(string name, TimeSpan value)","python":"OptimizationTimeSpanParameter(name: str, value: TimeSpan)","summary":"Holds the parameter fixed at the given value.","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The cBot parameter name."},{"name":"value","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The fixed value."}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeSpanParameter(\"Cooldown\", TimeSpan.FromMinutes(30));\nPrint(\"{0} is fixed at {1}\", parameter.Name, parameter.Value);","python":"from System import TimeSpan\nparameter = OptimizationTimeSpanParameter(\"Cooldown\", TimeSpan.FromMinutes(30))\napi.Print(f\"{parameter.Name} is fixed at {parameter.Value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.OptimizationTimeSpanParameter.#ctor(cAlgo.API.OptimizationTimeSpanParameter)","kind":"constructor","name":"OptimizationTimeSpanParameter","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public OptimizationTimeSpanParameter(OptimizationTimeSpanParameter original)","python":"OptimizationTimeSpanParameter(original: OptimizationTimeSpanParameter)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"OptimizationTimeSpanParameter","pythonType":"OptimizationTimeSpanParameter","summary":""}],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationTimeSpanParameter.Max","kind":"property","name":"Max","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public TimeSpan Max {get;}","python":"optimizationTimeSpanParameter.Max: TimeSpan","summary":"Gets the inclusive maximum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));\nPrint(\"Range maximum: {0}\", parameter.Max);","python":"from System import TimeSpan\nparameter = OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))\napi.Print(f\"Range maximum: {parameter.Max}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Max/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Max/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationTimeSpanParameter.Min","kind":"property","name":"Min","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public TimeSpan Min {get;}","python":"optimizationTimeSpanParameter.Min: TimeSpan","summary":"Gets the inclusive minimum of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));\nPrint(\"Range minimum: {0}\", parameter.Min);","python":"from System import TimeSpan\nparameter = OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))\napi.Print(f\"Range minimum: {parameter.Min}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Min/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Min/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.OptimizationTimeSpanParameter.Step","kind":"property","name":"Step","type":"T:cAlgo.API.OptimizationTimeSpanParameter","namespace":"cAlgo.API","group":"Optimization","csharp":"public TimeSpan Step {get;}","python":"optimizationTimeSpanParameter.Step: TimeSpan","summary":"Gets the step of the range.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"var parameter = new OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));\nPrint(\"Range step: {0} minutes\", parameter.Step.TotalMinutes);","python":"from System import TimeSpan\nparameter = OptimizationTimeSpanParameter(\"MaxHoldTime\", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))\napi.Print(f\"Range step: {parameter.Step.TotalMinutes} minutes\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationTimeSpanParameter/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.OrderType","kind":"enum","name":"OrderType","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public enum OrderType","python":"OrderType","summary":"Represents the different types of orders.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var newOrderDialog = new NewOrderDialog\n{\n    TradeType = TradeType.Buy,\n    OrderType = OrderType.Limit,\n    SymbolName = SymbolName,\n    Volume = Symbol.VolumeInUnitsMin * 10,\n    StopLossPips = 20,\n    TakeProfitPips = 40\n};\n\nnewOrderDialog.ShowDialog();","python":"newOrderDialog = NewOrderDialog()\nnewOrderDialog.TradeType = TradeType.Buy\nnewOrderDialog.OrderType = OrderType.Limit\nnewOrderDialog.SymbolName = api.SymbolName\nnewOrderDialog.Volume = api.Symbol.VolumeInUnitsMin * 10\nnewOrderDialog.StopLossPips = 20\nnewOrderDialog.TakeProfitPips = 40\n\nnewOrderDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OrderType.Market","kind":"enum value","name":"Market","type":"T:cAlgo.API.OrderType","namespace":"cAlgo.API","group":"Trading","csharp":"OrderType.Market;","python":"OrderType.Market","summary":"Market order.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OrderType.Limit","kind":"enum value","name":"Limit","type":"T:cAlgo.API.OrderType","namespace":"cAlgo.API","group":"Trading","csharp":"OrderType.Limit;","python":"OrderType.Limit","summary":"Limit order.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OrderType.Stop","kind":"enum value","name":"Stop","type":"T:cAlgo.API.OrderType","namespace":"cAlgo.API","group":"Trading","csharp":"OrderType.Stop;","python":"OrderType.Stop","summary":"Stop order.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OrderType.StopLimit","kind":"enum value","name":"StopLimit","type":"T:cAlgo.API.OrderType","namespace":"cAlgo.API","group":"Trading","csharp":"OrderType.StopLimit;","python":"OrderType.StopLimit","summary":"Stop limit order.","remarks":null,"parameters":[],"returns":{"csharpType":"OrderType","pythonType":"OrderType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Orientation","kind":"enum","name":"Orientation","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum Orientation","python":"Orientation","summary":"Defines the different orientations that panel layout can have.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to set stack and wrap panels orientation\n    public partial class OrientationSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                Orientation = Orientation,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n            };\n\n            stackPanel.AddChild(new TextBlock { Text = \"First TextBlock\", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });\n            stackPanel.AddChild(new TextBlock { Text = \"Second TextBlock\", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });\n            stackPanel.AddChild(new TextBlock { Text = \"Third TextBlock\", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });\n            stackPanel.AddChild(new TextBlock { Text = \"Fourth TextBlock\", FontWeight = FontWeight.ExtraBold, Margin = 5, ForegroundColor = Color.Black });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Black\n        textBlock.Margin = Thickness(5)\n        return textBlock\n\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.Orientation = api.Orientation\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n\n        stackPanel.AddChild(self.get_text_block(\"First TextBlock\"))\n        stackPanel.AddChild(self.get_text_block(\"Second TextBlock\"))\n        stackPanel.AddChild(self.get_text_block(\"Third TextBlock\"))\n        stackPanel.AddChild(self.get_text_block(\"Fourth TextBlock\"))\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Orientation\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.Orientation\",\n      \"DefaultValue\": \"Vertical\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Orientation.Horizontal","kind":"enum value","name":"Horizontal","type":"T:cAlgo.API.Orientation","namespace":"cAlgo.API","group":"Controls","csharp":"Orientation.Horizontal;","python":"Orientation.Horizontal","summary":"Elements in the panel layout should be horizontally oriented.","remarks":null,"parameters":[],"returns":{"csharpType":"Orientation","pythonType":"Orientation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Orientation.Vertical","kind":"enum value","name":"Vertical","type":"T:cAlgo.API.Orientation","namespace":"cAlgo.API","group":"Controls","csharp":"Orientation.Vertical;","python":"Orientation.Vertical","summary":"Elements in the panel layout should be vertically oriented.","remarks":null,"parameters":[],"returns":{"csharpType":"Orientation","pythonType":"Orientation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Orientation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.OscillatorMovingAverage","kind":"interface","name":"OscillatorMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface OscillatorMovingAverage","python":"OscillatorMovingAverage","summary":"The calculation of the Oscillator of a Moving Average.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private OscillatorMovingAverage _oscillatorMovingAverage;\n\nprotected override void OnStart()\n{\n    var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n    _oscillatorMovingAverage = Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple);\n}\n\nprotected override void OnBar()\n{\n    Print(\"Oscillator of a Moving Average: {0}\", _oscillatorMovingAverage.Histogram.Last(1));\n}","python":"def on_start(self):\n    rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n    self.oscillatorMovingAverage = api.Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple)\n\ndef on_bar(self):\n    api.Print(f\"Oscillator of a Moving Average: {self.oscillatorMovingAverage.Histogram.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.OscillatorMovingAverage.Histogram","kind":"property","name":"Histogram","type":"T:cAlgo.API.Indicators.OscillatorMovingAverage","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Histogram {get;}","python":"oscillatorMovingAverage.Histogram: IndicatorDataSeries","summary":"The Oscillator of a Moving Average is a technical indicator that shows the difference between an oscillator and its moving average over a given period of time.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var oscillatorMovingAverage = Indicators.OscillatorMovingAverage(Bars.ClosePrices, 14, MovingAverageType.Simple);\nif (oscillatorMovingAverage.Histogram.Last(1) > 0)\n    Print(\"Oscillator is above its moving average: {0}\", oscillatorMovingAverage.Histogram.Last(1));","python":"oscillatorMovingAverage = api.Indicators.OscillatorMovingAverage(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\nif oscillatorMovingAverage.Histogram.Last(1) > 0:\n    api.Print(f\"Oscillator is above its moving average: {oscillatorMovingAverage.Histogram.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/Histogram/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/Histogram/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.OutputAttribute","kind":"class","name":"OutputAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class OutputAttribute : Attribute","python":"OutputAttribute","summary":"This attribute is used for marking an indicator IndicatorDataSeries property as a line Output.","remarks":"Marks a IndicatorDataSeries property as output to be displayed on the chart or panel below. To make it effective please apply this attribute in front of the declaration of the IndicatorDataSeries to be displayed.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample declares the indicator outputs with the LineOutputs entry of config.json\n    public partial class OutputAttributeSample : Indicator\n    {\n        public override void Calculate(int index)\n        {\n            OpenOutput[index] = Bars.OpenPrices[index];\n            HighOutput[index] = Bars.HighPrices[index];\n            LowOutput[index] = Bars.LowPrices[index];\n            CloseOutput[index] = Bars.ClosePrices[index];\n        }\n    }\n}","python":"class OutputAttributeSample():\n    def calculate(self, index):\n        api.OpenOutput[index] = api.Bars.OpenPrices[index]\n        api.HighOutput[index] = api.Bars.HighPrices[index]\n        api.LowOutput[index] = api.Bars.LowPrices[index]\n        api.CloseOutput[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"OpenOutput\",\n      \"DisplayName\": \"Open\",\n      \"Color\": \"Red\",\n      \"Style\": \"Dots\",\n      \"PlotType\": \"Line\",\n      \"Thickness\": 2\n    },\n    {\n      \"Name\": \"HighOutput\",\n      \"DisplayName\": \"High\",\n      \"Color\": \"Blue\",\n      \"Style\": \"Solid\",\n      \"PlotType\": \"Line\",\n      \"Thickness\": 2\n    },\n    {\n      \"Name\": \"LowOutput\",\n      \"DisplayName\": \"Low\",\n      \"Color\": \"Yellow\",\n      \"Style\": \"Lines\",\n      \"PlotType\": \"Line\",\n      \"Thickness\": 2\n    },\n    {\n      \"Name\": \"CloseOutput\",\n      \"DisplayName\": \"Close\",\n      \"Color\": \"Green\",\n      \"Style\": \"DotsRare\",\n      \"PlotType\": \"Line\",\n      \"Thickness\": 2\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.OutputAttribute.#ctor(System.String)","kind":"constructor","name":"OutputAttribute","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public OutputAttribute(string lineName)","python":"OutputAttribute(lineName: str)","summary":"Initializes a new instance of the OutputAttribute and sets the name.","remarks":"The members have the following default values: PlotType = PlotType.Line; LineStyle = LineStyle.Solid; Thickness = 1f; LineColor = \"Green\"; Name = lineName;","parameters":[{"name":"lineName","csharpType":"string","pythonType":"str","summary":"The name given to the output plot"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.Description","kind":"property","name":"Description","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Description {get; set;}","python":"outputAttribute.Description: str","summary":"Gets or sets description for output that will be shown in UI.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Description\": \"Close price of each bar\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Description/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Description/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.IsColorCustomizable","kind":"property","name":"IsColorCustomizable","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsColorCustomizable {get; set;}","python":"outputAttribute.IsColorCustomizable: bool","summary":"Gets or sets if Output line color is customizable or not.","remarks":"This property is useful when you are setting color manually with code via SetLineAppearance method.","parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"DodgerBlue\",\n      \"IsColorCustomizable\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsColorCustomizable/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsColorCustomizable/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.IsLastValueVisibleInTitle","kind":"property","name":"IsLastValueVisibleInTitle","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsLastValueVisibleInTitle {get; set;}","python":"outputAttribute.IsLastValueVisibleInTitle: bool","summary":"Gets or sets if output last value should be visible or not in instance title (default: true).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"IsLastValueVisibleInTitle\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsLastValueVisibleInTitle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsLastValueVisibleInTitle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsVisible {get; set;}","python":"outputAttribute.IsVisible: bool","summary":"Gets or sets default visibility of output.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n        Debug[index] = Bars.OpenPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]\n    api.Debug[index] = api.Bars.OpenPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    },\n    {\n      \"Name\": \"Debug\",\n      \"IsVisible\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.LineColor","kind":"property","name":"LineColor","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string LineColor {get; set;}","python":"outputAttribute.LineColor: str","summary":"Gets or sets the Color of the Output property. This Color will be used when the line for this Output is plotted.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"#008000\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.LineStyle","kind":"property","name":"LineStyle","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public LineStyle LineStyle {get; set;}","python":"outputAttribute.LineStyle: LineStyle","summary":"Gets or sets the Line Style for given Output property. By default it is set to Solid","remarks":"If PlotType = PlotType.Line (default) the LineStyle can be added. Supported line styles are: Dots DotsRare DotsVeryRare Lines LinesDots Solid","parameters":[],"returns":{"csharpType":"LineStyle","pythonType":"LineStyle","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    private SimpleMovingAverage _sma;\n\n    protected override void Initialize()\n    {\n        _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n    }\n\n    public override void Calculate(int index)\n    {\n        Sma[index] = _sma.Result[index];\n    }\n}","python":"class OutputSample():\n    def initialize(self):\n        self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\n    def calculate(self, index):\n        api.Sma[index] = self.sma.Result[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Sma\",\n      \"DisplayName\": \"Simple Moving Average\",\n      \"Style\": \"Lines\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineStyle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/LineStyle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.Name","kind":"property","name":"Name","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Name {get;}","python":"outputAttribute.Name: str","summary":"The plot name","remarks":"Displayed in the User Interface when adding an new instance of the Indicator.","parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        TypicalPrice[index] = (Bars.HighPrices[index] + Bars.LowPrices[index] + Bars.ClosePrices[index]) / 3;\n    }\n}","python":"def calculate(self, index):\n    api.TypicalPrice[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index] + api.Bars.ClosePrices[index]) / 3","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"TypicalPrice\",\n      \"DisplayName\": \"Typical Price\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.PlotType","kind":"property","name":"PlotType","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public PlotType PlotType {get; set;}","python":"outputAttribute.PlotType: PlotType","summary":"Plot type.","remarks":"The type of the output plotted on the output panel. Default = Line Supported types are: Line Points Histogram","parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Body[index] = Bars.ClosePrices[index] - Bars.OpenPrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Body[index] = api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Body\",\n      \"Color\": \"Yellow\",\n      \"PlotType\": \"Histogram\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.Thickness","kind":"property","name":"Thickness","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public float Thickness {get; set;}","python":"outputAttribute.Thickness: float","summary":"Sets the Width of the Output property.","remarks":"This Width will be used when the line for this Output is plotted.","parameters":[],"returns":{"csharpType":"float","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class OutputSample : Indicator\n{\n    public override void Calculate(int index)\n    {\n        Result[index] = Bars.ClosePrices[index];\n    }\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"AccessRights\": \"None\",\n  \"IsOverlay\": true,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Thickness\": 3\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.Color","kind":"property","name":"Color","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public Colors Color {get; set;}","python":"outputAttribute.Color: Colors","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"Colors","pythonType":"Colors","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use LineColor instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.OutputAttribute.IsHistogram","kind":"property","name":"IsHistogram","type":"T:cAlgo.API.OutputAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsHistogram {get; set;}","python":"outputAttribute.IsHistogram: bool","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use PlotType instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/OutputAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.OwnerType","kind":"enum","name":"OwnerType","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum OwnerType","python":"OwnerType","summary":"The types of owners for windows","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Application owned\", Width = 300, Height = 200, OwnerType = OwnerType.Application };\nwindow.Show();\nPrint(\"Window owner: {0}\", window.OwnerType);","python":"window = Window()\nwindow.Title = \"Application owned\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.OwnerType = OwnerType.Application\nwindow.Show()\napi.Print(f\"Window owner: {window.OwnerType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OwnerType.None","kind":"enum value","name":"None","type":"T:cAlgo.API.OwnerType","namespace":"cAlgo.API","group":"Windows","csharp":"OwnerType.None;","python":"OwnerType.None","summary":"The default owner type, which means the window has no owner","remarks":null,"parameters":[],"returns":{"csharpType":"OwnerType","pythonType":"OwnerType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OwnerType.Chart","kind":"enum value","name":"Chart","type":"T:cAlgo.API.OwnerType","namespace":"cAlgo.API","group":"Windows","csharp":"OwnerType.Chart;","python":"OwnerType.Chart","summary":"The chart owns the window","remarks":null,"parameters":[],"returns":{"csharpType":"OwnerType","pythonType":"OwnerType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.OwnerType.Application","kind":"enum value","name":"Application","type":"T:cAlgo.API.OwnerType","namespace":"cAlgo.API","group":"Windows","csharp":"OwnerType.Application;","python":"OwnerType.Application","summary":"The application main window owns the window","remarks":null,"parameters":[],"returns":{"csharpType":"OwnerType","pythonType":"OwnerType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/OwnerType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Panel","kind":"class","name":"Panel","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public abstract class Panel : ControlBase","python":"Panel","summary":"Provides a base class for all Panel elements. Use Panel elements to position and arrange child objects.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Panel panel = new StackPanel { BackgroundColor = Color.FromArgb(80, Color.Black), Margin = 10 };\npanel.AddChild(new TextBlock { Text = SymbolName });\npanel.AddChild(new TextBlock { Text = \"Spread: \" + Symbol.Spread / Symbol.PipSize });\nChart.AddControl(panel);\nPrint(\"Panel children: {0}\", panel.ChildCount);","python":"panel = StackPanel()\npanel.BackgroundColor = Color.FromArgb(80, Color.Black)\nsymbolText = TextBlock()\nsymbolText.Text = api.SymbolName\nspreadText = TextBlock()\nspreadText.Text = f\"Spread: {api.Symbol.Spread / api.Symbol.PipSize}\"\npanel.AddChild(symbolText)\npanel.AddChild(spreadText)\napi.Chart.AddControl(panel)\napi.Print(f\"Panel children: {panel.ChildCount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Panel.AddChild(cAlgo.API.ControlBase)","kind":"method","name":"AddChild","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public void AddChild(ControlBase child)","python":"panel.AddChild(child: ControlBase) -> None","summary":"Adds the child element.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The child."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { Orientation = Orientation.Horizontal };\nvar buyButton = new Button { Text = \"Buy\" };\nbuyButton.Click += args => ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01));\npanel.AddChild(buyButton);\nChart.AddControl(panel);","python":"panel = StackPanel()\npanel.Orientation = Orientation.Horizontal\nbuyButton = Button()\nbuyButton.Text = \"Buy\"\nbuyButton.Click += lambda args: api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01))\npanel.AddChild(buyButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/AddChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/AddChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Panel.HasChild(cAlgo.API.ControlBase)","kind":"method","name":"HasChild","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public bool HasChild(ControlBase child)","python":"panel.HasChild(child: ControlBase) -> bool","summary":"Returns True if panel has passed child otherwise false.","remarks":"Use this method for child lookup instead of slow Linq Contains against Children property.","parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"Child control"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"bool","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nvar label = new TextBlock { Text = \"Trading paused\" };\nif (!panel.HasChild(label))\n    panel.AddChild(label);\nChart.AddControl(panel);\nPrint(\"Has label: {0}\", panel.HasChild(label));","python":"panel = StackPanel()\nlabel = TextBlock()\nlabel.Text = \"Trading paused\"\nif not panel.HasChild(label):\n    panel.AddChild(label)\napi.Chart.AddControl(panel)\napi.Print(f\"Has label: {panel.HasChild(label)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/HasChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/HasChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Panel.RemoveChild(cAlgo.API.ControlBase)","kind":"method","name":"RemoveChild","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public void RemoveChild(ControlBase child)","python":"panel.RemoveChild(child: ControlBase) -> None","summary":"Removes the child element.","remarks":null,"parameters":[{"name":"child","csharpType":"ControlBase","pythonType":"ControlBase","summary":"The child."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nvar warning = new TextBlock { Text = \"Spread is high\", ForegroundColor = Color.Red };\npanel.AddChild(warning);\nChart.AddControl(panel);\nif (Symbol.Spread / Symbol.PipSize < 2)\n    panel.RemoveChild(warning);","python":"panel = StackPanel()\nwarning = TextBlock()\nwarning.Text = \"Spread is high\"\nwarning.ForegroundColor = Color.Red\npanel.AddChild(warning)\napi.Chart.AddControl(panel)\nif api.Symbol.Spread / api.Symbol.PipSize < 2:\n    panel.RemoveChild(warning)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/RemoveChild/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/RemoveChild/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Panel.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public Color BackgroundColor {get; set;}","python":"panel.BackgroundColor: Color","summary":"Gets or sets the color of the panel background.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { BackgroundColor = Color.FromHex(\"#80000000\") };\npanel.AddChild(new TextBlock { Text = \"Semi transparent background\", Margin = 5 });\nChart.AddControl(panel);","python":"panel = StackPanel()\npanel.BackgroundColor = Color.FromHex(\"#80000000\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Semi transparent background\"\npanel.AddChild(textBlock)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Panel.ChildCount","kind":"property","name":"ChildCount","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public int ChildCount {get;}","python":"panel.ChildCount: int","summary":"Gets count of panel children.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nforeach (var position in Positions)\n    panel.AddChild(new TextBlock { Text = position.SymbolName + \" \" + position.NetProfit });\nChart.AddControl(panel);\nPrint(\"Rows: {0}\", panel.ChildCount);","python":"panel = StackPanel()\nfor position in api.Positions:\n    row = TextBlock()\n    row.Text = f\"{position.SymbolName} {position.NetProfit}\"\n    panel.AddChild(row)\napi.Chart.AddControl(panel)\napi.Print(f\"Rows: {panel.ChildCount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/ChildCount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/ChildCount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Panel.Children","kind":"property","name":"Children","type":"T:cAlgo.API.Panel","namespace":"cAlgo.API","group":"Layout","csharp":"public IEnumerable<ControlBase> Children {get;}","python":"panel.Children: Iterable[ControlBase]","summary":"Gets panel children.","remarks":null,"parameters":[],"returns":{"csharpType":"IEnumerable<ControlBase>","pythonType":"Iterable[ControlBase]","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\npanel.AddChild(new Button { Text = \"Buy\" });\npanel.AddChild(new Button { Text = \"Sell\" });\nforeach (var child in panel.Children.OfType<Button>())\n    child.IsEnabled = false;\nChart.AddControl(panel);","python":"panel = StackPanel()\nfor text in [\"Buy\", \"Sell\"]:\n    button = Button()\n    button.Text = text\n    panel.AddChild(button)\nfor child in panel.Children:\n    child.IsEnabled = False\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/Children/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/Children/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.ParabolicSAR","kind":"interface","name":"ParabolicSAR","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface ParabolicSAR","python":"ParabolicSAR","summary":"The calculation of the Parabolic SAR Indicator.","remarks":"Developed by Welles Wilder, SAR stands for stop and reverse and is based on a concept similar to time decay, unless a security can continue to generate more profits over time, it should be liquidated.\n\nSAR trails prices as the trend extends over time, being below prices when they are increasing and above prices when they are decreasing. In this view, the indicator stops and reverses when the price trend reverses and breaks above or below the indicator. The indicator generally works well in trending markets, but not during non-trending, sideways phases. Therefore, Wilder recommended establishing the strength and direction of the trend first through the use of other indicators and then using the Parabolic SAR to trade that trend.The indicator is below prices when prices are rising and above prices when prices are falling. In this regard, the indicator stops and reverses when the price trend reverses and breaks above or below the indicator.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ParabolicSAR _parabolic;\nprotected override void Initialize()\n{\n    _parabolic = Indicators.ParabolicSAR(0.02, 0.2);\n}\npublic override void Calculate(int index)\n{\n    double parabolic = _parabolic.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 0.02 is the minimum and 0.2 the maximum acceleration factor\n        self.parabolicSar = api.Indicators.ParabolicSAR(0.02, 0.2)\n\n    def calculate(self, index):\n        parabolic = self.parabolicSar.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Parabolic SAR indicator\n    public partial class ParabolicSARSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private ParabolicSAR _parabolicSAR;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _parabolicSAR = Indicators.ParabolicSAR(0.02, 0.2);\n        }\n\n        protected override void OnBar()\n        {\n            if (_parabolicSAR.Result.Last(1) < Bars.LowPrices.Last(1) && _parabolicSAR.Result.Last(2) > Bars.HighPrices.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_parabolicSAR.Result.Last(1) > Bars.HighPrices.Last(1) && _parabolicSAR.Result.Last(2) < Bars.LowPrices.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass ParabolicSARSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.parabolicSAR = api.Indicators.ParabolicSAR(0.02, 0.2)\n\n    def on_bar_closed(self):\n        if self.parabolicSAR.Result.Last(0) < api.Bars.LowPrices.Last(0) and self.parabolicSAR.Result.Last(1) > api.Bars.HighPrices.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.parabolicSAR.Result.Last(0) > api.Bars.HighPrices.Last(0) and self.parabolicSAR.Result.Last(1) < api.Bars.LowPrices.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ParabolicSAR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ParabolicSAR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.ParabolicSAR.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.ParabolicSAR","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"parabolicSAR.Result: IndicatorDataSeries","summary":"Gets the resulting series of the Parabolic SAR indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private ParabolicSAR _parabolic;\nprotected override void Initialize()\n{\n    _parabolic = Indicators.ParabolicSAR(0.02, 0.2);\n}\npublic override void Calculate(int index)\n{\n    double parabolic = _parabolic.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        # 0.02 is the minimum and 0.2 the maximum acceleration factor\n        self.parabolicSar = api.Indicators.ParabolicSAR(0.02, 0.2)\n\n    def calculate(self, index):\n        parabolic = self.parabolicSar.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/ParabolicSAR/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/ParabolicSAR/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ParameterAttribute","kind":"class","name":"ParameterAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public class ParameterAttribute : Attribute","python":"ParameterAttribute","summary":"The Parameter Attribute class.","remarks":"Marks a property as input parameter.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to define different types of parameters for your indicators\n    public partial class ParameterAttributeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Print(\"Periods: {0}, Multiplier: {1}, Label: {2}, Direction: {3}\", Periods, Multiplier, Label, Direction);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"class ParameterAttributeSample():\n    def initialize(self):\n        api.Print(f\"Periods: {api.Periods}, Multiplier: {api.Multiplier}, Label: {api.Label}, Direction: {api.Direction}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14,\n      \"MinValue\": 2,\n      \"MaxValue\": 100,\n      \"Step\": 1,\n      \"Group\": \"Numeric Group\"\n    },\n    {\n      \"Name\": \"Multiplier\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 1.5,\n      \"MinValue\": 0.1,\n      \"MaxValue\": 10,\n      \"Step\": 0.1,\n      \"Group\": \"Numeric Group\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"myLabel\",\n      \"Group\": \"String Group\"\n    },\n    {\n      \"Name\": \"Direction\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.TradeType\",\n      \"DefaultValue\": \"Buy\",\n      \"Group\": \"Enum Group\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ParameterAttribute.#ctor(System.String)","kind":"constructor","name":"ParameterAttribute","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public ParameterAttribute(string name)","python":"ParameterAttribute(name: str)","summary":"Initializes a new ParameterAttribute instance and sets the name.","remarks":"Represents an input parameter to the program. To make it effective type in enclosed in square brackets, e.g. [Parameter], before the property declaration. Parameters are listed in the instance button of the robot/indicator.","parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":"The name of the parameter."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(VolumeInLots), \"myLabel\");\n    }\n}","python":"def on_start(self):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots), \"myLabel\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.ParameterAttribute.#ctor","kind":"constructor","name":"ParameterAttribute","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public ParameterAttribute()","python":"ParameterAttribute()","summary":"Initializes a new instance of the ParameterAttribute class.","remarks":"In this case the parameter name is the same as the property name.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"MaPeriod: {0}\", MaPeriod);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"MaPeriod: {api.MaPeriod}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"MaPeriod\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.DefaultValue","kind":"property","name":"DefaultValue","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public object DefaultValue {get; set;}","python":"parameterAttribute.DefaultValue: object","summary":"Gets or sets the default value of this Parameter property.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Periods: {0}, Label: {1}\", Periods, Label);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Periods: {api.Periods}, Label: {api.Label}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"myLabel\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/DefaultValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/DefaultValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.Description","kind":"property","name":"Description","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Description {get; set;}","python":"parameterAttribute.Description: str","summary":"Gets or sets description for input parameter that will be shown in UI.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Volume in units: {0}\", Symbol.QuantityToVolumeInUnits(VolumeInLots));\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Volume in units: {api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Description\": \"Volume of each new position in lots\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Description/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Description/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.Group","kind":"property","name":"Group","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Group {get; set;}","python":"parameterAttribute.Group: str","summary":"Groups parameters in UI.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", StopLossInPips, TakeProfitInPips);\n    }\n}","python":"def on_start(self):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", api.StopLossInPips, api.TakeProfitInPips)","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Protection\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 40,\n      \"Group\": \"Protection\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Group/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Group/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.IsValueVisibleInTitle","kind":"property","name":"IsValueVisibleInTitle","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool IsValueVisibleInTitle {get; set;}","python":"parameterAttribute.IsValueVisibleInTitle: bool","summary":"Gets or sets whether parameter value should be visible or not in instance title (default: true).","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Label: {0}\", Label);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Label: {api.Label}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"myLabel\",\n      \"IsValueVisibleInTitle\": false\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/IsValueVisibleInTitle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/IsValueVisibleInTitle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.MaxValue","kind":"property","name":"MaxValue","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public object MaxValue {get; set;}","python":"parameterAttribute.MaxValue: object","summary":"Gets or sets the maximum value of this Parameter property. It is used for validating user input.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Risk amount: {0}\", Account.Balance * RiskPercent / 100);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Risk amount: {api.Account.Balance * api.RiskPercent / 100}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"RiskPercent\",\n      \"DisplayName\": \"Risk %\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 1,\n      \"MinValue\": 0.1,\n      \"MaxValue\": 5\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/MaxValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/MaxValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.MinValue","kind":"property","name":"MinValue","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public object MinValue {get; set;}","python":"parameterAttribute.MinValue: object","summary":"Gets or sets the minimum value of this Parameter property. It is used for validating user input.","remarks":null,"parameters":[],"returns":{"csharpType":"object","pythonType":"object","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Periods: {0}\", Periods);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Periods: {api.Periods}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14,\n      \"MinValue\": 5\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/MinValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/MinValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.Name","kind":"property","name":"Name","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Name {get;}","python":"parameterAttribute.Name: str","summary":"The input parameter name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"Period: {0}\", Period);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Period: {api.Period}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"DisplayName\": \"MA Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.ParameterAttribute.Step","kind":"property","name":"Step","type":"T:cAlgo.API.ParameterAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public double Step {get; set;}","python":"parameterAttribute.Step: float","summary":"Gets or sets the step of this Parameter. Step is used in NumericUpDown controls in parameter editors.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class ParameterSample : Robot\n{\n    protected override void OnStart()\n    {\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", StopLossInPips, StopLossInPips * 2);\n    }\n}","python":"def on_start(self):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", api.StopLossInPips, api.StopLossInPips * 2)","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 20,\n      \"MinValue\": 5,\n      \"MaxValue\": 100,\n      \"Step\": 5\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Step/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/ParameterAttribute/Step/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PenLineCap","kind":"enum","name":"PenLineCap","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public enum PenLineCap","python":"PenLineCap","summary":"Describes the shape at the end of a line or segment.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the PenLineCap properties of shapes\n    public partial class PenLineCapSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var rectangle = new Rectangle\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                StrokeStartLineCap = StrokeStartLineCap,\n                StrokeEndLineCap = StrokeEndLineCap,\n                StrokeDashCap = StrokeDashCap,\n                StrokeColor = Color.Red,\n                StrokeThickness = 4,\n                Width = 200,\n                Height = 100,\n            };\n\n            Chart.AddControl(rectangle);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        rectangle = Rectangle()\n        rectangle.HorizontalAlignment = HorizontalAlignment.Center\n        rectangle.VerticalAlignment = VerticalAlignment.Center\n        rectangle.StrokeStartLineCap = api.StrokeStartLineCap\n        rectangle.StrokeEndLineCap = api.StrokeEndLineCap\n        rectangle.StrokeDashCap = api.StrokeDashCap\n        rectangle.StrokeColor = Color.Red\n        rectangle.StrokeThickness = 4\n        rectangle.Width = 200\n        rectangle.Height = 100\n\n        api.Chart.AddControl(rectangle)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"StrokeStartLineCap\",\n      \"DisplayName\": \"Stroke Start Line Cap\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.PenLineCap\",\n      \"DefaultValue\": \"Flat\"\n    },\n    {\n      \"Name\": \"StrokeEndLineCap\",\n      \"DisplayName\": \"Stroke End Line Cap\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.PenLineCap\",\n      \"DefaultValue\": \"Flat\"\n    },\n    {\n      \"Name\": \"StrokeDashCap\",\n      \"DisplayName\": \"Stroke Dash Cap\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.PenLineCap\",\n      \"DefaultValue\": \"Flat\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineCap.Flat","kind":"enum value","name":"Flat","type":"T:cAlgo.API.PenLineCap","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineCap.Flat;","python":"PenLineCap.Flat","summary":"A cap that does not extend past the last point of the line. Comparable to no line cap.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineCap.Square","kind":"enum value","name":"Square","type":"T:cAlgo.API.PenLineCap","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineCap.Square;","python":"PenLineCap.Square","summary":"A rectangle that has a height equal to the line thickness and a length equal to half the line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineCap.Round","kind":"enum value","name":"Round","type":"T:cAlgo.API.PenLineCap","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineCap.Round;","python":"PenLineCap.Round","summary":"A semicircle that has a diameter equal to the line thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineCap.Triangle","kind":"enum value","name":"Triangle","type":"T:cAlgo.API.PenLineCap","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineCap.Triangle;","python":"PenLineCap.Triangle","summary":"An isosceles right triangle whose base length is equal to the thickness of the line.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PenLineJoin","kind":"enum","name":"PenLineJoin","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public enum PenLineJoin","python":"PenLineJoin","summary":"Describes the shape that joins two lines or segments.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use a shape Stroke Line Join\n    public partial class PenLineJoinSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var rectangle = new Rectangle\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                StrokeLineJoin = StrokeLineJoin,\n                StrokeColor = Color.Red,\n                StrokeThickness = 4,\n                Width = 200,\n                Height = 100,\n            };\n\n            Chart.AddControl(rectangle);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        rectangle = Rectangle()\n        rectangle.HorizontalAlignment = HorizontalAlignment.Center\n        rectangle.VerticalAlignment = VerticalAlignment.Center\n        rectangle.StrokeLineJoin = api.StrokeLineJoin\n        rectangle.StrokeColor = Color.Red\n        rectangle.StrokeThickness = 4\n        rectangle.Width = 200\n        rectangle.Height = 100\n\n        api.Chart.AddControl(rectangle)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"StrokeLineJoin\",\n      \"DisplayName\": \"Stroke Line Join\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.PenLineJoin\",\n      \"DefaultValue\": \"Miter\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineJoin.Miter","kind":"enum value","name":"Miter","type":"T:cAlgo.API.PenLineJoin","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineJoin.Miter;","python":"PenLineJoin.Miter","summary":"Regular angular vertices.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineJoin","pythonType":"PenLineJoin","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineJoin.Bevel","kind":"enum value","name":"Bevel","type":"T:cAlgo.API.PenLineJoin","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineJoin.Bevel;","python":"PenLineJoin.Bevel","summary":"Beveled vertices.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineJoin","pythonType":"PenLineJoin","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PenLineJoin.Round","kind":"enum value","name":"Round","type":"T:cAlgo.API.PenLineJoin","namespace":"cAlgo.API","group":"Shapes","csharp":"PenLineJoin.Round;","python":"PenLineJoin.Round","summary":"Rounded vertices.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineJoin","pythonType":"PenLineJoin","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/PenLineJoin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrder","kind":"interface","name":"PendingOrder","type":null,"namespace":"cAlgo.API","group":"Orders","csharp":"public interface PendingOrder","python":"PendingOrder","summary":"Provides access to properties of pending orders","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var limitPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01), limitPrice, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n{\n    var order = result.PendingOrder;\n    Print(\"Order {0}: {1} {2} {3} at {4}\", order.Id, order.OrderType, order.TradeType, order.VolumeInUnits, order.TargetPrice);\n}\nelse\n{\n    Print(\"Order placement failed: {0}\", result.Error);\n}","python":"limitPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01), limitPrice, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    order = result.PendingOrder\n    api.Print(f\"Order {order.Id}: {order.OrderType} {order.TradeType} {order.VolumeInUnits} at {order.TargetPrice}\")\nelse:\n    api.Print(f\"Order placement failed: {result.Error}\")"},{"csharp":"foreach (var order in PendingOrders.Where(pendingOrder => pendingOrder.Label == \"myLabel\").ToArray())\n{\n    if (order.DistancePips > 50)\n        order.Cancel();\n    else\n        order.ModifyStopLossPips(15);\n}","python":"for order in [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.Label == \"myLabel\"]:\n    if order.DistancePips > 50:\n        order.Cancel()\n    else:\n        order.ModifyStopLossPips(15)"},{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Filled += OnPendingOrdersFilled;\n    PendingOrders.Cancelled += OnPendingOrdersCancelled;\n}\n\nprivate void OnPendingOrdersFilled(PendingOrderFilledEventArgs args)\n{\n    Print(\"Order {0} filled, position {1} opened\", args.PendingOrder.Id, args.Position.Id);\n}\n\nprivate void OnPendingOrdersCancelled(PendingOrderCancelledEventArgs args)\n{\n    Print(\"Order {0} cancelled, reason: {1}\", args.PendingOrder.Id, args.Reason);\n}","python":"def on_start(self):\n    api.PendingOrders.Filled += self.on_pending_orders_filled\n    api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n\ndef on_pending_orders_filled(self, args):\n    api.Print(f\"Order {args.PendingOrder.Id} filled, position {args.Position.Id} opened\")\n\ndef on_pending_orders_cancelled(self, args):\n    api.Print(f\"Order {args.PendingOrder.Id} cancelled, reason: {args.Reason}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.Cancel","kind":"method","name":"Cancel","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult Cancel()","python":"pendingOrder.Cancel() -> TradeResult","summary":"Shortcut for Robot.CancelPendingOrder method","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders.Where(pendingOrder => pendingOrder.Label == \"myLabel\").ToArray())\n{\n    var result = order.Cancel();\n    Print(\"Order {0} cancelled: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.Label == \"myLabel\"]:\n    result = order.Cancel()\n    api.Print(f\"Order {order.Id} cancelled: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Cancel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Cancel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyExpirationTime(System.Nullable{System.DateTime})","kind":"method","name":"ModifyExpirationTime","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyExpirationTime(DateTime? expirationTime)","python":"pendingOrder.ModifyExpirationTime(expirationTime: DateTime | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Expiration Time","remarks":null,"parameters":[{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New Expiration Time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyExpirationTime(Server.Time.AddHours(4));\n    Print(\"Order {0} expiration modified: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyExpirationTime(api.Server.Time.AddHours(4))\n    api.Print(f\"Order {order.Id} expiration modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyExpirationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyExpirationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyStopLimitRange(System.Double)","kind":"method","name":"ModifyStopLimitRange","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyStopLimitRange(double stopLimitRangePips)","python":"pendingOrder.ModifyStopLimitRange(stopLimitRangePips: float) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Stop Limit Range","remarks":null,"parameters":[{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"New Stop Limit Range value in Pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if (order.OrderType == PendingOrderType.StopLimit)\n        order.ModifyStopLimitRange(5);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.StopLimit:\n        order.ModifyStopLimitRange(5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLimitRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLimitRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyStopLossBreakEven(cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyStopLossBreakEven","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyStopLossBreakEven(StopLossBreakEven stopLossBreakEven)","python":"pendingOrder.ModifyStopLossBreakEven(stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the StopLoss Break-Even.","remarks":null,"parameters":[{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"StopLossBreakEven"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyStopLossBreakEven(new StopLossBreakEven(20, 2));\n    Print(\"Order {0} break-even rule set: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyStopLossBreakEven(StopLossBreakEven(20, 2))\n    api.Print(f\"Order {order.Id} break-even rule set: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossBreakEven/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossBreakEven/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyStopLossPips(System.Nullable{System.Double})","kind":"method","name":"ModifyStopLossPips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyStopLossPips(double? stopLossPips)","python":"pendingOrder.ModifyStopLossPips(stopLossPips: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Stop Loss","remarks":null,"parameters":[{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"New Stop Loss value in Pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyStopLossPips(15);\n    Print(\"Order {0} stop loss modified: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyStopLossPips(15)\n    api.Print(f\"Order {order.Id} stop loss modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyStopLossPrice(System.Nullable{System.Double})","kind":"method","name":"ModifyStopLossPrice","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyStopLossPrice(double? stopLoss)","python":"pendingOrder.ModifyStopLossPrice(stopLoss: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Stop Loss","remarks":null,"parameters":[{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop Loss value in Price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var distance = 20 * order.Symbol.PipSize;\n    var stopLossPrice = order.TradeType == TradeType.Buy ? order.TargetPrice - distance : order.TargetPrice + distance;\n    var result = order.ModifyStopLossPrice(stopLossPrice);\n    Print(\"Order {0} stop loss set at {1}: {2}\", order.Id, stopLossPrice, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    distance = 20 * order.Symbol.PipSize\n    stopLossPrice = order.TargetPrice - distance if order.TradeType == TradeType.Buy else order.TargetPrice + distance\n    result = order.ModifyStopLossPrice(stopLossPrice)\n    api.Print(f\"Order {order.Id} stop loss set at {stopLossPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyStopLossPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyTakeProfit(cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyTakeProfit","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyTakeProfit(RelativeTakeProfitProtections takeProfitProtections)","python":"pendingOrder.ModifyTakeProfit(takeProfitProtections: RelativeTakeProfitProtections) -> TradeResult","summary":"Shortcut for the Robot.ModifyTakeProfit method to change the Take Profit protection","remarks":null,"parameters":[{"name":"takeProfitProtections","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"New Take Profit protections"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var halfVolume = order.Symbol.NormalizeVolumeInUnits(order.VolumeInUnits / 2, RoundingMode.Down);\n    var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(halfVolume, 20), new RelativeTakeProfitLastProtection(40));\n    var result = order.ModifyTakeProfit(takeProfits);\n    Print(\"Order {0} take profit ladder set: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    halfVolume = order.Symbol.NormalizeVolumeInUnits(order.VolumeInUnits / 2, RoundingMode.Down)\n    takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(halfVolume, 20), RelativeTakeProfitLastProtection(40))\n    result = order.ModifyTakeProfit(takeProfits)\n    api.Print(f\"Order {order.Id} take profit ladder set: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyTakeProfit(cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyTakeProfit","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyTakeProfit(AbsoluteTakeProfitProtections takeProfitProtections)","python":"pendingOrder.ModifyTakeProfit(takeProfitProtections: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Shortcut for the Robot.ModifyTakeProfit method to change the Take Profit protection","remarks":null,"parameters":[{"name":"takeProfitProtections","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"New Take Profit protections"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var distance = 50 * order.Symbol.PipSize;\n    var targetPrice = order.TradeType == TradeType.Buy ? order.TargetPrice + distance : order.TargetPrice - distance;\n    var result = order.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));\n    Print(\"Order {0} take profit set at {1}: {2}\", order.Id, targetPrice, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    distance = 50 * order.Symbol.PipSize\n    targetPrice = order.TargetPrice + distance if order.TradeType == TradeType.Buy else order.TargetPrice - distance\n    result = order.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))\n    api.Print(f\"Order {order.Id} take profit set at {targetPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyTakeProfitPips(System.Nullable{System.Double})","kind":"method","name":"ModifyTakeProfitPips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyTakeProfitPips(double? takeProfitPips)","python":"pendingOrder.ModifyTakeProfitPips(takeProfitPips: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Take Profit","remarks":null,"parameters":[{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"New Take Profit value in Pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyTakeProfitPips(30);\n    Print(\"Order {0} take profit modified: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyTakeProfitPips(30)\n    api.Print(f\"Order {order.Id} take profit modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfitPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfitPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyTakeProfitPrice(System.Nullable{System.Double})","kind":"method","name":"ModifyTakeProfitPrice","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyTakeProfitPrice(double? takeProfit)","python":"pendingOrder.ModifyTakeProfitPrice(takeProfit: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Take Profit","remarks":null,"parameters":[{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take Profit value in Price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var distance = 40 * order.Symbol.PipSize;\n    var takeProfitPrice = order.TradeType == TradeType.Buy ? order.TargetPrice + distance : order.TargetPrice - distance;\n    var result = order.ModifyTakeProfitPrice(takeProfitPrice);\n    Print(\"Order {0} take profit set at {1}: {2}\", order.Id, takeProfitPrice, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    distance = 40 * order.Symbol.PipSize\n    takeProfitPrice = order.TargetPrice + distance if order.TradeType == TradeType.Buy else order.TargetPrice - distance\n    result = order.ModifyTakeProfitPrice(takeProfitPrice)\n    api.Print(f\"Order {order.Id} take profit set at {takeProfitPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfitPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfitPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyTargetPrice(System.Double)","kind":"method","name":"ModifyTargetPrice","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyTargetPrice(double targetPrice)","python":"pendingOrder.ModifyTargetPrice(targetPrice: float) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change Target Price","remarks":null,"parameters":[{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New Target Price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyTargetPrice(order.TargetPrice - 10 * order.Symbol.PipSize);\n    Print(\"Order {0} moved 10 pips lower: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyTargetPrice(order.TargetPrice - 10 * order.Symbol.PipSize)\n    api.Print(f\"Order {order.Id} moved 10 pips lower: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTargetPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTargetPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrder.ModifyVolume(System.Double)","kind":"method","name":"ModifyVolume","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeResult ModifyVolume(double volume)","python":"pendingOrder.ModifyVolume(volume: float) -> TradeResult","summary":"Shortcut for Robot.ModifyPendingOrder method to change VolumeInUnits","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"New Volume in Units"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    var result = order.ModifyVolume(20000);\n    Print(\"Order {0} volume modified: {1}\", order.Id, result.IsSuccessful);\n}","python":"for order in api.PendingOrders:\n    result = order.ModifyVolume(20000)\n    api.Print(f\"Order {order.Id} volume modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.AbsoluteTakeProfitProtections","kind":"property","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"AbsoluteTakeProfitProtections AbsoluteTakeProfitProtections {get;}","python":"pendingOrder.AbsoluteTakeProfitProtections: AbsoluteTakeProfitProtections","summary":"The absolute take profit protections of the order. Null if order has no take profit.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var limitPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(10000, limitPrice + 20 * Symbol.PipSize), new AbsoluteTakeProfitLastProtection(limitPrice + 40 * Symbol.PipSize));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 30000, limitPrice, \"myLabel\", new AbsoluteStopLossProtection(limitPrice - 20 * Symbol.PipSize), takeProfits);\nif (result.IsSuccessful && result.PendingOrder.AbsoluteTakeProfitProtections != null)\n    Print(\"Last take profit price: {0}\", result.PendingOrder.AbsoluteTakeProfitProtections.LastTakeProfit.Price);","python":"limitPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\ntakeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(10000, limitPrice + 20 * api.Symbol.PipSize), AbsoluteTakeProfitLastProtection(limitPrice + 40 * api.Symbol.PipSize))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 30000, limitPrice, \"myLabel\", AbsoluteStopLossProtection(limitPrice - 20 * api.Symbol.PipSize), takeProfits)\nif result.IsSuccessful and result.PendingOrder.AbsoluteTakeProfitProtections is not None:\n    api.Print(f\"Last take profit price: {result.PendingOrder.AbsoluteTakeProfitProtections.LastTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/AbsoluteTakeProfitProtections/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/AbsoluteTakeProfitProtections/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Channel","kind":"property","name":"Channel","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"string Channel {get;}","python":"pendingOrder.Channel: str","summary":"Gets the channel via which the order was placed in a string format.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0} channel: {1}\", order.Id, order.Channel);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id} channel: {order.Channel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Channel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Channel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Orders the cBot places carry channel 'cBot Console' instead of the desktop 'cBot cTrader'."},{"name":"Cloud","support":"Partial","behaviour":"Orders the cBot places carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'."}]}
{"id":"P:cAlgo.API.PendingOrder.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"string Comment {get;}","python":"pendingOrder.Comment: str","summary":"User assigned Order Comment","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, null, \"Pullback entry\");\nif (result.IsSuccessful)\n    Print(\"Order comment: {0}\", result.PendingOrder.Comment);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, None, \"Pullback entry\")\nif result.IsSuccessful:\n    api.Print(f\"Order comment: {result.PendingOrder.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.CurrentPrice","kind":"property","name":"CurrentPrice","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double CurrentPrice {get;}","python":"pendingOrder.CurrentPrice: float","summary":"Gets the current price of the symbol for which the pending order is placed.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0}: target {1}, current price {2}\", order.Id, order.TargetPrice, order.CurrentPrice);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id}: target {order.TargetPrice}, current price {order.CurrentPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/CurrentPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/CurrentPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.DistancePips","kind":"property","name":"DistancePips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double DistancePips {get;}","python":"pendingOrder.DistancePips: float","summary":"Gets the distance in pips between the current price of the symbol and the target price of the pending order (via TargetPrice ).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders.Where(pendingOrder => pendingOrder.DistancePips > 100).ToArray())\n    CancelPendingOrder(order);","python":"for order in [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.DistancePips > 100]:\n    api.CancelPendingOrder(order)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/DistancePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/DistancePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.ExpirationTime","kind":"property","name":"ExpirationTime","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"DateTime? ExpirationTime {get;}","python":"pendingOrder.ExpirationTime: DateTime | None","summary":"The order Expiration time The Timezone used is set in the Robot attribute","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var expiration = Server.Time.AddHours(2);\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, expiration);\nif (result.IsSuccessful)\n    Print(\"Order expires at {0}\", result.PendingOrder.ExpirationTime);","python":"expiration = api.Server.Time.AddHours(2)\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, expiration)\nif result.IsSuccessful:\n    api.Print(f\"Order expires at {result.PendingOrder.ExpirationTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ExpirationTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ExpirationTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.HasTrailingStop","kind":"property","name":"HasTrailingStop","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"bool HasTrailingStop {get;}","python":"pendingOrder.HasTrailingStop: bool","summary":"When HasTrailingStop set to true, server updates Stop Loss every time position moves in your favor.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, null, \"Trailing\", true);\nif (result.IsSuccessful)\n    Print(\"Order has trailing stop: {0}\", result.PendingOrder.HasTrailingStop);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, None, \"Trailing\", True)\nif result.IsSuccessful:\n    api.Print(f\"Order has trailing stop: {result.PendingOrder.HasTrailingStop}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/HasTrailingStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/HasTrailingStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Id","kind":"property","name":"Id","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"int Id {get;}","python":"pendingOrder.Id: int","summary":"Unique order Id.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"The pending order's Id: {0}\", result.PendingOrder.Id);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"The pending order's Id: {result.PendingOrder.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Label","kind":"property","name":"Label","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"string Label {get;}","python":"pendingOrder.Label: str","summary":"User assigned identifier for the order.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders.Where(pendingOrder => pendingOrder.Label == \"myLabel\").ToArray())\n    CancelPendingOrder(order);","python":"for order in [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.Label == \"myLabel\"]:\n    api.CancelPendingOrder(order)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Label/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Label/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.LastUpdateTime","kind":"property","name":"LastUpdateTime","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"DateTime? LastUpdateTime {get;}","python":"pendingOrder.LastUpdateTime: DateTime | None","summary":"Gets the time when an order was last updated. The timezone used is set in the algorithm class attribute.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0} last updated at {1}\", order.Id, order.LastUpdateTime);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id} last updated at {order.LastUpdateTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/LastUpdateTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/LastUpdateTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.OrderType","kind":"property","name":"OrderType","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderType OrderType {get;}","python":"pendingOrder.OrderType: PendingOrderType","summary":"Specifies whether this order is Stop or Limit.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderType","pythonType":"PendingOrderType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if (order.OrderType == PendingOrderType.StopLimit)\n        Print(\"Stop limit order {0}, range {1} pips\", order.Id, order.StopLimitRangePips);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.StopLimit:\n        api.Print(f\"Stop limit order {order.Id}, range {order.StopLimitRangePips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/OrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/OrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.ProtectionType","kind":"property","name":"ProtectionType","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"ProtectionType ProtectionType {get;}","python":"pendingOrder.ProtectionType: ProtectionType","summary":"Gets the order protection type.","remarks":null,"parameters":[],"returns":{"csharpType":"ProtectionType","pythonType":"ProtectionType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0} protection type: {1}\", order.Id, order.ProtectionType);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id} protection type: {order.ProtectionType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ProtectionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ProtectionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Quantity","kind":"property","name":"Quantity","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double Quantity {get;}","python":"pendingOrder.Quantity: float","summary":"Quantity (lots) of this order","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0} quantity: {1} lots\", order.Id, order.Quantity);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id} quantity: {order.Quantity} lots\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Quantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Quantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.RelativeTakeProfitProtections","kind":"property","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"RelativeTakeProfitProtections RelativeTakeProfitProtections {get;}","python":"pendingOrder.RelativeTakeProfitProtections: RelativeTakeProfitProtections","summary":"The relative take profit protections of the order. Null if order has no take profit.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 30000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful && result.PendingOrder.RelativeTakeProfitProtections != null)\n    Print(\"Last take profit distance: {0} pips\", result.PendingOrder.RelativeTakeProfitProtections.LastTakeProfit.Distance);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 30000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful and result.PendingOrder.RelativeTakeProfitProtections is not None:\n    api.Print(f\"Last take profit distance: {result.PendingOrder.RelativeTakeProfitProtections.LastTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/RelativeTakeProfitProtections/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/RelativeTakeProfitProtections/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopLimitRangePips","kind":"property","name":"StopLimitRangePips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double? StopLimitRangePips {get;}","python":"pendingOrder.StopLimitRangePips: float | None","summary":"Maximum limit from order target price, where order can be executed.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var targetPrice = Symbol.Ask + 20 * Symbol.PipSize;\nvar result = PlaceStopLimitOrder(TradeType.Buy, SymbolName, 10000, targetPrice, 2.0, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Stop limit range: {0} pips\", result.PendingOrder.StopLimitRangePips);","python":"targetPrice = api.Symbol.Ask + 20 * api.Symbol.PipSize\nresult = api.PlaceStopLimitOrder(TradeType.Buy, api.SymbolName, 10000, targetPrice, 2.0, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Stop limit range: {result.PendingOrder.StopLimitRangePips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLimitRangePips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLimitRangePips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopLoss","kind":"property","name":"StopLoss","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double? StopLoss {get;}","python":"pendingOrder.StopLoss: float | None","summary":"The order stop loss in price","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Order stop loss price: {0}\", result.PendingOrder.StopLoss);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Order stop loss price: {result.PendingOrder.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLoss/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLoss/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopLossBreakEven","kind":"property","name":"StopLossBreakEven","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"StopLossBreakEven StopLossBreakEven {get;}","python":"pendingOrder.StopLossBreakEven: StopLossBreakEven","summary":"The stop loss break even of the order.","remarks":null,"parameters":[],"returns":{"csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", new RelativeStopLossProtection(20), takeProfits, new StopLossBreakEven(15, 2));\nif (result.IsSuccessful && result.PendingOrder.StopLossBreakEven != null)\n    Print(\"Break-even trigger distance: {0} pips\", result.PendingOrder.StopLossBreakEven.TriggerDistance);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", RelativeStopLossProtection(20), takeProfits, StopLossBreakEven(15, 2))\nif result.IsSuccessful and result.PendingOrder.StopLossBreakEven is not None:\n    api.Print(f\"Break-even trigger distance: {result.PendingOrder.StopLossBreakEven.TriggerDistance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossBreakEven/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossBreakEven/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopLossPips","kind":"property","name":"StopLossPips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double? StopLossPips {get;}","python":"pendingOrder.StopLossPips: float | None","summary":"The order stop loss in pips","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Order stop loss pips: {0}\", result.PendingOrder.StopLossPips);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Order stop loss pips: {result.PendingOrder.StopLossPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopLossTriggerMethod","kind":"property","name":"StopLossTriggerMethod","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"StopTriggerMethod? StopLossTriggerMethod {get;}","python":"pendingOrder.StopLossTriggerMethod: StopTriggerMethod | None","summary":"Trigger method for order's StopLoss","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, null, \"\", false, StopTriggerMethod.Opposite);\nif (result.IsSuccessful)\n    Print(\"Stop loss trigger method: {0}\", result.PendingOrder.StopLossTriggerMethod);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative, None, \"\", False, StopTriggerMethod.Opposite)\nif result.IsSuccessful:\n    api.Print(f\"Stop loss trigger method: {result.PendingOrder.StopLossTriggerMethod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopLossTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.StopOrderTriggerMethod","kind":"property","name":"StopOrderTriggerMethod","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"StopTriggerMethod? StopOrderTriggerMethod {get;}","python":"pendingOrder.StopOrderTriggerMethod: StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stopPrice = Symbol.Ask + 20 * Symbol.PipSize;\nvar result = PlaceStopOrder(TradeType.Buy, SymbolName, 10000, stopPrice, \"myLabel\", 20, 40, ProtectionType.Relative, null, \"\", false, StopTriggerMethod.Trade, StopTriggerMethod.DoubleTrade);\nif (result.IsSuccessful)\n    Print(\"Stop order trigger method: {0}\", result.PendingOrder.StopOrderTriggerMethod);","python":"stopPrice = api.Symbol.Ask + 20 * api.Symbol.PipSize\nresult = api.PlaceStopOrder(TradeType.Buy, api.SymbolName, 10000, stopPrice, \"myLabel\", 20, 40, ProtectionType.Relative, None, \"\", False, StopTriggerMethod.Trade, StopTriggerMethod.DoubleTrade)\nif result.IsSuccessful:\n    api.Print(f\"Stop order trigger method: {result.PendingOrder.StopOrderTriggerMethod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopOrderTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/StopOrderTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.SubmittedTime","kind":"property","name":"SubmittedTime","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"DateTime SubmittedTime {get;}","python":"pendingOrder.SubmittedTime: DateTime","summary":"Gets the order submission time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0} submitted at {1}\", order.Id, order.SubmittedTime);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id} submitted at {order.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/SubmittedTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/SubmittedTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"Symbol Symbol {get;}","python":"pendingOrder.Symbol: Symbol","summary":"Gets the order symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n    Print(\"Order {0}: {1} bid {2} ask {3}\", order.Id, order.Symbol.Name, order.Symbol.Bid, order.Symbol.Ask);","python":"for order in api.PendingOrders:\n    api.Print(f\"Order {order.Id}: {order.Symbol.Name} bid {order.Symbol.Bid} ask {order.Symbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"string SymbolName {get;}","python":"pendingOrder.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var eurUsdOrders = PendingOrders.Where(order => order.SymbolName == \"EURUSD\").ToArray();\nPrint(\"EURUSD pending orders: {0}\", eurUsdOrders.Length);","python":"eurUsdOrders = [order for order in api.PendingOrders if order.SymbolName == \"EURUSD\"]\napi.Print(f\"EURUSD pending orders: {len(eurUsdOrders)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.TakeProfit","kind":"property","name":"TakeProfit","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double? TakeProfit {get;}","python":"pendingOrder.TakeProfit: float | None","summary":"The order take profit in price","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Order take profit price: {0}\", result.PendingOrder.TakeProfit);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Order take profit price: {result.PendingOrder.TakeProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.TakeProfitPips","kind":"property","name":"TakeProfitPips","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double? TakeProfitPips {get;}","python":"pendingOrder.TakeProfitPips: float | None","summary":"The order take profit in pips","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Order take profit pips: {0}\", result.PendingOrder.TakeProfitPips);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Order take profit pips: {result.PendingOrder.TakeProfitPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TakeProfitPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TakeProfitPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.TargetPrice","kind":"property","name":"TargetPrice","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double TargetPrice {get;}","python":"pendingOrder.TargetPrice: float","summary":"The order target price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var targetPrice = Symbol.Bid - 20 * Symbol.PipSize;\nvar result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, targetPrice, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Order target price: {0}\", result.PendingOrder.TargetPrice);","python":"targetPrice = api.Symbol.Bid - 20 * api.Symbol.PipSize\nresult = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, targetPrice, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Order target price: {result.PendingOrder.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TargetPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TargetPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"TradeType TradeType {get;}","python":"pendingOrder.TradeType: TradeType","summary":"Specifies whether this order is to buy or sell.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyOrders = PendingOrders.Count(order => order.TradeType == TradeType.Buy);\nPrint(\"Pending buy orders: {0}\", buyOrders);","python":"buyOrders = len([order for order in api.PendingOrders if order.TradeType == TradeType.Buy])\napi.Print(f\"Pending buy orders: {buyOrders}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"double VolumeInUnits {get;}","python":"pendingOrder.VolumeInUnits: float","summary":"Volume of this order.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize);\nif (result.IsSuccessful)\n    Print(\"The order's volume is: {0}\", result.PendingOrder.VolumeInUnits);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize)\nif result.IsSuccessful:\n    api.Print(f\"The order's volume is: {result.PendingOrder.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.SymbolCode","kind":"property","name":"SymbolCode","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"string SymbolCode {get;}","python":"pendingOrder.SymbolCode: str","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use SymbolName instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrder.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.PendingOrder","namespace":"cAlgo.API","group":"Orders","csharp":"long Volume {get;}","python":"pendingOrder.Volume: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderCancellationReason","kind":"enum","name":"PendingOrderCancellationReason","type":null,"namespace":"cAlgo.API","group":"Orders","csharp":"public enum PendingOrderCancellationReason","python":"PendingOrderCancellationReason","summary":"The reason for the order cancellation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use PendingOrderCancellationReason\n    public partial class PendingOrderCancellationReasonSample : Robot\n    {\n        protected override void OnStart()\n        {\n            PendingOrders.Cancelled += PendingOrders_Cancelled;\n        }\n\n        private void PendingOrders_Cancelled(PendingOrderCancelledEventArgs obj)\n        {\n            Print(obj.Reason);\n\n            switch (obj.Reason)\n            {\n                case PendingOrderCancellationReason.Cancelled:\n                    // Do something if order cancelled\n                    break;\n\n                case PendingOrderCancellationReason.Expired:\n                    // Do something if order expired\n                    break;\n\n                case PendingOrderCancellationReason.Rejected:\n                    // Do something if order rejected\n                    break;\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n\n    def on_pending_orders_cancelled(self, args):\n        cancelledOrder = args.PendingOrder\n        cancellationReason = args.Reason\n        api.Print(f\"cancelledOrder: {cancelledOrder.Id} | cancellationReason: {cancellationReason}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderCancellationReason.Cancelled","kind":"enum value","name":"Cancelled","type":"T:cAlgo.API.PendingOrderCancellationReason","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderCancellationReason.Cancelled;","python":"PendingOrderCancellationReason.Cancelled","summary":"THe order was cancelled by trader.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderCancellationReason","pythonType":"PendingOrderCancellationReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderCancellationReason.Expired","kind":"enum value","name":"Expired","type":"T:cAlgo.API.PendingOrderCancellationReason","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderCancellationReason.Expired;","python":"PendingOrderCancellationReason.Expired","summary":"The order was cancelled due to expiration.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderCancellationReason","pythonType":"PendingOrderCancellationReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderCancellationReason.Rejected","kind":"enum value","name":"Rejected","type":"T:cAlgo.API.PendingOrderCancellationReason","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderCancellationReason.Rejected;","python":"PendingOrderCancellationReason.Rejected","summary":"The order fill was rejected and the order was cancelled.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderCancellationReason","pythonType":"PendingOrderCancellationReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderCancellationReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderCancelledEventArgs","kind":"class","name":"PendingOrderCancelledEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PendingOrderCancelledEventArgs","python":"PendingOrderCancelledEventArgs","summary":"Provides data for the pending order cancellation event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        PendingOrders.Cancelled += OnPendingOrdersCancelled;\n\n        var result = PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n        CancelPendingOrder(result.PendingOrder);\n    }\n\n    private void OnPendingOrdersCancelled(PendingOrderCancelledEventArgs args)\n    {\n        Print(\"Pending order with id {0} was cancelled. Reason: {1}\", args.PendingOrder.Id, args.Reason);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n        result = api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n        api.CancelPendingOrder(result.PendingOrder)\n\n    def on_pending_orders_cancelled(self, args):\n        print(f\"Pending order with id {args.PendingOrder.Id} was cancelled. Reason: {args.Reason}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderCancelledEventArgs.PendingOrder","kind":"property","name":"PendingOrder","type":"T:cAlgo.API.PendingOrderCancelledEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PendingOrder PendingOrder {get;}","python":"pendingOrderCancelledEventArgs.PendingOrder: PendingOrder","summary":"Gets the pending order that was cancelled.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Cancelled += OnPendingOrdersCancelled;\n}\n\nprivate void OnPendingOrdersCancelled(PendingOrderCancelledEventArgs args)\n{\n    var order = args.PendingOrder;\n    Print(\"{0} order {1} on {2} at {3} was cancelled\", order.OrderType, order.Id, order.SymbolName, order.TargetPrice);\n}","python":"def on_start(self):\n    api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n\ndef on_pending_orders_cancelled(self, args):\n    order = args.PendingOrder\n    api.Print(f\"{order.OrderType} order {order.Id} on {order.SymbolName} at {order.TargetPrice} was cancelled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderCancelledEventArgs.Reason","kind":"property","name":"Reason","type":"T:cAlgo.API.PendingOrderCancelledEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PendingOrderCancellationReason Reason {get;}","python":"pendingOrderCancelledEventArgs.Reason: PendingOrderCancellationReason","summary":"Gets the reason for the pending order cancellation.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderCancellationReason","pythonType":"PendingOrderCancellationReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Cancelled += OnPendingOrdersCancelled;\n}\n\nprivate void OnPendingOrdersCancelled(PendingOrderCancelledEventArgs args)\n{\n    if (args.Reason == PendingOrderCancellationReason.Expired)\n        Print(\"Order {0} expired\", args.PendingOrder.Id);\n}","python":"def on_start(self):\n    api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n\ndef on_pending_orders_cancelled(self, args):\n    if args.Reason == PendingOrderCancellationReason.Expired:\n        api.Print(f\"Order {args.PendingOrder.Id} expired\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/Reason/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCancelledEventArgs/Reason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderCreatedEventArgs","kind":"class","name":"PendingOrderCreatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PendingOrderCreatedEventArgs","python":"PendingOrderCreatedEventArgs","summary":"Provides data for the pending order creation events.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        PendingOrders.Created += PendingOrdersOnCreated;\n        PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n    }\n\n    private void PendingOrdersOnCreated(PendingOrderCreatedEventArgs args)\n    {\n        Print(\"Pending order with id {0} was created\", args.PendingOrder.Id);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.PendingOrders.Created += self.on_pending_orders_created\n        api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n\n    def on_pending_orders_created(self, args):\n        print(f\"Pending order with id {args.PendingOrder.Id} was created\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCreatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCreatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderCreatedEventArgs.PendingOrder","kind":"property","name":"PendingOrder","type":"T:cAlgo.API.PendingOrderCreatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PendingOrder PendingOrder {get;}","python":"pendingOrderCreatedEventArgs.PendingOrder: PendingOrder","summary":"Gets the pending order that was created.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Created += OnPendingOrdersCreated;\n    PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\");\n}\n\nprivate void OnPendingOrdersCreated(PendingOrderCreatedEventArgs args)\n{\n    var order = args.PendingOrder;\n    Print(\"{0} order {1} created at {2}, label: {3}\", order.OrderType, order.Id, order.TargetPrice, order.Label);\n}","python":"def on_start(self):\n    api.PendingOrders.Created += self.on_pending_orders_created\n    api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\")\n\ndef on_pending_orders_created(self, args):\n    order = args.PendingOrder\n    api.Print(f\"{order.OrderType} order {order.Id} created at {order.TargetPrice}, label: {order.Label}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCreatedEventArgs/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderCreatedEventArgs/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderFilledEventArgs","kind":"class","name":"PendingOrderFilledEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PendingOrderFilledEventArgs","python":"PendingOrderFilledEventArgs","summary":"Provides data for the pending order fill event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        PendingOrders.Filled += PendingOrdersOnFilled;\n        PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);\n    }\n\n    private void PendingOrdersOnFilled(PendingOrderFilledEventArgs args)\n    {\n        Print($\"Pending order with id {args.PendingOrder.Id} was filled, position id  is {args.Position.Id}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.PendingOrders.Filled += self.on_pending_orders_filled\n        api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)\n\n    def on_pending_orders_filled(self, args):\n        print(f\"Pending order with id {args.PendingOrder.Id} was filled, position id  is {args.Position.Id}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderFilledEventArgs.PendingOrder","kind":"property","name":"PendingOrder","type":"T:cAlgo.API.PendingOrderFilledEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PendingOrder PendingOrder {get;}","python":"pendingOrderFilledEventArgs.PendingOrder: PendingOrder","summary":"Gets the pending order that was filled.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Filled += OnPendingOrdersFilled;\n}\n\nprivate void OnPendingOrdersFilled(PendingOrderFilledEventArgs args)\n{\n    Print(\"{0} order {1} at {2} was filled\", args.PendingOrder.OrderType, args.PendingOrder.Id, args.PendingOrder.TargetPrice);\n}","python":"def on_start(self):\n    api.PendingOrders.Filled += self.on_pending_orders_filled\n\ndef on_pending_orders_filled(self, args):\n    api.Print(f\"{args.PendingOrder.OrderType} order {args.PendingOrder.Id} at {args.PendingOrder.TargetPrice} was filled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderFilledEventArgs.Position","kind":"property","name":"Position","type":"T:cAlgo.API.PendingOrderFilledEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Position Position {get;}","python":"pendingOrderFilledEventArgs.Position: Position","summary":"Gets the position that was filled from the pending order.","remarks":null,"parameters":[],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Filled += OnPendingOrdersFilled;\n}\n\nprivate void OnPendingOrdersFilled(PendingOrderFilledEventArgs args)\n{\n    var position = args.Position;\n    Print(\"Position {0} opened at {1}, slippage: {2}\", position.Id, position.EntryPrice, position.EntryPrice - args.PendingOrder.TargetPrice);\n}","python":"def on_start(self):\n    api.PendingOrders.Filled += self.on_pending_orders_filled\n\ndef on_pending_orders_filled(self, args):\n    position = args.Position\n    api.Print(f\"Position {position.Id} opened at {position.EntryPrice}, slippage: {position.EntryPrice - args.PendingOrder.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderFilledEventArgs/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderModifiedEventArgs","kind":"class","name":"PendingOrderModifiedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PendingOrderModifiedEventArgs","python":"PendingOrderModifiedEventArgs","summary":"Provides data for the pending order modification event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        PendingOrders.Modified += PendingOrdersOnModified;\n        var result = PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n        ModifyPendingOrder(result.PendingOrder, Symbol.Ask + 20 * Symbol.PipSize);\n    }\n\n    private void PendingOrdersOnModified(PendingOrderModifiedEventArgs args)\n    {\n        Print(\"Pending order with id {0} was modified\", args.PendingOrder.Id);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.PendingOrders.Modified += self.on_pending_orders_modified\n        result = api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n        api.ModifyPendingOrder(result.PendingOrder, api.Symbol.Ask + 20 * api.Symbol.PipSize)\n\n    def on_pending_orders_modified(self, args):\n        print(f\"Pending order with id {args.PendingOrder.Id} was modified\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderModifiedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderModifiedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrderModifiedEventArgs.PendingOrder","kind":"property","name":"PendingOrder","type":"T:cAlgo.API.PendingOrderModifiedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PendingOrder PendingOrder {get;}","python":"pendingOrderModifiedEventArgs.PendingOrder: PendingOrder","summary":"Gets the pending order that was modified.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Modified += OnPendingOrdersModified;\n}\n\nprivate void OnPendingOrdersModified(PendingOrderModifiedEventArgs args)\n{\n    var order = args.PendingOrder;\n    Print(\"Order {0} modified, target price: {1}, stop loss: {2}\", order.Id, order.TargetPrice, order.StopLoss);\n}","python":"def on_start(self):\n    api.PendingOrders.Modified += self.on_pending_orders_modified\n\ndef on_pending_orders_modified(self, args):\n    order = args.PendingOrder\n    api.Print(f\"Order {order.Id} modified, target price: {order.TargetPrice}, stop loss: {order.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderModifiedEventArgs/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PendingOrderModifiedEventArgs/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrderType","kind":"enum","name":"PendingOrderType","type":null,"namespace":"cAlgo.API","group":"Orders","csharp":"public enum PendingOrderType","python":"PendingOrderType","summary":"Represents the type of pending order.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if (order.OrderType == PendingOrderType.Limit)\n        Print(\"Limit order {0} at {1}\", order.Id, order.TargetPrice);\n    else\n        Print(\"{0} order {1} at {2}\", order.OrderType, order.Id, order.TargetPrice);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.Limit:\n        api.Print(f\"Limit order {order.Id} at {order.TargetPrice}\")\n    else:\n        api.Print(f\"{order.OrderType} order {order.Id} at {order.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderType.Limit","kind":"enum value","name":"Limit","type":"T:cAlgo.API.PendingOrderType","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderType.Limit;","python":"PendingOrderType.Limit","summary":"A limit order is an order to buy or sell at a specific price or better.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderType","pythonType":"PendingOrderType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if(order.OrderType == PendingOrderType.Limit)\n        Print(order.Id);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.Limit:\n        api.Print(order.Id)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderType.Stop","kind":"enum value","name":"Stop","type":"T:cAlgo.API.PendingOrderType","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderType.Stop;","python":"PendingOrderType.Stop","summary":"A stop order is an order to buy or sell once the price of the symbol reaches a specified price.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderType","pythonType":"PendingOrderType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if(order.OrderType == PendingOrderType.Stop)\n        Print(order.Id);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.Stop:\n        api.Print(order.Id)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PendingOrderType.StopLimit","kind":"enum value","name":"StopLimit","type":"T:cAlgo.API.PendingOrderType","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrderType.StopLimit;","python":"PendingOrderType.StopLimit","summary":"A stop limit order is an order to buy or sell once the price of the symbol reaches specific price. Order has a parameter for maximum distance from that target price, where it can be executed.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrderType","pythonType":"PendingOrderType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if(order.OrderType == PendingOrderType.StopLimit)\n        Print(order.Id);\n}","python":"for order in api.PendingOrders:\n    if order.OrderType == PendingOrderType.StopLimit:\n        api.Print(order.Id)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrderType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PendingOrders","kind":"interface","name":"PendingOrders","type":null,"namespace":"cAlgo.API","group":"Orders","csharp":"public interface PendingOrders","python":"PendingOrders","summary":"Provides access to methods of the Pending Orders collection","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Pending orders: {0}\", PendingOrders.Count);\nforeach (var order in PendingOrders)\n    Print(\"Order {0}: {1} {2} {3} at {4}\", order.Id, order.OrderType, order.TradeType, order.SymbolName, order.TargetPrice);","python":"api.Print(f\"Pending orders: {api.PendingOrders.Count}\")\nfor order in api.PendingOrders:\n    api.Print(f\"Order {order.Id}: {order.OrderType} {order.TradeType} {order.SymbolName} at {order.TargetPrice}\")"},{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Created += OnPendingOrdersCreated;\n    PendingOrders.Filled += OnPendingOrdersFilled;\n}\n\nprivate void OnPendingOrdersCreated(PendingOrderCreatedEventArgs args)\n{\n    Print(\"Order {0} created\", args.PendingOrder.Id);\n}\n\nprivate void OnPendingOrdersFilled(PendingOrderFilledEventArgs args)\n{\n    Print(\"Order {0} filled, position {1}\", args.PendingOrder.Id, args.Position.Id);\n}","python":"def on_start(self):\n    api.PendingOrders.Created += self.on_pending_orders_created\n    api.PendingOrders.Filled += self.on_pending_orders_filled\n\ndef on_pending_orders_created(self, args):\n    api.Print(f\"Order {args.PendingOrder.Id} created\")\n\ndef on_pending_orders_filled(self, args):\n    api.Print(f\"Order {args.PendingOrder.Id} filled, position {args.Position.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PendingOrders.FindById(System.Int32)","kind":"method","name":"FindById","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrder FindById(int id)","python":"api.PendingOrders.FindById(id: int) -> PendingOrder | None","summary":"Find PendingOrder by Id.","remarks":null,"parameters":[{"name":"id","csharpType":"int","pythonType":"int","summary":"PendingOrder Id"}],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"PendingOrder if found otherwise null.","nullable":true},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"const int orderId = 123456;\nvar order = PendingOrders.FindById(orderId);\nif (order != null)\n    Print(\"Order {0} target price: {1}\", orderId, order.TargetPrice);","python":"orderId = 123456\norder = api.PendingOrders.FindById(orderId)\nif order is not None:\n    api.Print(f\"Order {orderId} target price: {order.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/FindById/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/FindById/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrders.Count","kind":"property","name":"Count","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"int Count {get;}","python":"api.PendingOrders.Count: int","summary":"Total number of pending orders","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (PendingOrders.Count == 0)\n    PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\");","python":"if api.PendingOrders.Count == 0:\n    api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PendingOrders.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"PendingOrder Item {get;}","python":"api.PendingOrders[index: int] -> PendingOrder","summary":"Find a pending order by index","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The position of the order in the collection"}],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (PendingOrders.Count > 0)\n    Print(\"First pending order Id: {0}\", PendingOrders[0].Id);","python":"if api.PendingOrders.Count > 0:\n    api.Print(f\"First pending order Id: {api.PendingOrders[0].Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.PendingOrders.Cancelled","kind":"event","name":"Cancelled","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"event Action<PendingOrderCancelledEventArgs> Cancelled;","python":"api.PendingOrders.Cancelled += handler  # handler(obj: PendingOrderCancelledEventArgs)","summary":"Occurs when pending order is cancelled","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PendingOrderCancelledEventArgs>","pythonType":"Callable[[PendingOrderCancelledEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Cancelled += OnPendingOrdersCancelled;\n    var result = PlaceStopOrder(TradeType.Buy, SymbolName, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n    if (result.IsSuccessful)\n        CancelPendingOrder(result.PendingOrder);\n}\n\nprivate void OnPendingOrdersCancelled(PendingOrderCancelledEventArgs args)\n{\n    Print(\"Pending order with id {0} was cancelled. Reason: {1}\", args.PendingOrder.Id, args.Reason);\n}","python":"def on_start(self):\n    api.PendingOrders.Cancelled += self.on_pending_orders_cancelled\n    result = api.PlaceStopOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n    if result.IsSuccessful:\n        api.CancelPendingOrder(result.PendingOrder)\n\ndef on_pending_orders_cancelled(self, args):\n    api.Print(f\"Pending order with id {args.PendingOrder.Id} was cancelled. Reason: {args.Reason}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Cancelled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Cancelled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.PendingOrders.Created","kind":"event","name":"Created","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"event Action<PendingOrderCreatedEventArgs> Created;","python":"api.PendingOrders.Created += handler  # handler(obj: PendingOrderCreatedEventArgs)","summary":"Occurs when pending order is created","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PendingOrderCreatedEventArgs>","pythonType":"Callable[[PendingOrderCreatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Created += OnPendingOrdersCreated;\n    PlaceStopOrder(TradeType.Buy, SymbolName, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n}\n\nprivate void OnPendingOrdersCreated(PendingOrderCreatedEventArgs args)\n{\n    Print(\"Pending order with id {0} was created\", args.PendingOrder.Id);\n}","python":"def on_start(self):\n    api.PendingOrders.Created += self.on_pending_orders_created\n    api.PlaceStopOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n\ndef on_pending_orders_created(self, args):\n    api.Print(f\"Pending order with id {args.PendingOrder.Id} was created\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Created/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Created/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.PendingOrders.Filled","kind":"event","name":"Filled","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"event Action<PendingOrderFilledEventArgs> Filled;","python":"api.PendingOrders.Filled += handler  # handler(obj: PendingOrderFilledEventArgs)","summary":"Occurs when pending order is filled","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PendingOrderFilledEventArgs>","pythonType":"Callable[[PendingOrderFilledEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Filled += OnPendingOrdersFilled;\n    PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 5 * Symbol.PipSize, \"myLabel\");\n}\n\nprivate void OnPendingOrdersFilled(PendingOrderFilledEventArgs args)\n{\n    Print(\"Pending order with id {0} was filled, position id is {1}\", args.PendingOrder.Id, args.Position.Id);\n}","python":"def on_start(self):\n    api.PendingOrders.Filled += self.on_pending_orders_filled\n    api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 5 * api.Symbol.PipSize, \"myLabel\")\n\ndef on_pending_orders_filled(self, args):\n    api.Print(f\"Pending order with id {args.PendingOrder.Id} was filled, position id is {args.Position.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Filled/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Filled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.PendingOrders.Modified","kind":"event","name":"Modified","type":"T:cAlgo.API.PendingOrders","namespace":"cAlgo.API","group":"Orders","csharp":"event Action<PendingOrderModifiedEventArgs> Modified;","python":"api.PendingOrders.Modified += handler  # handler(obj: PendingOrderModifiedEventArgs)","summary":"Occurs when pending order is modified","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PendingOrderModifiedEventArgs>","pythonType":"Callable[[PendingOrderModifiedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PendingOrders.Modified += OnPendingOrdersModified;\n    var result = PlaceStopOrder(TradeType.Buy, SymbolName, 10000, Symbol.Ask + 10 * Symbol.PipSize);\n    if (result.IsSuccessful)\n        result.PendingOrder.ModifyTargetPrice(Symbol.Ask + 20 * Symbol.PipSize);\n}\n\nprivate void OnPendingOrdersModified(PendingOrderModifiedEventArgs args)\n{\n    Print(\"Pending order with id {0} was modified, new target price {1}\", args.PendingOrder.Id, args.PendingOrder.TargetPrice);\n}","python":"def on_start(self):\n    api.PendingOrders.Modified += self.on_pending_orders_modified\n    result = api.PlaceStopOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Ask + 10 * api.Symbol.PipSize)\n    if result.IsSuccessful:\n        result.PendingOrder.ModifyTargetPrice(api.Symbol.Ask + 20 * api.Symbol.PipSize)\n\ndef on_pending_orders_modified(self, args):\n    api.Print(f\"Pending order with id {args.PendingOrder.Id} was modified, new target price {args.PendingOrder.TargetPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Modified/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrders/Modified/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Permission","kind":"interface","name":"Permission","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface Permission","python":"Permission","summary":"Base interface for Permissions","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Permission permission = Permissions.TradingPermission;\nif (permission.IsAllowed || permission.Request())\n    Print(\"Trading is allowed\");\nelse\n    Print(\"Trading permission was denied\");","python":"permission = api.Permissions.TradingPermission\nif permission.IsAllowed or permission.Request():\n    api.Print(\"Trading is allowed\")\nelse:\n    api.Print(\"Trading permission was denied\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."},{"name":"Cloud","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."}]}
{"id":"M:cAlgo.API.Permission.Request","kind":"method","name":"Request","type":"T:cAlgo.API.Permission","namespace":"cAlgo.API","group":"Permissions","csharp":"bool Request()","python":"permission.Request() -> bool","summary":"Requests the permission from user.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Permissions.InstallationPermission.Request())\n    Print(\"Algo installation permission granted\");\nelse\n    Print(\"Algo installation permission denied\");","python":"if api.Permissions.InstallationPermission.Request():\n    api.Print(\"Algo installation permission granted\")\nelse:\n    api.Print(\"Algo installation permission denied\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/Request/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/Request/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."},{"name":"Cloud","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."}]}
{"id":"P:cAlgo.API.Permission.IsAllowed","kind":"property","name":"IsAllowed","type":"T:cAlgo.API.Permission","namespace":"cAlgo.API","group":"Permissions","csharp":"bool IsAllowed {get;}","python":"permission.IsAllowed: bool","summary":"True if Permission is given by user otherwise false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Clipboard access allowed: {0}\", Permissions.ClipboardPermission.IsAllowed);","python":"api.Print(f\"Clipboard access allowed: {api.Permissions.ClipboardPermission.IsAllowed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/IsAllowed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/IsAllowed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."},{"name":"Cloud","support":"Partial","behaviour":"IsAllowed is always true and Request returns true without showing a prompt."}]}
{"id":"T:cAlgo.API.Permissions","kind":"interface","name":"Permissions","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface Permissions","python":"Permissions","summary":"Provides all permissions state.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            if (Permissions.TradingPermission.Request())\n                Print(\"Trading permission granted by user\");\n            else\n                Print(\"Trading permission not granted by user\");\n\n            if (Permissions.InstallationPermission.Request())\n                Print(\"Algo installation permission granted by user\");\n            else\n                Print(\"Algo installation not granted by user\");\n\n            if (Permissions.ChartRobotsPermission.Request())\n                Print(\"ChartRobots installation permission granted by user\");\n            else\n                Print(\"ChartRobots installation not granted by user\");\n\n            Print($\"Is trading allowed: {Permissions.TradingPermission.IsAllowed}\");\n            Print($\"Is installing algos allowed: {Permissions.InstallationPermission.IsAllowed}\");\n            Print($\"Is adding / removing robots to chart allowed: {Permissions.ChartRobotsPermission.IsAllowed}\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        if api.Permissions.TradingPermission.Request():\n            print(\"Trading permission granted by user\")\n        else:\n            print(\"Trading permission not granted by user\")\n\n        if api.Permissions.InstallationPermission.Request():\n            print(\"Algo installation permission granted by user\")\n        else:\n            print(\"Algo installation not granted by user\")\n\n        if api.Permissions.ChartRobotsPermission.Request():\n            print(\"ChartRobots installation permission granted by user\")\n        else:\n            print(\"ChartRobots installation not granted by user\")\n\n        print(f\"Is trading allowed: {api.Permissions.TradingPermission.IsAllowed}\")\n        print(f\"Is installing algos allowed: {api.Permissions.InstallationPermission.IsAllowed}\")\n        print(f\"Is adding / removing robots to chart allowed: {api.Permissions.ChartRobotsPermission.IsAllowed}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."},{"name":"Cloud","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."}]}
{"id":"P:cAlgo.API.Permissions.ChartRobotsPermission","kind":"property","name":"ChartRobotsPermission","type":"T:cAlgo.API.Permissions","namespace":"cAlgo.API","group":"Permissions","csharp":"ChartRobotsPermission ChartRobotsPermission {get;}","python":"api.Permissions.ChartRobotsPermission: ChartRobotsPermission","summary":"Chart robots permission.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartRobotsPermission","pythonType":"ChartRobotsPermission","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Adding chart cBots allowed: {0}\", Permissions.ChartRobotsPermission.IsAllowed);","python":"api.Print(f\"Adding chart cBots allowed: {api.Permissions.ChartRobotsPermission.IsAllowed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/ChartRobotsPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/ChartRobotsPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."},{"name":"Cloud","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."}]}
{"id":"P:cAlgo.API.Permissions.ClipboardPermission","kind":"property","name":"ClipboardPermission","type":"T:cAlgo.API.Permissions","namespace":"cAlgo.API","group":"Permissions","csharp":"ClipboardPermission ClipboardPermission {get;}","python":"api.Permissions.ClipboardPermission: ClipboardPermission","summary":"System Clipboard permission.","remarks":null,"parameters":[],"returns":{"csharpType":"ClipboardPermission","pythonType":"ClipboardPermission","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"if (Permissions.ClipboardPermission.Request())\n    Print(\"Clipboard text: {0}\", Clipboard.GetText());","python":"if api.Permissions.ClipboardPermission.Request():\n    api.Print(f\"Clipboard text: {api.Clipboard.GetText()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/ClipboardPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/ClipboardPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."},{"name":"Cloud","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."}]}
{"id":"P:cAlgo.API.Permissions.InstallationPermission","kind":"property","name":"InstallationPermission","type":"T:cAlgo.API.Permissions","namespace":"cAlgo.API","group":"Permissions","csharp":"InstallationPermission InstallationPermission {get;}","python":"api.Permissions.InstallationPermission: InstallationPermission","summary":"Algo installation permission.","remarks":null,"parameters":[],"returns":{"csharpType":"InstallationPermission","pythonType":"InstallationPermission","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (!Permissions.InstallationPermission.IsAllowed)\n    Permissions.InstallationPermission.Request();","python":"if not api.Permissions.InstallationPermission.IsAllowed:\n    api.Permissions.InstallationPermission.Request()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/InstallationPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/InstallationPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."},{"name":"Cloud","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."}]}
{"id":"P:cAlgo.API.Permissions.TradingPermission","kind":"property","name":"TradingPermission","type":"T:cAlgo.API.Permissions","namespace":"cAlgo.API","group":"Permissions","csharp":"TradingPermission TradingPermission {get;}","python":"api.Permissions.TradingPermission: TradingPermission","summary":"Trading permission.","remarks":null,"parameters":[],"returns":{"csharpType":"TradingPermission","pythonType":"TradingPermission","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Permissions.TradingPermission.Request())\n    Print(\"Trading permission granted\");","python":"if api.Permissions.TradingPermission.Request():\n    api.Print(\"Trading permission granted\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/TradingPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/Permissions/TradingPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."},{"name":"Cloud","support":"Partial","behaviour":"Every permission (Trading, ChartRobots, Installation, Clipboard) reports IsAllowed true; nothing is asked of the user."}]}
{"id":"T:cAlgo.API.PlotType","kind":"enum","name":"PlotType","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public enum PlotType","python":"PlotType","summary":"The Plot type.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo\n{\n    // This sample shows how to use different types of plots for your indicator outputs\n    public partial class PlotTypeSample : Indicator\n    {\n        private StandardDeviation _standardDeviation;\n\n        protected override void Initialize()\n        {\n            _standardDeviation = Indicators.StandardDeviation(Bars.ClosePrices, 20, MovingAverageType.Simple);\n        }\n\n        public override void Calculate(int index)\n        {\n            DiscontinuousLine[index] = Bars.ClosePrices[index] + _standardDeviation.Result[index];\n            Histogram[index] = Bars.ClosePrices[index] + (_standardDeviation.Result[index] * 1.5);\n            Line[index] = Bars.ClosePrices[index] + (_standardDeviation.Result[index] * 2);\n            Points[index] = Bars.ClosePrices[index] + (_standardDeviation.Result[index] * 2.5);\n        }\n    }\n}","python":"class PlotTypeSample():\n    def initialize(self):\n        self.standardDeviation = api.Indicators.StandardDeviation(api.Bars.ClosePrices, 20, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        api.DiscontinuousLine[index] = api.Bars.ClosePrices[index] + self.standardDeviation.Result[index]\n        api.Histogram[index] = api.Bars.ClosePrices[index] + (self.standardDeviation.Result[index] * 1.5)\n        api.Line[index] = api.Bars.ClosePrices[index] + (self.standardDeviation.Result[index] * 2)\n        api.Points[index] = api.Bars.ClosePrices[index] + (self.standardDeviation.Result[index] * 2.5)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false,\n  \"LineOutputs\": [\n    {\n      \"Name\": \"DiscontinuousLine\",\n      \"DisplayName\": \"Discontinuous Line\",\n      \"Color\": \"Red\",\n      \"PlotType\": \"DiscontinuousLine\"\n    },\n    {\n      \"Name\": \"Histogram\",\n      \"Color\": \"Green\",\n      \"PlotType\": \"Histogram\"\n    },\n    {\n      \"Name\": \"Line\",\n      \"Color\": \"Blue\",\n      \"PlotType\": \"Line\"\n    },\n    {\n      \"Name\": \"Points\",\n      \"Color\": \"Yellow\",\n      \"PlotType\": \"Points\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PlotType.Line","kind":"enum value","name":"Line","type":"T:cAlgo.API.PlotType","namespace":"cAlgo.API","group":"Indicators","csharp":"PlotType.Line;","python":"PlotType.Line","summary":"Plot Indicator result as a line.","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public override void Calculate(int index)\n{\n    Result[index] = Bars.ClosePrices[index];\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"PlotType\": \"Line\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PlotType.Histogram","kind":"enum value","name":"Histogram","type":"T:cAlgo.API.PlotType","namespace":"cAlgo.API","group":"Indicators","csharp":"PlotType.Histogram;","python":"PlotType.Histogram","summary":"Plot Indicator result as a histogram.","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public override void Calculate(int index)\n{\n    Result[index] = Bars.ClosePrices[index] - Bars.OpenPrices[index];\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"PlotType\": \"Histogram\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PlotType.Points","kind":"enum value","name":"Points","type":"T:cAlgo.API.PlotType","namespace":"cAlgo.API","group":"Indicators","csharp":"PlotType.Points;","python":"PlotType.Points","summary":"Plot Indicator result as a sequence of points.","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public override void Calculate(int index)\n{\n    Result[index] = Bars.HighPrices[index];\n}","python":"def calculate(self, index):\n    api.Result[index] = api.Bars.HighPrices[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"PlotType\": \"Points\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PlotType.DiscontinuousLine","kind":"enum value","name":"DiscontinuousLine","type":"T:cAlgo.API.PlotType","namespace":"cAlgo.API","group":"Indicators","csharp":"PlotType.DiscontinuousLine;","python":"PlotType.DiscontinuousLine","summary":"Plot Indicator result as a line with breaks where there are no values in the IndicatorDataSeries.","remarks":null,"parameters":[],"returns":{"csharpType":"PlotType","pythonType":"PlotType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public override void Calculate(int index)\n{\n    if (Bars.ClosePrices[index] > Bars.OpenPrices[index])\n        Result[index] = Bars.ClosePrices[index];\n}","python":"def calculate(self, index):\n    if api.Bars.ClosePrices[index] > api.Bars.OpenPrices[index]:\n        api.Result[index] = api.Bars.ClosePrices[index]","config":"{\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"PlotType\": \"DiscontinuousLine\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PlotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Plugin","kind":"class","name":"Plugin","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public abstract class Plugin","python":"Plugin","summary":"Base class for Plugins.","remarks":"Contains all necessary data, provides framework for convenient Plugin's creation.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins;\n\npublic partial class MyPlugin : Plugin\n{\n    protected override void OnStart()\n    {\n        var block = Asp.SymbolTab.AddBlock(\"My Plugin\");\n        block.Child = new TextBlock { Text = $\"Account balance: {Account.Balance}\" };\n        Print(\"Plugin started at {0}\", Server.Time);\n    }\n\n    protected override void OnStop()\n    {\n        Print(\"Plugin stopped\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass MyPlugin():\n    def on_start(self):\n        block = api.Asp.SymbolTab.AddBlock(\"My Plugin\")\n        textBlock = TextBlock()\n        textBlock.Text = f\"Account balance: {api.Account.Balance}\"\n        block.Child = textBlock\n        api.Print(f\"Plugin started at {api.Server.Time}\")\n\n    def on_stop(self):\n        api.Print(\"Plugin stopped\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.BeginInvokeOnMainThread(System.Action)","kind":"method","name":"BeginInvokeOnMainThread","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void BeginInvokeOnMainThread(Action action)","python":"api.BeginInvokeOnMainThread(action: Action) -> None","summary":"Invokes asynchronously the specified code on the main Plugin thread.","remarks":null,"parameters":[{"name":"action","csharpType":"Action","pythonType":"Action","summary":"The code to invoke on the main Plugin thread"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Task.Run(() =>\n{\n    var response = Http.Get(\"https://ctrader.com/\");\n    BeginInvokeOnMainThread(() => Print(\"Status code: {0}\", response.StatusCode));\n});","python":"api.BeginInvokeOnMainThread(lambda: api.Print(\"Running on the plugin main thread\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/BeginInvokeOnMainThread/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/BeginInvokeOnMainThread/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.CancelPendingOrder(cAlgo.API.PendingOrder)","kind":"method","name":"CancelPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult CancelPendingOrder(PendingOrder pendingOrder)","python":"api.CancelPendingOrder(pendingOrder: PendingOrder) -> TradeResult","summary":"Cancel a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrder(PendingOrders[0]);","python":"api.CancelPendingOrder(api.PendingOrders[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CancelPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CancelPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.CancelPendingOrderAsync(cAlgo.API.PendingOrder,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"CancelPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation CancelPendingOrderAsync(PendingOrder pendingOrder, Action<TradeResult> callback)","python":"api.CancelPendingOrderAsync(pendingOrder: PendingOrder, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Cancel a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to cancel"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when pending order is cancelled"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrderAsync(PendingOrders[0], result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.CancelPendingOrderAsync(api.PendingOrders[0], lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CancelPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CancelPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePosition(cAlgo.API.Position)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position)","python":"api.ClosePosition(position: Position) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePosition(cAlgo.API.Position,System.Int64)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, long volume)","python":"api.ClosePosition(position: Position, volume: int) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, double volume)","python":"api.ClosePosition(position: Position, volume: float) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePositionAsync(cAlgo.API.Position,System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, long volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ClosePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.CreateDataSeries(System.String,cAlgo.API.TimeFrame)","kind":"method","name":"CreateDataSeries","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public IndicatorDataSeries CreateDataSeries(string symbolName, TimeFrame timeFrame)","python":"api.CreateDataSeries(symbolName: str, timeFrame: TimeFrame) -> IndicatorDataSeries","summary":"Returns a new IndicatorDataSeries.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name"},{"name":"timeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"Timeframe"}],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"IndicatorDataSeries","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Daily, \"EURUSD\");\nvar dailyRange = CreateDataSeries(\"EURUSD\", TimeFrame.Daily);\ndailyRange[bars.Count - 1] = bars.LastBar.High - bars.LastBar.Low;\nPrint(\"Last EURUSD daily range: {0}\", dailyRange.LastValue);","python":"bars = api.MarketData.GetBars(TimeFrame.Daily, \"EURUSD\")\ndailyRange = api.CreateDataSeries(\"EURUSD\", TimeFrame.Daily)\ndailyRange[bars.Count - 1] = bars.LastBar.High - bars.LastBar.Low\napi.Print(f\"Last EURUSD daily range: {dailyRange.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CreateDataSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CreateDataSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Range Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Range Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market range order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market range order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, \"EURUSD\", 10000, 2, api.Symbols.GetSymbol(\"EURUSD\").Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbols.GetSymbol(\"EURUSD\").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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbols.GetSymbol(\"EURUSD\").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), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double volume)","python":"api.ModifyPosition(position: Position, volume: float) -> TradeResult","summary":"Modify the volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss price"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit price"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.OnError(cAlgo.API.Error)","kind":"method","name":"OnError","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnError(Error error)","python":"api.OnError(error: Error) -> None","summary":"Called if there is an error executing a trade operation.","remarks":null,"parameters":[{"name":"error","csharpType":"Error","pythonType":"Error","summary":"Error description."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    Print(\"There has been an Error\");\n}","python":"def on_error(self, error):\n    print(\"There has been an Error\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnError/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.OnException(System.Exception)","kind":"method","name":"OnException","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnException(Exception exception)","python":"api.OnException(exception: Exception) -> None","summary":"Called on each unhandled exception.","remarks":null,"parameters":[{"name":"exception","csharpType":"Exception","pythonType":"Exception","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnException(Exception exception)\n{\n    // Place your exception handling code here\n    Print(exception.Message);\n}","python":"def on_exception(self, exception):\n    # Place your exception handling code here\n    api.Print(exception.Message)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnException/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.OnStart","kind":"method","name":"OnStart","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnStart()","python":"api.OnStart() -> None","summary":"Called when Plugin is being started. Override this method to initialize your Plugin.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    //This method is invoked when the Plugin is started.\n}","python":"def on_start(self):\n    # This method is invoked when the Plugin is started.\n    pass"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnStart/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnStart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.OnStop","kind":"method","name":"OnStop","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnStop()","python":"api.OnStop() -> None","summary":"Called when Plugin is stopped.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStop()\n{\n    // This method is called when the Plugin is stopped\n    Print(\"Plugin stopped at {0}\", Server.Time);\n}","python":"def on_stop(self):\n    # This method is called when the Plugin is stopped\n    api.Print(f\"Plugin stopped at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.OnTimer","kind":"method","name":"OnTimer","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"protected void OnTimer()","python":"api.OnTimer() -> None","summary":"Called when the timer interval has elapsed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private int _ticks;\n\nprotected override void OnStart()\n{\n    Timer.Start(1);\n}\n\nprotected override void OnTimer()\n{\n    _ticks++;\n    Print(\"Timer tick {0} at {1}\", _ticks, Server.Time);\n    if (_ticks == 10)\n        Timer.Stop();\n}","python":"def on_start(self):\n    self.ticks = 0\n    api.Timer.Start(1)\n\ndef on_timer(self):\n    self.ticks += 1\n    api.Print(f\"Timer tick {self.ticks} at {api.Server.Time}\")\n    if self.ticks == 10:\n        api.Timer.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnTimer/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/OnTimer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 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));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 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));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 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));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 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), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Print(System.Object)","kind":"method","name":"Print","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Print(object value)","python":"api.Print(value: object) -> None","summary":"Prints text representation of the specified object to the log.","remarks":null,"parameters":[{"name":"value","csharpType":"object","pythonType":"object","summary":"Object to print."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(Positions.Count);","python":"api.Print(api.Positions.Count)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Print(System.Object[])","kind":"method","name":"Print","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Print(object[] parameters)","python":"api.Print(parameters: list[object]) -> None","summary":"Prints a message to the Log","remarks":null,"parameters":[{"name":"parameters","csharpType":"object[]","pythonType":"list[object]","summary":"Parameters to print"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(Account.Balance, \" \", Account.Equity);","python":"api.Print(api.Account.Balance, \" \", api.Account.Equity)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Print(System.String,System.Object[])","kind":"method","name":"Print","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Print(string message, object[] parameters)","python":"api.Print(message: str, parameters: list[object]) -> None","summary":"Prints a message to the Log.","remarks":null,"parameters":[{"name":"message","csharpType":"string","pythonType":"str","summary":"Message to print."},{"name":"parameters","csharpType":"object[]","pythonType":"list[object]","summary":"Parameters (optional)"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current Balance is {0}, Equity is {1}.\", Account.Balance, Account.Equity);","python":"api.Print(f\"Current Balance is {api.Account.Balance}, Equity is {api.Account.Equity}.\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Print/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.RefreshData","kind":"method","name":"RefreshData","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void RefreshData()","python":"api.RefreshData() -> None","summary":"Updates Bars, Positions, PendingOrders, History, etc. And sends postponed events after Thread sleep call. If you put the main thread on sleep by calling Thread sleep method then you have to call RefreshData after Thread wakes up to send the postponed events while thread was sleeping.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var operation = ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000);\nwhile (operation.IsExecuting)\n{\n    Sleep(100);\n    // Without RefreshData the trade result and events are not delivered while waiting\n    RefreshData();\n}\nPrint(\"Order executed: {0}\", operation.TradeResult.IsSuccessful);","python":"operation = api.ExecuteMarketOrderAsync(TradeType.Buy, \"EURUSD\", 10000)\nwhile operation.IsExecuting:\n    api.Sleep(100)\n    # Without RefreshData the trade result and events are not delivered while waiting\n    api.RefreshData()\napi.Print(f\"Order executed: {operation.TradeResult.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/RefreshData/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/RefreshData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ReversePosition(cAlgo.API.Position)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position)","python":"api.ReversePosition(position: Position) -> TradeResult","summary":"Modify the direction of trade at position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0]);","python":"api.ReversePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ReversePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position, double volume)","python":"api.ReversePosition(position: Position, volume: float) -> TradeResult","summary":"Modify the direction of trade and volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0], 10000);","python":"api.ReversePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ReversePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to reverse"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ReversePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], 10000, result => Print(\"Trade result: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade result: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Sleep(System.TimeSpan)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Sleep(TimeSpan timespan)","python":"api.Sleep(timespan: TimeSpan) -> None","summary":"Suspends the plugin until the specified timespan elapses.","remarks":null,"parameters":[{"name":"timespan","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"The Timespan during which the plugin should not react to any events."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Waiting 2 seconds\");\nSleep(TimeSpan.FromSeconds(2));\nRefreshData();\nPrint(\"Resumed at {0}\", Server.Time);","python":"from System import TimeSpan\napi.Print(\"Waiting 2 seconds\")\napi.Sleep(TimeSpan.FromSeconds(2))\napi.RefreshData()\napi.Print(f\"Resumed at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Sleep(System.Int32)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Sleep(int milliseconds)","python":"api.Sleep(milliseconds: int) -> None","summary":"Suspends the plugin until the specified number of milliseconds elapses.","remarks":null,"parameters":[{"name":"milliseconds","csharpType":"int","pythonType":"int","summary":"The number of milliseconds for which the plugin should be suspended."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Sleep(500);\nRefreshData();\nPrint(\"Resumed after 500 ms at {0}\", Server.Time);","python":"api.Sleep(500)\napi.RefreshData()\napi.Print(f\"Resumed after 500 ms at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.Sleep(System.DateTime)","kind":"method","name":"Sleep","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public void Sleep(DateTime dateTime)","python":"api.Sleep(dateTime: DateTime) -> None","summary":"Suspends the plugin until the specified datetime .","remarks":null,"parameters":[{"name":"dateTime","csharpType":"DateTime","pythonType":"DateTime","summary":"The DateTime until the plugin should be suspended."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var resumeTime = Server.Time.AddSeconds(5);\nSleep(resumeTime);\nRefreshData();\nPrint(\"Resumed at {0}\", Server.Time);","python":"resumeTime = api.Server.Time.AddSeconds(5)\napi.Sleep(resumeTime)\napi.RefreshData()\napi.Print(f\"Resumed at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Sleep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Account","kind":"property","name":"Account","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public IAccount Account {get;}","python":"api.Account: IAccount","summary":"Contains all Account information","remarks":null,"parameters":[],"returns":{"csharpType":"IAccount","pythonType":"IAccount","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Balance: {0} {1}\", Account.Balance, Account.Asset.Name);\nPrint(\"Equity: {0}, free margin: {1}\", Account.Equity, Account.FreeMargin);\nPrint(\"Margin: {0}, margin level: {1}, leverage: {2}\", Account.Margin, Account.MarginLevel, Account.PreciseLeverage);","python":"api.Print(f\"Balance: {api.Account.Balance} {api.Account.Asset.Name}\")\napi.Print(f\"Equity: {api.Account.Equity}, free margin: {api.Account.FreeMargin}\")\napi.Print(f\"Margin: {api.Account.Margin}, margin level: {api.Account.MarginLevel}, leverage: {api.Account.PreciseLeverage}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Account/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Account/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.AlgoRegistry","kind":"property","name":"AlgoRegistry","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public AlgoRegistry AlgoRegistry {get;}","python":"api.AlgoRegistry: AlgoRegistry","summary":"Provides access to installed Algorithms.","remarks":null,"parameters":[],"returns":{"csharpType":"AlgoRegistry","pythonType":"AlgoRegistry","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Installed algos: {0}, cBots: {1}\", AlgoRegistry.Count, AlgoRegistry.GetCount(AlgoKind.Robot));\nif (AlgoRegistry.Exists(\"Sample Trend cBot\", AlgoKind.Robot))\n    Print(\"Sample Trend cBot is installed\");","python":"api.Print(f\"Installed algos: {api.AlgoRegistry.Count}, cBots: {api.AlgoRegistry.GetCount(AlgoKind.Robot)}\")\nif api.AlgoRegistry.Exists(\"Sample Trend cBot\", AlgoKind.Robot):\n    api.Print(\"Sample Trend cBot is installed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/AlgoRegistry/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/AlgoRegistry/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Application","kind":"property","name":"Application","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Application Application {get;}","python":"api.Application: Application","summary":"Represents the application.","remarks":null,"parameters":[],"returns":{"csharpType":"Application","pythonType":"Application","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"cTrader version: {0}, color theme: {1}\", Application.Version, Application.ColorTheme);","python":"api.Print(f\"cTrader version: {api.Application.Version}, color theme: {api.Application.ColorTheme}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Application/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Application/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Asp","kind":"property","name":"Asp","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Asp Asp {get;}","python":"api.Asp: Asp","summary":"Gets the active symbol panel.","remarks":null,"parameters":[],"returns":{"csharpType":"Asp","pythonType":"Asp","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var block = Asp.SymbolTab.AddBlock(\"My Block\");\nblock.Child = new TextBlock { Text = \"Hello from my plugin\" };\nPrint(\"Active symbol panel symbol: {0}\", Asp.SymbolTab.Symbol.Name);","python":"block = api.Asp.SymbolTab.AddBlock(\"My Block\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\nblock.Child = textBlock\napi.Print(f\"Active symbol panel symbol: {api.Asp.SymbolTab.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Asp/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Asp/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.AssetConverter","kind":"property","name":"AssetConverter","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public IAssetConverter AssetConverter {get;}","python":"api.AssetConverter: IAssetConverter","summary":"Converts an asset to another asset.","remarks":null,"parameters":[],"returns":{"csharpType":"IAssetConverter","pythonType":"IAssetConverter","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var balanceInUsd = AssetConverter.Convert(Account.Balance, Account.Asset, \"USD\");\nPrint(\"Account balance in USD: {0}\", balanceInUsd);","python":"balanceInUsd = api.AssetConverter.Convert(api.Account.Balance, api.Account.Asset, \"USD\")\napi.Print(f\"Account balance in USD: {balanceInUsd}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/AssetConverter/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/AssetConverter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Assets","kind":"property","name":"Assets","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Assets Assets {get;}","python":"api.Assets: Assets","summary":"Returns list of all available assets.","remarks":null,"parameters":[],"returns":{"csharpType":"Assets","pythonType":"Assets","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Available assets: {0}\", Assets.Count);\nif (Assets.Exists(\"USD\"))\n    Print(\"Found asset {0}\", Assets.GetAsset(\"USD\").Name);","python":"api.Print(f\"Available assets: {api.Assets.Count}\")\nif api.Assets.Exists(\"USD\"):\n    api.Print(f\"Found asset {api.Assets.GetAsset('USD').Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Assets/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Assets/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Backtesting","kind":"property","name":"Backtesting","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Backtesting Backtesting {get;}","python":"api.Backtesting: Backtesting","summary":"Provides access to cBot backtesting from plugins, including custom backtesting data sources.","remarks":null,"parameters":[],"returns":{"csharpType":"Backtesting","pythonType":"Backtesting","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n    return;\nvar settings = new BacktestingSettings { StartTimeUtc = new DateTime(2025, 1, 1), EndTimeUtc = new DateTime(2025, 2, 1), Balance = 10000 };\nvar process = Backtesting.Start(robotType, \"EURUSD\", TimeFrame.Hour, settings);\nprocess.Completed += args => Print(\"Backtesting completed, error: {0}\", args.Process.BacktestingError);","python":"from System import DateTime\nalgoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\nif algoType is None:\n    return\nsettings = BacktestingSettings()\nsettings.StartTimeUtc = DateTime(2025, 1, 1)\nsettings.EndTimeUtc = DateTime(2025, 2, 1)\nsettings.Balance = 10000\nprocess = api.Backtesting.Start(RobotType(algoType), \"EURUSD\", TimeFrame.Hour, settings)\nprocess.Completed += lambda args: api.Print(f\"Backtesting completed, error: {args.Process.BacktestingError}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Backtesting/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Backtesting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.ChartManager","kind":"property","name":"ChartManager","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public ChartManager ChartManager {get;}","python":"api.ChartManager: ChartManager","summary":"Returns chart manager.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartManager","pythonType":"ChartManager","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var chartFrame = ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour);\nPrint(\"Open frames: {0}, new chart symbol: {1}\", ChartManager.Count, chartFrame.Symbol.Name);","python":"chartFrame = api.ChartManager.AddChartFrame(\"EURUSD\", TimeFrame.Hour)\napi.Print(f\"Open frames: {api.ChartManager.Count}, new chart symbol: {chartFrame.Symbol.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ChartManager/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ChartManager/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.ChartTemplates","kind":"property","name":"ChartTemplates","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public ChartTemplates ChartTemplates {get;}","python":"api.ChartTemplates: ChartTemplates","summary":"Provides access to Chart Templates.","remarks":null,"parameters":[],"returns":{"csharpType":"ChartTemplates","pythonType":"ChartTemplates","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"Print(\"Default chart template: {0}\", ChartTemplates.DefaultTemplate.Name);\nif (!ChartTemplates.Contains(\"My Template\"))\n    ChartTemplates.Create(\"My Template\");","python":"api.Print(f\"Default chart template: {api.ChartTemplates.DefaultTemplate.Name}\")\nif not api.ChartTemplates.Contains(\"My Template\"):\n    api.ChartTemplates.Create(\"My Template\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ChartTemplates/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/ChartTemplates/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Clipboard","kind":"property","name":"Clipboard","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Clipboard Clipboard {get;}","python":"api.Clipboard: Clipboard","summary":"Provides access to system Clipboard.","remarks":null,"parameters":[],"returns":{"csharpType":"Clipboard","pythonType":"Clipboard","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"Clipboard.SetText(\"EURUSD\");\nPrint(\"Clipboard text: {0}\", Clipboard.GetText());","python":"api.Clipboard.SetText(\"EURUSD\")\napi.Print(f\"Clipboard text: {api.Clipboard.GetText()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Clipboard/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Clipboard/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Commands","kind":"property","name":"Commands","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Commands Commands {get;}","python":"api.Commands: Commands","summary":"Provides access to commands.","remarks":null,"parameters":[],"returns":{"csharpType":"Commands","pythonType":"Commands","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print(\"Command {0} executed\", args.Command.Id));\ncommand.ToolTip = \"Run my plugin command\";","python":"from System import Action\ncommand = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(f\"Command {args.Command.Id} executed\")))\ncommand.ToolTip = \"Run my plugin command\""}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Commands/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Commands/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Compiler","kind":"property","name":"Compiler","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Compiler Compiler {get;}","python":"api.Compiler: Compiler","summary":"Provides access to algo compiler.","remarks":null,"parameters":[],"returns":{"csharpType":"Compiler","pythonType":"Compiler","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = Compiler.Compile(@\"C:\\Users\\Me\\Documents\\cAlgo\\Sources\\Robots\\MyBot\\MyBot.csproj\");\nPrint(\"Compilation succeeded: {0}\", result.Succeeded);\nforeach (var error in result.Errors)\n    Print(error);","python":"result = api.Compiler.Compile(r\"C:\\Users\\Me\\Documents\\cAlgo\\Sources\\Robots\\MyBot\\MyBot.csproj\")\napi.Print(f\"Compilation succeeded: {result.Succeeded}\")\nfor error in result.Errors:\n    api.Print(error)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Compiler/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Compiler/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.CustomSymbols","kind":"property","name":"CustomSymbols","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public CustomSymbols CustomSymbols {get;}","python":"api.CustomSymbols: CustomSymbols","summary":"Provides access to custom symbols API.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomSymbols","pythonType":"CustomSymbols","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customSymbol = CustomSymbols.Get(\"MYEURUSD\") ?? CustomSymbols.Add(\"MYEURUSD\", Symbols.GetSymbol(\"EURUSD\"));\nPrint(\"Custom symbol {0} with ID {1}\", customSymbol.Name, customSymbol.Id);","python":"customSymbol = api.CustomSymbols.Get(\"MYEURUSD\")\nif customSymbol is None:\n    customSymbol = api.CustomSymbols.Add(\"MYEURUSD\", api.Symbols.GetSymbol(\"EURUSD\"))\napi.Print(f\"Custom symbol {customSymbol.Name} with ID {customSymbol.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CustomSymbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/CustomSymbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.FileAssociations","kind":"property","name":"FileAssociations","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public FileAssociations FileAssociations {get;}","python":"api.FileAssociations: FileAssociations","summary":"Provides access to file associations.","remarks":null,"parameters":[],"returns":{"csharpType":"FileAssociations","pythonType":"FileAssociations","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"FileAssociations.Add(\".mydata\");\nFileAssociations.FileOpened += args => Print(\"Opened file: {0}\", args.FilePath);","python":"api.FileAssociations.Add(\".mydata\")\napi.FileAssociations.FileOpened += lambda args: api.Print(f\"Opened file: {args.FilePath}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/FileAssociations/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/FileAssociations/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.HistoricalOrders","kind":"property","name":"HistoricalOrders","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public HistoricalOrders HistoricalOrders {get;}","python":"api.HistoricalOrders: HistoricalOrders","summary":"Provides access to historical orders.","remarks":null,"parameters":[],"returns":{"csharpType":"HistoricalOrders","pythonType":"HistoricalOrders","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"Print(\"Historical orders: {0}\", HistoricalOrders.Count);\nvar lastOrder = HistoricalOrders.FindLast(\"MyLabel\");\nif (lastOrder != null)\n    Print(\"Last order {0} {1} submitted at {2}\", lastOrder.Id, lastOrder.SymbolName, lastOrder.SubmittedTime);","python":"api.Print(f\"Historical orders: {api.HistoricalOrders.Count}\")\nlastOrder = api.HistoricalOrders.FindLast(\"MyLabel\")\nif lastOrder is not None:\n    api.Print(f\"Last order {lastOrder.Id} {lastOrder.SymbolName} submitted at {lastOrder.SubmittedTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/HistoricalOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/HistoricalOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.History","kind":"property","name":"History","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public History History {get;}","python":"api.History: History","summary":"Represents the collection of all historical trades of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"History","pythonType":"History","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (HistoricalTrade trade in History)\n{\n    Print(trade.EntryTime);\n}","python":"for trade in api.History:\n    print(trade.EntryTime)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/History/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/History/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Hotkeys","kind":"property","name":"Hotkeys","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Hotkeys Hotkeys {get;}","python":"api.Hotkeys: Hotkeys","summary":"Provides access to hotkeys API.","remarks":null,"parameters":[],"returns":{"csharpType":"Hotkeys","pythonType":"Hotkeys","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"var isAdded = Hotkeys.TryAdd(Key.B, ModifierKeys.Control, args => Print(\"Hotkey {0}+{1} pressed\", args.Modifiers, args.Key));\nPrint(\"Hotkey added: {0}\", isAdded);","python":"from System import Action\nisAdded = api.Hotkeys.TryAdd(Key.B, ModifierKeys.Control, Action[HotkeyArgs](lambda args: api.Print(f\"Hotkey {args.Modifiers}+{args.Key} pressed\")))\napi.Print(f\"Hotkey added: {isAdded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Hotkeys/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Hotkeys/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Http","kind":"property","name":"Http","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Http Http {get;}","python":"api.Http: Http","summary":"Send HTTP requests.","remarks":null,"parameters":[],"returns":{"csharpType":"Http","pythonType":"Http","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var response = Http.Get(\"https://ctrader.com/\");\nif (response.IsSuccessful)\n    Print(\"Received {0} characters\", response.Body.Length);\nelse\n    Print(\"Request failed with status code {0}\", response.StatusCode);","python":"response = api.Http.Get(\"https://ctrader.com/\")\nif response.IsSuccessful:\n    api.Print(f\"Received {len(response.Body)} characters\")\nelse:\n    api.Print(f\"Request failed with status code {response.StatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Http/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Http/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Indicators","kind":"property","name":"Indicators","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public IIndicatorsAccessor Indicators {get;}","python":"api.Indicators: IIndicatorsAccessor","summary":"Access to the built-in Indicators.","remarks":null,"parameters":[],"returns":{"csharpType":"IIndicatorsAccessor","pythonType":"IIndicatorsAccessor","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\nvar sma = Indicators.SimpleMovingAverage(bars.ClosePrices, 20);\nPrint(\"EURUSD H1 SMA(20): {0}\", sma.Result.LastValue);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\nsma = api.Indicators.SimpleMovingAverage(bars.ClosePrices, 20)\napi.Print(f\"EURUSD H1 SMA(20): {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Indicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Indicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.LastResult","kind":"property","name":"LastResult","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult LastResult {get;}","python":"api.LastResult: TradeResult","summary":"The latest trade result","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"MyLabel\");\nif (LastResult.IsSuccessful)\n    Print(\"Position {0} opened at {1}\", LastResult.Position.Id, LastResult.Position.EntryPrice);\nelse\n    Print(\"Order failed: {0}\", LastResult.Error);","python":"api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"MyLabel\")\nif api.LastResult.IsSuccessful:\n    api.Print(f\"Position {api.LastResult.Position.Id} opened at {api.LastResult.Position.EntryPrice}\")\nelse:\n    api.Print(f\"Order failed: {api.LastResult.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/LastResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/LastResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.LocalStorage","kind":"property","name":"LocalStorage","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public LocalStorage LocalStorage {get;}","python":"api.LocalStorage: LocalStorage","summary":"Access the local storage API.","remarks":null,"parameters":[],"returns":{"csharpType":"LocalStorage","pythonType":"LocalStorage","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"LocalStorage.SetString(\"LastStart\", Server.Time.ToString(\"O\"), LocalStorageScope.Device);\nLocalStorage.Flush(LocalStorageScope.Device);\nPrint(\"Last start: {0}\", LocalStorage.GetString(\"LastStart\", LocalStorageScope.Device));","python":"api.LocalStorage.SetString(\"LastStart\", api.Server.Time.ToString(\"O\"), LocalStorageScope.Device)\napi.LocalStorage.Flush(LocalStorageScope.Device)\napi.Print(f\"Last start: {api.LocalStorage.GetString('LastStart', LocalStorageScope.Device)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/LocalStorage/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/LocalStorage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.MainMenu","kind":"property","name":"MainMenu","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public MainMenu MainMenu {get;}","python":"api.MainMenu: MainMenu","summary":"Provides access to main menu API.","remarks":null,"parameters":[],"returns":{"csharpType":"MainMenu","pythonType":"MainMenu","summary":"","nullable":false},"exceptions":[],"since":"5.4","deprecated":null,"examples":[{"csharp":"Print(\"Main menu expanded: {0}\", MainMenu.IsExpanded);\nvar algoItem = MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Algo);\nif (algoItem != null)\n    MainMenu.TryChangeSelectedItem(algoItem);","python":"api.Print(f\"Main menu expanded: {api.MainMenu.IsExpanded}\")\nalgoItem = api.MainMenu.GetBuiltInItem(MainMenuBuiltInItemType.Algo)\nif algoItem is not None:\n    api.MainMenu.TryChangeSelectedItem(algoItem)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MainMenu/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MainMenu/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.MarketData","kind":"property","name":"MarketData","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public MarketData MarketData {get;}","python":"api.MarketData: MarketData","summary":"Provides access to Market Data.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketData","pythonType":"MarketData","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour, \"EURUSD\");\nPrint(\"EURUSD H1 bars: {0}, last close: {1}\", bars.Count, bars.LastBar.Close);\nvar marketDepth = MarketData.GetMarketDepth(\"GBPUSD\");","python":"bars = api.MarketData.GetBars(TimeFrame.Hour, \"EURUSD\")\napi.Print(f\"EURUSD H1 bars: {bars.Count}, last close: {bars.LastBar.Close}\")\nmarketDepth = api.MarketData.GetMarketDepth(\"GBPUSD\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketData/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketData/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.MarketSessions","kind":"property","name":"MarketSessions","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public MarketSession MarketSessions {get;}","python":"api.MarketSessions: MarketSession","summary":"Returns current market sessions.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketSession","pythonType":"MarketSession","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current market sessions: {0}\", MarketSessions);","python":"api.Print(f\"Current market sessions: {api.MarketSessions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketSessions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketSessions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Messages","kind":"property","name":"Messages","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Messages Messages {get;}","python":"api.Messages: Messages","summary":"Access the messaging API.","remarks":null,"parameters":[],"returns":{"csharpType":"Messages","pythonType":"Messages","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Messages.Subscribe<string>(\"signals\", args => Print(\"Received signal: {0}\", args.Message));\nMessages.Send(\"signals\", \"EURUSD buy\");","python":"# Not available in Python: Subscribe needs a generic message type argument, sending works with an inferred type\napi.Messages.Send(\"signals\", \"EURUSD buy\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Messages/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Messages/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Notifications","kind":"property","name":"Notifications","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public INotifications Notifications {get;}","python":"api.Notifications: INotifications","summary":"Represents the notifications, such as sounds and email.","remarks":null,"parameters":[],"returns":{"csharpType":"INotifications","pythonType":"INotifications","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Notifications.PlaySound(@\"C:\\Windows\\Media\\notify.wav\");","python":"api.Notifications.PlaySound(r\"C:\\Windows\\Media\\notify.wav\")"},{"csharp":"var emailBody = \"this is the message send\";\nNotifications.SendEmail(\"from@example.com\", \"to@example.com\", \"my subject\", emailBody);","python":"api.Notifications.SendEmail(\"from@example.com\", \"to@example.com\", \"my subject\", \"this is the message send\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Notifications/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Notifications/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Optimization","kind":"property","name":"Optimization","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Optimization Optimization {get;}","python":"api.Optimization: Optimization","summary":"Provides access to cBot parameter optimization.","remarks":null,"parameters":[],"returns":{"csharpType":"Optimization","pythonType":"Optimization","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Plugins\n{\n    public partial class Test : Plugin\n    {\n        protected override void OnStart()\n        {\n            if (AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot) is not RobotType robotType)\n                return;\n\n            var settings = new OptimizationSettings(\n                new DateTime(2025, 1, 1), new DateTime(2025, 2, 1), 100000,\n                new[] { new OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize) })\n            {\n                DataMode = BacktestingDataMode.M1,\n                Method = OptimizationMethod.Grid\n            };\n\n            var process = Optimization.Start(\n                robotType, \"EURUSD\", TimeFrame.Hour, settings,\n                new OptimizationIntegerParameter(\"SlowPeriods\", min: 5, max: 50, step: 5));\n\n            process.Completed += args => Print($\"Optimization completed. Best pass: {args.BestPass?.Id}\");\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import DateTime\n\nclass Test():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(\"Sample Trend cBot\", AlgoKind.Robot)\n        if algoType is None:\n            return\n\n        robotType = RobotType(algoType)\n\n        criteria = [OptimizationCriterion(OptimizationCriterionType.NetProfit, OptimizationCriterionDirection.Maximize)]\n        settings = OptimizationSettings(DateTime(2025, 1, 1), DateTime(2025, 2, 1), 100000, criteria)\n        settings.DataMode = BacktestingDataMode.M1\n        settings.Method = OptimizationMethod.Grid\n\n        process = api.Optimization.Start(\n            robotType, \"EURUSD\", TimeFrame.Hour, settings,\n            OptimizationIntegerParameter(\"SlowPeriods\", 5, 50, 5))\n\n        process.Completed += lambda args: print(f\"Optimization completed\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Optimization/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Optimization/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.PendingOrders","kind":"property","name":"PendingOrders","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public PendingOrders PendingOrders {get;}","python":"api.PendingOrders: PendingOrders","summary":"The array of all Pending Orders of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrders","pythonType":"PendingOrders","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var order in PendingOrders)\n{\n    if (order.StopLossPips == null)\n        ModifyPendingOrder(order, order.TargetPrice, 10, order.TakeProfitPips, ProtectionType.Relative, order.ExpirationTime);\n}","python":"for order in api.PendingOrders:\n    if order.StopLossPips is None:\n        api.ModifyPendingOrder(order, order.TargetPrice, 10, order.TakeProfitPips, ProtectionType.Relative, order.ExpirationTime)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PendingOrders/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PendingOrders/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Permissions","kind":"property","name":"Permissions","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Permissions Permissions {get;}","python":"api.Permissions: Permissions","summary":"Contains all Permissions information","remarks":null,"parameters":[],"returns":{"csharpType":"Permissions","pythonType":"Permissions","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Trading permission: {0}\", Permissions.TradingPermission);\nPrint(\"Clipboard permission: {0}\", Permissions.ClipboardPermission);","python":"api.Print(f\"Trading permission: {api.Permissions.TradingPermission}\")\napi.Print(f\"Clipboard permission: {api.Permissions.ClipboardPermission}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Permissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Permissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Positions","kind":"property","name":"Positions","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Positions Positions {get;}","python":"api.Positions: Positions","summary":"The list of all open positions of the account.","remarks":null,"parameters":[],"returns":{"csharpType":"Positions","pythonType":"Positions","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    if (position.StopLoss == null)\n        ModifyPosition(position, 10, 20, ProtectionType.Relative);\n}","python":"for position in api.Positions:\n    if position.StopLoss is None:\n        api.ModifyPosition(position, 10, 20, ProtectionType.Relative)"},{"csharp":"var position = Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Sell);\nif (position != null)\n    Print(\"Found position {0} with net profit {1}\", position.Id, position.NetProfit);","python":"position = api.Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Sell)\nif position is not None:\n    api.Print(f\"Found position {position.Id} with net profit {position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.PriceAlerts","kind":"property","name":"PriceAlerts","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public PriceAlerts PriceAlerts {get;}","python":"api.PriceAlerts: PriceAlerts","summary":"Provides access to Price Alerts.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlerts","pythonType":"PriceAlerts","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Price alerts: {0}\", PriceAlerts.Count);\nforeach (var priceAlert in PriceAlerts.FindAll(\"EURUSD\"))\n    Print(\"EURUSD alert {0} at {1} ({2})\", priceAlert.Id, priceAlert.Price, priceAlert.Condition);","python":"api.Print(f\"Price alerts: {api.PriceAlerts.Count}\")\nfor priceAlert in api.PriceAlerts.FindAll(\"EURUSD\"):\n    api.Print(f\"EURUSD alert {priceAlert.Id} at {priceAlert.Price} ({priceAlert.Condition})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PriceAlerts/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/PriceAlerts/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Server","kind":"property","name":"Server","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public IServer Server {get;}","python":"api.Server: IServer","summary":"Server related information.","remarks":null,"parameters":[],"returns":{"csharpType":"IServer","pythonType":"IServer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print($\"The server time is: {Server.Time}\");","python":"print(f\"The server time is: {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Server/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Server/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Symbols","kind":"property","name":"Symbols","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Symbols Symbols {get;}","python":"api.Symbols: Symbols","summary":"Gets the symbol names.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbols","pythonType":"Symbols","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbol = Symbols.GetSymbol(\"EURUSD\");\nif (symbol != null)\n    Print(\"{0} bid: {1}, ask: {2}\", symbol.Name, symbol.Bid, symbol.Ask);\nPrint(\"Available symbols: {0}\", Symbols.Count);","python":"symbol = api.Symbols.GetSymbol(\"EURUSD\")\nif symbol is not None:\n    api.Print(f\"{symbol.Name} bid: {symbol.Bid}, ask: {symbol.Ask}\")\napi.Print(f\"Available symbols: {api.Symbols.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Symbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Symbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Time","kind":"property","name":"Time","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public DateTime Time {get;}","python":"api.Time: DateTime","summary":"Returns the current server time. The shortcut to the Server.Time property.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The Server Time is: {0}\", Time);","python":"print(f\"The Server Time is: {api.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.TimeFrameManager","kind":"property","name":"TimeFrameManager","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TimeFrameManager TimeFrameManager {get;}","python":"api.TimeFrameManager: TimeFrameManager","summary":"Provides access to TimeFrames API.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrameManager","pythonType":"TimeFrameManager","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"TimeFrameManager.Favorite.Add(TimeFrame.Hour4);\nvar customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\") ?? TimeFrameManager.Custom.Add(\"My Custom TF\");\nPrint(\"Custom time frame: {0}\", customTimeFrame.Name);","python":"api.TimeFrameManager.Favorite.Add(TimeFrame.Hour4)\ncustomTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is None:\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\napi.Print(f\"Custom time frame: {customTimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeFrameManager/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeFrameManager/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TimeFrames TimeFrames {get;}","python":"api.TimeFrames: TimeFrames","summary":"Gets collection of available TimeFrames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrames","pythonType":"TimeFrames","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var timeFrame in TimeFrames)\n    Print(\"Time frame: {0}\", timeFrame.Name);","python":"for timeFrame in api.TimeFrames:\n    api.Print(f\"Time frame: {timeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.TimeInUtc","kind":"property","name":"TimeInUtc","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public DateTime TimeInUtc {get;}","python":"api.TimeInUtc: DateTime","summary":"Returns the current server time in UTC. The shortcut to the Server.TimeInUtc property.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"The Server Time in UTC is: {0}\", TimeInUtc);","python":"api.Print(f\"The Server Time in UTC is: {api.TimeInUtc}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeInUtc/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeInUtc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.TimeZone","kind":"property","name":"TimeZone","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TimeZoneInfo TimeZone {get;}","python":"api.TimeZone: TimeZoneInfo","summary":"TimeZone of a Plugin.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeZoneInfo","pythonType":"TimeZoneInfo","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Plugin time zone: {0}, UTC offset: {1}\", TimeZone.DisplayName, TimeZone.BaseUtcOffset);","python":"api.Print(f\"Plugin time zone: {api.TimeZone.DisplayName}, UTC offset: {api.TimeZone.BaseUtcOffset}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Timer","kind":"property","name":"Timer","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Timer Timer {get;}","python":"api.Timer: Timer","summary":"Access to the Timer object.","remarks":null,"parameters":[],"returns":{"csharpType":"Timer","pythonType":"Timer","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(1);\n}\n\nprotected override void OnTimer()\n{\n    Print(\"Server time: {0:HH:mm:ss}\", Server.Time);\n}","python":"def on_start(self):\n    api.Timer.Start(1)\n\ndef on_timer(self):\n    api.Print(f\"Server time: {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Timer/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Timer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.TradeWatch","kind":"property","name":"TradeWatch","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeWatch TradeWatch {get;}","python":"api.TradeWatch: TradeWatch","summary":"Gets the Trade Watch panel.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatch","pythonType":"TradeWatch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.Child = new TextBlock { Text = \"Hello from my plugin\" };\ntab.IsSelected = true;\nPrint(\"Trade watch is visible: {0}\", TradeWatch.IsVisible);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\ntab.Child = textBlock\ntab.IsSelected = True\napi.Print(f\"Trade watch is visible: {api.TradeWatch.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TradeWatch/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/TradeWatch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Transactions","kind":"property","name":"Transactions","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Transactions Transactions {get;}","python":"api.Transactions: Transactions","summary":"Access account transactions.","remarks":null,"parameters":[],"returns":{"csharpType":"Transactions","pythonType":"Transactions","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Transactions: {0}\", Transactions.Count);\nforeach (var transaction in Transactions)\n    Print(\"{0} {1} {2}\", transaction.Time, transaction.Type, transaction.Amount);","python":"api.Print(f\"Transactions: {api.Transactions.Count}\")\nfor transaction in api.Transactions:\n    api.Print(f\"{transaction.Time} {transaction.Type} {transaction.Amount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Transactions/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Transactions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"P:cAlgo.API.Plugin.Watchlists","kind":"property","name":"Watchlists","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public Watchlists Watchlists {get;}","python":"api.Watchlists: Watchlists","summary":"Gets the watchlist.","remarks":"Watchlists","parameters":[],"returns":{"csharpType":"Watchlists","pythonType":"Watchlists","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var watchlist in Watchlists)\n    Print(\"{0}: {1}\", watchlist.Name, string.Join(\", \", watchlist.SymbolNames));","python":"for watchlist in api.Watchlists:\n    api.Print(f\"{watchlist.Name}: {', '.join(watchlist.SymbolNames)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Watchlists/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/Watchlists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"E:cAlgo.API.Plugin.MarketSessionsChanged","kind":"event","name":"MarketSessionsChanged","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public event Action<MarketSessionChangedEventArgs> MarketSessionsChanged;","python":"api.MarketSessionsChanged += handler  # handler(obj: MarketSessionChangedEventArgs)","summary":"Occurs when market sessions change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<MarketSessionChangedEventArgs>","pythonType":"Callable[[MarketSessionChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    MarketSessionsChanged += OnMarketSessionsChanged;\n}\n\nprivate void OnMarketSessionsChanged(MarketSessionChangedEventArgs args)\n{\n    Print(\"Market sessions changed from {0} to {1}\", args.PreviousSessions, args.NewSessions);\n}","python":"def on_start(self):\n    api.MarketSessionsChanged += self.on_market_sessions_changed\n\ndef on_market_sessions_changed(self, args):\n    api.Print(f\"Market sessions changed from {args.PreviousSessions} to {args.NewSessions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketSessionsChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/MarketSessionsChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"M:cAlgo.API.Plugin.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Plugin","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Plugins cannot run in the CLI: ctrader-cli runs cBots only."},{"name":"Cloud","support":"None","behaviour":"Plugins cannot run in the cloud: it runs cBots only."}]}
{"id":"T:cAlgo.API.PluginAttribute","kind":"class","name":"PluginAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class PluginAttribute : Attribute","python":"PluginAttribute","summary":"Sealed class PluginAttribute.","remarks":"Marks a class as a Plugin. The Plugin attribute cannot be omitted.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Plugins\n{\n    // config.json declares the plugin settings, the class holds only the code\n    public partial class PluginAttributeSample : Plugin\n    {\n        protected override void OnStart()\n        {\n            Print(\"Plugin started, time zone: {0}\", TimeZone.DisplayName);\n        }\n    }\n}","python":"class PluginAttributeSample():\n    def on_start(self):\n        api.Print(f\"Plugin started, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PluginAttribute.#ctor","kind":"constructor","name":"PluginAttribute","type":"T:cAlgo.API.PluginAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public PluginAttribute()","python":"PluginAttribute()","summary":"Initializes a new PluginAttribute instance.","remarks":"To make it effective apply enclosed in square brackets, e.g. [Plugin], in front of the Plugin class declaration.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NewPlugin : Plugin\n{\n    protected override void OnStart()\n    {\n        Print(\"Plugin started\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"Plugin started\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PluginAttribute.AccessRights","kind":"property","name":"AccessRights","type":"T:cAlgo.API.PluginAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public AccessRights AccessRights {get; set;}","python":"pluginAttribute.AccessRights: AccessRights","summary":"Gets or sets the access rights required for the Plugin.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NewPlugin : Plugin\n{\n    protected override void OnStart()\n    {\n        Print(\"Plugin started with full access rights\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"Plugin started with full access rights\")","config":"{\n  \"AccessRights\": \"FullAccess\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PluginAttribute.AdditionalInfoUrl","kind":"property","name":"AdditionalInfoUrl","type":"T:cAlgo.API.PluginAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string AdditionalInfoUrl {get; set;}","python":"pluginAttribute.AdditionalInfoUrl: str","summary":"Gets or sets additional info url.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class AdditionalInfoUrlExamplePlugin : Plugin\n{\n    protected override void OnStart()\n    {\n        Print(\"Plugin started\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"Plugin started\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AdditionalInfoUrl\": \"https://ctrader.com/\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AdditionalInfoUrl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AdditionalInfoUrl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PluginAttribute.TimeZone","kind":"property","name":"TimeZone","type":"T:cAlgo.API.PluginAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string TimeZone {get; set;}","python":"pluginAttribute.TimeZone: str","summary":"Sets the timezone for all the Plugin datetime references","remarks":"All dates and times within the Plugin will be converted to this timezone","parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NewPlugin : Plugin\n{\n    protected override void OnStart()\n    {\n        Print(\"Plugin time zone: {0}\", TimeZone.DisplayName);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"Plugin time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Eastern Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/TimeZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/TimeZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PluginType","kind":"interface","name":"PluginType","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface PluginType","python":"PluginType","summary":"Represents a plugin algorithm type.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Sample Test Plugin\", AlgoKind.Plugin) is PluginType pluginType)\n            Print($\"Name: {pluginType.Name} | Parameters #: {pluginType.Parameters.Count}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nfrom System import Action\n\nclass Test():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(\"Sample Test Plugin\", AlgoKind.Plugin)\n        if algoType is not None:\n            pluginType = PluginType(algoType)\n            print(f\"Name: {pluginType.Name} | Parameters #: {pluginType.Parameters.Count}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Plugins)."}]}
{"id":"P:cAlgo.API.PluginType.IsEnabled","kind":"property","name":"IsEnabled","type":"T:cAlgo.API.PluginType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"bool IsEnabled {get;}","python":"pluginType.IsEnabled: bool","summary":"Returns true if plugin is enabled otherwise false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var pluginType in AlgoRegistry.Plugins)\n    Print(\"{0} is enabled: {1}\", pluginType.Name, pluginType.IsEnabled);","python":"for pluginType in api.AlgoRegistry.Plugins:\n    api.Print(f\"{pluginType.Name} is enabled: {pluginType.IsEnabled}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/IsEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/IsEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Plugins)."}]}
{"id":"P:cAlgo.API.PluginType.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.PluginType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<AlgoParameter> Parameters {get;}","python":"pluginType.Parameters: IReadonlyList[AlgoParameter]","summary":"Gets collection of Plugin parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<AlgoParameter>","pythonType":"IReadonlyList[AlgoParameter]","summary":"","nullable":false},"exceptions":[],"since":"5.5","deprecated":null,"examples":[{"csharp":"foreach (var pluginType in AlgoRegistry.Plugins)\n{\n    foreach (var parameter in pluginType.Parameters)\n        Print(\"{0} parameter: {1}\", pluginType.Name, parameter.Name);\n}","python":"for pluginType in api.AlgoRegistry.Plugins:\n    for parameter in pluginType.Parameters:\n        api.Print(f\"{pluginType.Name} parameter: {parameter.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/PluginType/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Plugins)."}]}
{"id":"T:cAlgo.API.Point","kind":"class","name":"Point","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Point","python":"Point","summary":"Represents an x- and y-coordinate pair in two-dimensional space.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var triangle = new Polygon\n{\n    FillColor = Color.FromArgb(120, Color.Green),\n    Points = new[] { new Point(0, 60), new Point(40, 0), new Point(80, 60) }\n};\nChart.AddControl(triangle);\nPrint(\"First vertex: {0}, {1}\", triangle.Points[0].X, triangle.Points[0].Y);","python":"triangle = Polygon()\ntriangle.FillColor = Color.FromArgb(120, Color.Green)\ntriangle.Points = [Point(0, 60), Point(40, 0), Point(80, 60)]\napi.Chart.AddControl(triangle)\napi.Print(f\"First vertex: {triangle.Points[0].X}, {triangle.Points[0].Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Point.#ctor(System.Double,System.Double)","kind":"constructor","name":"Point","type":"T:cAlgo.API.Point","namespace":"cAlgo.API","group":"Shapes","csharp":"public Point(double x, double y)","python":"Point(x: float, y: float)","summary":"Initializes a new instance of the Point class.","remarks":null,"parameters":[{"name":"x","csharpType":"double","pythonType":"float","summary":""},{"name":"y","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var point = new Point(100, 50);\nvar polyline = new Polyline { StrokeColor = Color.Orange, Points = new[] { new Point(0, 0), point } };\nChart.AddControl(polyline);","python":"point = Point(100, 50)\npolyline = Polyline()\npolyline.StrokeColor = Color.Orange\npolyline.Points = [Point(0, 0), point]\napi.Chart.AddControl(polyline)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Point.X","kind":"property","name":"X","type":"T:cAlgo.API.Point","namespace":"cAlgo.API","group":"Shapes","csharp":"public double X {get;}","python":"point.X: float","summary":"Gets or sets the x-coordinate of this Point.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var point = new Point(120, 40);\nPrint(\"X: {0}\", point.X);","python":"point = Point(120, 40)\napi.Print(f\"X: {point.X}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/X/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/X/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Point.Y","kind":"property","name":"Y","type":"T:cAlgo.API.Point","namespace":"cAlgo.API","group":"Shapes","csharp":"public double Y {get;}","python":"point.Y: float","summary":"Gets or sets the y-coordinate of this Point.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var point = new Point(120, 40);\nPrint(\"Y: {0}\", point.Y);","python":"point = Point(120, 40)\napi.Print(f\"Y: {point.Y}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/Y/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Point/Y/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Polygon","kind":"class","name":"Polygon","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Polygon : Shape","python":"Polygon","summary":"Draws a polygon, which is a connected series of lines that form a closed shape.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to draw a Polygon\n    public partial class PolygonSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.AddControl(new Polygon\n            {\n                FillColor = Color.Red,\n                Width = 200,\n                Height = 100,\n                Margin = 10,\n                Points = new Point[]\n                {\n                    new Point(100, 100),\n                    new Point(200, 50),\n                    new Point(300, 100),\n                    new Point(100, 100),\n                }\n            });\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        polygon = Polygon()\n        polygon.FillColor = Color.Red\n        polygon.Width = 200\n        polygon.Height = 100\n        polygon.Margin = Thickness(10)\n        polygon.Points = [Point(100, 100), Point(200, 50), Point(300, 100), Point(100, 100)]\n\n        api.Chart.AddControl(polygon)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Polygon.#ctor","kind":"constructor","name":"Polygon","type":"T:cAlgo.API.Polygon","namespace":"cAlgo.API","group":"Shapes","csharp":"public Polygon()","python":"Polygon()","summary":"Initializes a new instance of the Polygon class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polygon = new Polygon { FillColor = Color.SteelBlue, StrokeColor = Color.White };\npolygon.Points = new[] { new Point(0, 0), new Point(100, 0), new Point(50, 80) };\nChart.AddControl(polygon);","python":"polygon = Polygon()\npolygon.FillColor = Color.SteelBlue\npolygon.StrokeColor = Color.White\npolygon.Points = [Point(0, 0), Point(100, 0), Point(50, 80)]\napi.Chart.AddControl(polygon)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Polygon.FillRule","kind":"property","name":"FillRule","type":"T:cAlgo.API.Polygon","namespace":"cAlgo.API","group":"Shapes","csharp":"public FillRule FillRule {get; set;}","python":"polygon.FillRule: FillRule","summary":"Gets or sets a FillRule enumeration that specifies how the interior fill of the shape is determined.","remarks":null,"parameters":[],"returns":{"csharpType":"FillRule","pythonType":"FillRule","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var star = new Polygon { FillColor = Color.Gold, FillRule = FillRule.Nonzero };\nstar.Points = new[] { new Point(50, 0), new Point(80, 100), new Point(0, 35), new Point(100, 35), new Point(20, 100) };\nChart.AddControl(star);","python":"star = Polygon()\nstar.FillColor = Color.Gold\nstar.FillRule = FillRule.Nonzero\nstar.Points = [Point(50, 0), Point(80, 100), Point(0, 35), Point(100, 35), Point(20, 100)]\napi.Chart.AddControl(star)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/FillRule/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/FillRule/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Polygon.Points","kind":"property","name":"Points","type":"T:cAlgo.API.Polygon","namespace":"cAlgo.API","group":"Shapes","csharp":"public Point[] Points {get; set;}","python":"polygon.Points: list[Point]","summary":"Gets or sets a collection that contains the vertex points of the polygon.","remarks":null,"parameters":[],"returns":{"csharpType":"Point[]","pythonType":"list[Point]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polygon = new Polygon { FillColor = Color.Gold };\npolygon.Points = new[] { new Point(0, 50), new Point(50, 0), new Point(100, 50), new Point(50, 100) };\nChart.AddControl(polygon);\nPrint(\"Vertex count: {0}\", polygon.Points.Length);","python":"polygon = Polygon()\npolygon.FillColor = Color.Gold\npolygon.Points = [Point(0, 50), Point(50, 0), Point(100, 50), Point(50, 100)]\napi.Chart.AddControl(polygon)\napi.Print(f\"Vertex count: {len(polygon.Points)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/Points/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polygon/Points/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Polyline","kind":"class","name":"Polyline","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Polyline : Shape","python":"Polyline","summary":"Draws a series of connected straight lines.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Polyline to draw connected lines\n    public partial class PolylineSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Chart.AddControl(new Polyline\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                StrokeColor = Color.Red,\n                StrokeThickness = 1,\n                Points = new[]\n                {\n                    new Point(10, 10),\n                    new Point(100,200),\n                    new Point(10, 100),\n                    new Point(10, 10),\n                }\n            });\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        polyline = Polyline()\n        polyline.HorizontalAlignment = HorizontalAlignment.Center\n        polyline.VerticalAlignment = VerticalAlignment.Center\n        polyline.StrokeColor = Color.Red\n        polyline.StrokeThickness = 1\n        polyline.Points = [Point(10, 10), Point(100,200), Point(10, 100), Point(10, 10)]\n        api.Chart.AddControl(polyline)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Polyline.#ctor","kind":"constructor","name":"Polyline","type":"T:cAlgo.API.Polyline","namespace":"cAlgo.API","group":"Shapes","csharp":"public Polyline()","python":"Polyline()","summary":"Initializes a new instance of the Polyline class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polyline = new Polyline { StrokeColor = Color.Cyan, StrokeThickness = 2 };\npolyline.Points = new[] { new Point(0, 80), new Point(40, 20), new Point(80, 60), new Point(120, 0) };\nChart.AddControl(polyline);","python":"polyline = Polyline()\npolyline.StrokeColor = Color.Cyan\npolyline.StrokeThickness = 2\npolyline.Points = [Point(0, 80), Point(40, 20), Point(80, 60), Point(120, 0)]\napi.Chart.AddControl(polyline)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Polyline.FillRule","kind":"property","name":"FillRule","type":"T:cAlgo.API.Polyline","namespace":"cAlgo.API","group":"Shapes","csharp":"public FillRule FillRule {get; set;}","python":"polyline.FillRule: FillRule","summary":"Gets or sets a FillRule enumeration that specifies how the interior fill of the shape is determined.","remarks":null,"parameters":[],"returns":{"csharpType":"FillRule","pythonType":"FillRule","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polyline = new Polyline { StrokeColor = Color.White, FillColor = Color.FromArgb(80, Color.Blue), FillRule = FillRule.EvenOdd };\npolyline.Points = new[] { new Point(0, 0), new Point(100, 100), new Point(100, 0), new Point(0, 100) };\nChart.AddControl(polyline);","python":"polyline = Polyline()\npolyline.StrokeColor = Color.White\npolyline.FillColor = Color.FromArgb(80, Color.Blue)\npolyline.FillRule = FillRule.EvenOdd\npolyline.Points = [Point(0, 0), Point(100, 100), Point(100, 0), Point(0, 100)]\napi.Chart.AddControl(polyline)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/FillRule/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/FillRule/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Polyline.Points","kind":"property","name":"Points","type":"T:cAlgo.API.Polyline","namespace":"cAlgo.API","group":"Shapes","csharp":"public Point[] Points {get; set;}","python":"polyline.Points: list[Point]","summary":"Gets or sets a collection that contains the vertex points of the Polyline.","remarks":null,"parameters":[],"returns":{"csharpType":"Point[]","pythonType":"list[Point]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var points = new List<Point>();\nfor (var i = 0; i < 10; i++)\n    points.Add(new Point(i * 10, i % 2 * 20));\nvar polyline = new Polyline { StrokeColor = Color.Lime, Points = points.ToArray() };\nChart.AddControl(polyline);\nPrint(\"Point count: {0}\", polyline.Points.Length);","python":"polyline = Polyline()\npolyline.StrokeColor = Color.Lime\npolyline.Points = [Point(i * 10, i % 2 * 20) for i in range(10)]\napi.Chart.AddControl(polyline)\napi.Print(f\"Point count: {len(polyline.Points)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/Points/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/Points/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","kind":"interface","name":"PolynomialRegressionChannels","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface PolynomialRegressionChannels","python":"PolynomialRegressionChannels","summary":"Polynomial Regression Channel (PRC) is an RTX Extension indicator that draws a best fit n-degree polynomial regression line through a recent period of data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nPrint(\"Regression: {0}, Upper: {1}, Lower: {2}\", prc.Prc.Last(1), prc.Sqh.Last(1), prc.Sql.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\napi.Print(f\"Regression: {prc.Prc.Last(1)}, Upper: {prc.Sqh.Last(1)}, Lower: {prc.Sql.Last(1)}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Polynomial Regression Channels indicator\n    public partial class PolynomialRegressionChannelsSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PolynomialRegressionChannels _polynomialRegressionChannels;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _polynomialRegressionChannels = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.LowPrices.Last(1) <= _polynomialRegressionChannels.Sql.Last(1) && Bars.LowPrices.Last(2) > _polynomialRegressionChannels.Sql.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label);\n            }\n            else if (Bars.HighPrices.Last(1) >= _polynomialRegressionChannels.Sqh.Last(1) && Bars.HighPrices.Last(2) < _polynomialRegressionChannels.Sqh.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass PolynomialRegressionChannelsSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.polynomialRegressionChannels = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\n\n    def on_bar_closed(self):\n        if api.Bars.LowPrices.Last(0) <= self.polynomialRegressionChannels.Sql.Last(0) and api.Bars.LowPrices.Last(1) > self.polynomialRegressionChannels.Sql.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label)\n        elif api.Bars.HighPrices.Last(0) >= self.polynomialRegressionChannels.Sqh.Last(0) and api.Bars.HighPrices.Last(1) < self.polynomialRegressionChannels.Sqh.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    },\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PolynomialRegressionChannels.Prc","kind":"property","name":"Prc","type":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Prc {get; set;}","python":"polynomialRegressionChannels.Prc: IndicatorDataSeries","summary":"Get the Polynomial Regression Channels Prc data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nPrint(\"Polynomial regression line: {0}\", prc.Prc.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\napi.Print(f\"Polynomial regression line: {prc.Prc.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Prc/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Prc/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PolynomialRegressionChannels.Sqh","kind":"property","name":"Sqh","type":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Sqh {get; set;}","python":"polynomialRegressionChannels.Sqh: IndicatorDataSeries","summary":"Get the Polynomial Regression Channels Sqh data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nif (Bars.HighPrices.Last(1) >= prc.Sqh.Last(1))\n    Print(\"Price reached the upper channel: {0}\", prc.Sqh.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\nif api.Bars.HighPrices.Last(1) >= prc.Sqh.Last(1):\n    api.Print(f\"Price reached the upper channel: {prc.Sqh.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sqh/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sqh/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PolynomialRegressionChannels.Sqh2","kind":"property","name":"Sqh2","type":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Sqh2 {get; set;}","python":"polynomialRegressionChannels.Sqh2: IndicatorDataSeries","summary":"Get the Polynomial Regression Channels Sqh2 data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nif (Bars.HighPrices.Last(1) >= prc.Sqh2.Last(1))\n    Print(\"Price reached the second upper channel: {0}\", prc.Sqh2.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\nif api.Bars.HighPrices.Last(1) >= prc.Sqh2.Last(1):\n    api.Print(f\"Price reached the second upper channel: {prc.Sqh2.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sqh2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sqh2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PolynomialRegressionChannels.Sql","kind":"property","name":"Sql","type":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Sql {get; set;}","python":"polynomialRegressionChannels.Sql: IndicatorDataSeries","summary":"Get the Polynomial Regression Channels Sql data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nif (Bars.LowPrices.Last(1) <= prc.Sql.Last(1))\n    Print(\"Price reached the lower channel: {0}\", prc.Sql.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\nif api.Bars.LowPrices.Last(1) <= prc.Sql.Last(1):\n    api.Print(f\"Price reached the lower channel: {prc.Sql.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sql/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sql/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PolynomialRegressionChannels.Sql2","kind":"property","name":"Sql2","type":"T:cAlgo.API.Indicators.PolynomialRegressionChannels","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Sql2 {get; set;}","python":"polynomialRegressionChannels.Sql2: IndicatorDataSeries","summary":"Get the Polynomial Regression Channels Sql2 data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var prc = Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2);\nif (Bars.LowPrices.Last(1) <= prc.Sql2.Last(1))\n    Print(\"Price reached the second lower channel: {0}\", prc.Sql2.Last(1));","python":"prc = api.Indicators.PolynomialRegressionChannels(3, 120, 1.62, 2)\nif api.Bars.LowPrices.Last(1) <= prc.Sql2.Last(1):\n    api.Print(f\"Price reached the second lower channel: {prc.Sql2.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sql2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PolynomialRegressionChannels/Sql2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PopupNotification","kind":"interface","name":"PopupNotification","type":null,"namespace":"cAlgo.API","group":"Notifications","csharp":"public interface PopupNotification","python":"PopupNotification","summary":"Represents a popup notification.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var popup = Notifications.ShowPopup(\"Order\", \"Placing a buy order...\", PopupNotificationState.InProgress);\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);\npopup.Complete(result.IsSuccessful ? PopupNotificationState.Success : PopupNotificationState.Error);","python":"popup = api.Notifications.ShowPopup(\"Order\", \"Placing a buy order...\", PopupNotificationState.InProgress)\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\npopup.Complete(PopupNotificationState.Success if result.IsSuccessful else PopupNotificationState.Error)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."},{"name":"Cloud","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."}]}
{"id":"M:cAlgo.API.PopupNotification.Complete(cAlgo.API.PopupNotificationState)","kind":"method","name":"Complete","type":"T:cAlgo.API.PopupNotification","namespace":"cAlgo.API","group":"Notifications","csharp":"void Complete(PopupNotificationState finalState)","python":"popupNotification.Complete(finalState: PopupNotificationState) -> None","summary":"Completes an InProgress popup notification.","remarks":null,"parameters":[{"name":"finalState","csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"Final state."}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var popup = Notifications.ShowPopup(\"Close all\", \"Closing positions...\", PopupNotificationState.InProgress);\nforeach (var position in Positions)\n    position.Close();\npopup.Complete(Positions.Count == 0 ? PopupNotificationState.Success : PopupNotificationState.Partial);","python":"popup = api.Notifications.ShowPopup(\"Close all\", \"Closing positions...\", PopupNotificationState.InProgress)\nfor position in list(api.Positions):\n    position.Close()\npopup.Complete(PopupNotificationState.Success if api.Positions.Count == 0 else PopupNotificationState.Partial)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/Complete/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/Complete/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."},{"name":"Cloud","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."}]}
{"id":"P:cAlgo.API.PopupNotification.State","kind":"property","name":"State","type":"T:cAlgo.API.PopupNotification","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState State {get;}","python":"popupNotification.State: PopupNotificationState","summary":"Gets state of popup notification.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var popup = Notifications.ShowPopup(\"Sync\", \"Synchronizing data...\", PopupNotificationState.InProgress);\nPrint(\"Popup state: {0}\", popup.State);","python":"popup = api.Notifications.ShowPopup(\"Sync\", \"Synchronizing data...\", PopupNotificationState.InProgress)\napi.Print(f\"Popup state: {popup.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/State/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotification/State/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."},{"name":"Cloud","support":"Partial","behaviour":"Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress."}]}
{"id":"T:cAlgo.API.PopupNotificationState","kind":"enum","name":"PopupNotificationState","type":null,"namespace":"cAlgo.API","group":"Notifications","csharp":"public enum PopupNotificationState","python":"PopupNotificationState","summary":"Represents different states for popup notifications.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"Notifications.ShowPopup(\"Account\", \"Balance: \" + Account.Balance, PopupNotificationState.Information);","python":"api.Notifications.ShowPopup(\"Account\", f\"Balance: {api.Account.Balance}\", PopupNotificationState.Information)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PopupNotificationState.InProgress","kind":"enum value","name":"InProgress","type":"T:cAlgo.API.PopupNotificationState","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState.InProgress;","python":"PopupNotificationState.InProgress","summary":"In progress.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PopupNotificationState.Success","kind":"enum value","name":"Success","type":"T:cAlgo.API.PopupNotificationState","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState.Success;","python":"PopupNotificationState.Success","summary":"Success.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PopupNotificationState.Error","kind":"enum value","name":"Error","type":"T:cAlgo.API.PopupNotificationState","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState.Error;","python":"PopupNotificationState.Error","summary":"Error.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PopupNotificationState.Partial","kind":"enum value","name":"Partial","type":"T:cAlgo.API.PopupNotificationState","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState.Partial;","python":"PopupNotificationState.Partial","summary":"Partial.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PopupNotificationState.Information","kind":"enum value","name":"Information","type":"T:cAlgo.API.PopupNotificationState","namespace":"cAlgo.API","group":"Notifications","csharp":"PopupNotificationState.Information;","python":"PopupNotificationState.Information","summary":"Information.","remarks":null,"parameters":[],"returns":{"csharpType":"PopupNotificationState","pythonType":"PopupNotificationState","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/PopupNotificationState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Position","kind":"interface","name":"Position","type":null,"namespace":"cAlgo.API","group":"Positions","csharp":"public interface Position","python":"Position","summary":"Taking or opening a position means buying or selling a trading pair.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    Print(\"Position {0} {1} {2}: entry {3}, net profit {4}\", position.Id, position.SymbolName, position.TradeType, position.EntryPrice, position.NetProfit);\n}","python":"for position in api.Positions:\n    api.Print(f\"Position {position.Id} {position.SymbolName} {position.TradeType}: entry {position.EntryPrice}, net profit {position.NetProfit}\")"},{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01), \"myLabel\", 20, 40);\nif (result.IsSuccessful)\n{\n    var position = result.Position;\n    position.ModifyStopLossPips(10);\n    position.Close();\n}\nelse\n{\n    Print(\"Order failed: {0}\", result.Error);\n}","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01), \"myLabel\", 20, 40)\nif result.IsSuccessful:\n    position = result.Position\n    position.ModifyStopLossPips(10)\n    position.Close()\nelse:\n    api.Print(f\"Order failed: {result.Error}\")"},{"csharp":"protected override void OnStart()\n{\n    Positions.Opened += OnPositionsOpened;\n    Positions.Closed += OnPositionsClosed;\n}\n\nprivate void OnPositionsOpened(PositionOpenedEventArgs args)\n{\n    Print(\"Position {0} opened at {1}\", args.Position.Id, args.Position.EntryPrice);\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    Print(\"Position {0} closed ({1}), net profit {2}\", args.Position.Id, args.Reason, args.Position.NetProfit);\n}","python":"def on_start(self):\n    api.Positions.Opened += self.on_positions_opened\n    api.Positions.Closed += self.on_positions_closed\n\ndef on_positions_opened(self, args):\n    api.Print(f\"Position {args.Position.Id} opened at {args.Position.EntryPrice}\")\n\ndef on_positions_closed(self, args):\n    api.Print(f\"Position {args.Position.Id} closed ({args.Reason}), net profit {args.Position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.Close","kind":"method","name":"Close","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult Close()","python":"position.Close() -> TradeResult","summary":"Shortcut for the Robot.ClosePosition method.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions.FindAll(\"myLabel\"))\n{\n    var result = position.Close();\n    Print(\"Position {0} closed: {1}\", position.Id, result.IsSuccessful);\n}","python":"for position in api.Positions.FindAll(\"myLabel\"):\n    result = position.Close()\n    api.Print(f\"Position {position.Id} closed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyStopLossBreakEven(cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyStopLossBreakEven","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyStopLossBreakEven(StopLossBreakEven stopLossBreakEven)","python":"position.ModifyStopLossBreakEven(stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the StopLoss Break-Even.","remarks":null,"parameters":[{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"StopLossBreakEven"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.ModifyStopLossBreakEven(new StopLossBreakEven(20, 2));\n    Print(\"Break-even rule set: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.ModifyStopLossBreakEven(StopLossBreakEven(20, 2))\n    api.Print(f\"Break-even rule set: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossBreakEven/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossBreakEven/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyStopLossPips(System.Nullable{System.Double})","kind":"method","name":"ModifyStopLossPips","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyStopLossPips(double? stopLossPips)","python":"position.ModifyStopLossPips(stopLossPips: float | None) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the Stop Loss pips","remarks":null,"parameters":[{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"New Stop Loss in Pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.ModifyStopLossPips(15);\n    Print(\"New stop loss: {0}\", result.IsSuccessful ? result.Position.StopLoss : null);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.ModifyStopLossPips(15)\n    api.Print(f\"Stop loss modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyStopLossPrice(System.Nullable{System.Double})","kind":"method","name":"ModifyStopLossPrice","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyStopLossPrice(double? stopLoss)","python":"position.ModifyStopLossPrice(stopLoss: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPosition method to change the Stop Loss.","remarks":null,"parameters":[{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop Loss price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var distance = 20 * position.Symbol.PipSize;\n    var stopLossPrice = position.TradeType == TradeType.Buy ? position.EntryPrice - distance : position.EntryPrice + distance;\n    var result = position.ModifyStopLossPrice(stopLossPrice);\n    Print(\"Stop loss modified: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    distance = 20 * position.Symbol.PipSize\n    stopLossPrice = position.EntryPrice - distance if position.TradeType == TradeType.Buy else position.EntryPrice + distance\n    result = position.ModifyStopLossPrice(stopLossPrice)\n    api.Print(f\"Stop loss modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyStopLossPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyTakeProfit(cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyTakeProfit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyTakeProfit(RelativeTakeProfitProtections takeProfitProtections)","python":"position.ModifyTakeProfit(takeProfitProtections: RelativeTakeProfitProtections) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the Take Profit protection","remarks":null,"parameters":[{"name":"takeProfitProtections","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"New Take Profit protections"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down);\n    var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(halfVolume, 20), new RelativeTakeProfitLastProtection(40));\n    var result = position.ModifyTakeProfit(takeProfits);\n    Print(\"Take profit ladder set: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down)\n    takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(halfVolume, 20), RelativeTakeProfitLastProtection(40))\n    result = position.ModifyTakeProfit(takeProfits)\n    api.Print(f\"Take profit ladder set: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyTakeProfit(cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyTakeProfit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyTakeProfit(AbsoluteTakeProfitProtections takeProfitProtections)","python":"position.ModifyTakeProfit(takeProfitProtections: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the Take Profit protection","remarks":null,"parameters":[{"name":"takeProfitProtections","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"New Take Profit protections"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var distance = 50 * position.Symbol.PipSize;\n    var targetPrice = position.TradeType == TradeType.Buy ? position.EntryPrice + distance : position.EntryPrice - distance;\n    var result = position.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));\n    Print(\"Take profit set at {0}: {1}\", targetPrice, result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    distance = 50 * position.Symbol.PipSize\n    targetPrice = position.EntryPrice + distance if position.TradeType == TradeType.Buy else position.EntryPrice - distance\n    result = position.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))\n    api.Print(f\"Take profit set at {targetPrice}: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyTakeProfitPips(System.Nullable{System.Double})","kind":"method","name":"ModifyTakeProfitPips","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyTakeProfitPips(double? takeProfitPips)","python":"position.ModifyTakeProfitPips(takeProfitPips: float | None) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the Take Profit pips","remarks":null,"parameters":[{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"New Take Profit in Pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.ModifyTakeProfitPips(30);\n    Print(\"Take profit modified: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.ModifyTakeProfitPips(30)\n    api.Print(f\"Take profit modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfitPips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfitPips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyTakeProfitPrice(System.Nullable{System.Double})","kind":"method","name":"ModifyTakeProfitPrice","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyTakeProfitPrice(double? takeProfit)","python":"position.ModifyTakeProfitPrice(takeProfit: float | None) -> TradeResult","summary":"Shortcut for Robot.ModifyPosition method to change the Take Profit.","remarks":null,"parameters":[{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take Profit price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var distance = 40 * position.Symbol.PipSize;\n    var takeProfitPrice = position.TradeType == TradeType.Buy ? position.EntryPrice + distance : position.EntryPrice - distance;\n    var result = position.ModifyTakeProfitPrice(takeProfitPrice);\n    Print(\"Take profit modified: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    distance = 40 * position.Symbol.PipSize\n    takeProfitPrice = position.EntryPrice + distance if position.TradeType == TradeType.Buy else position.EntryPrice - distance\n    result = position.ModifyTakeProfitPrice(takeProfitPrice)\n    api.Print(f\"Take profit modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfitPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTakeProfitPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyTrailingStop(System.Boolean)","kind":"method","name":"ModifyTrailingStop","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyTrailingStop(bool hasTrailingStop)","python":"position.ModifyTrailingStop(hasTrailingStop: bool) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the Trailing Stop.","remarks":null,"parameters":[{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"If true position will have trailing stop loss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.StopLoss.HasValue)\n{\n    var result = position.ModifyTrailingStop(true);\n    Print(\"Trailing stop enabled: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.StopLoss is not None:\n    result = position.ModifyTrailingStop(True)\n    api.Print(f\"Trailing stop enabled: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTrailingStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyTrailingStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.ModifyVolume(System.Double)","kind":"method","name":"ModifyVolume","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult ModifyVolume(double volume)","python":"position.ModifyVolume(volume: float) -> TradeResult","summary":"Shortcut for the Robot.ModifyPosition method to change the VolumeInUnits.","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"New Volume in Units"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down);\n    var result = position.ModifyVolume(halfVolume);\n    Print(\"Volume modified: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down)\n    result = position.ModifyVolume(halfVolume)\n    api.Print(f\"Volume modified: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/ModifyVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.Reverse","kind":"method","name":"Reverse","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult Reverse()","python":"position.Reverse() -> TradeResult","summary":"Shortcut for the Robot.ReversePosition method to change the direction of the trade.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.Reverse();\n    if (result.IsSuccessful)\n        Print(\"Position reversed to {0}\", result.Position.TradeType);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.Reverse()\n    if result.IsSuccessful:\n        api.Print(f\"Position reversed to {result.Position.TradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Reverse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Reverse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Position.Reverse(System.Double)","kind":"method","name":"Reverse","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeResult Reverse(double volume)","python":"position.Reverse(volume: float) -> TradeResult","summary":"Shortcut for the Robot.ReversePosition method to change the direction of trade and the volume.","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"New Volume in Units"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.Reverse(20000);\n    if (result.IsSuccessful)\n        Print(\"Position reversed to {0} {1}\", result.Position.TradeType, result.Position.VolumeInUnits);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.Reverse(20000)\n    if result.IsSuccessful:\n        api.Print(f\"Position reversed to {result.Position.TradeType} {result.Position.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Reverse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Reverse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.AbsoluteTakeProfitProtections","kind":"property","name":"AbsoluteTakeProfitProtections","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"AbsoluteTakeProfitProtections AbsoluteTakeProfitProtections {get;}","python":"position.AbsoluteTakeProfitProtections: AbsoluteTakeProfitProtections","summary":"The take profit protections of the position. Null if position has no take profit.","remarks":null,"parameters":[],"returns":{"csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 30000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful && result.Position.AbsoluteTakeProfitProtections != null)\n    Print(\"Last take profit price: {0}\", result.Position.AbsoluteTakeProfitProtections.LastTakeProfit.Price);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 30000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful and result.Position.AbsoluteTakeProfitProtections is not None:\n    api.Print(f\"Last take profit price: {result.Position.AbsoluteTakeProfitProtections.LastTakeProfit.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/AbsoluteTakeProfitProtections/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/AbsoluteTakeProfitProtections/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Channel","kind":"property","name":"Channel","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"string Channel {get;}","python":"position.Channel: str","summary":"Gets the channel via which the position was placed in a string format.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n    Print(\"Position {0} channel: {1}\", position.Id, position.Channel);","python":"for position in api.Positions:\n    api.Print(f\"Position {position.Id} channel: {position.Channel}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Channel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Channel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Trades the cBot sends carry channel 'cBot Console' instead of the desktop 'cBot cTrader'."},{"name":"Cloud","support":"Partial","behaviour":"Trades the cBot sends carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'."}]}
{"id":"P:cAlgo.API.Position.Comment","kind":"property","name":"Comment","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"string Comment {get;}","python":"position.Comment: str","summary":"Comment can be used as a note for the order.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40, \"Breakout entry\");\nif (result.IsSuccessful)\n    Print(\"Position comment: {0}\", result.Position.Comment);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40, \"Breakout entry\")\nif result.IsSuccessful:\n    api.Print(f\"Position comment: {result.Position.Comment}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Comment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Comment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Commissions","kind":"property","name":"Commissions","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double Commissions {get;}","python":"position.Commissions: float","summary":"Commission Amount of the request to trade one way (Buy/Sell) associated with this position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Commissions: {0}\", position.Commissions);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Commissions: {position.Commissions}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Commissions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Commissions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.CurrentPrice","kind":"property","name":"CurrentPrice","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double CurrentPrice {get;}","python":"position.CurrentPrice: float","summary":"Gets the position current market price. If Position's TradeType is Buy it returns Symbol current Bid price. If position's TradeType is Sell it returns Symbol current Ask price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Entry {0}, current price {1}\", position.EntryPrice, position.CurrentPrice);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Entry {position.EntryPrice}, current price {position.CurrentPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/CurrentPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/CurrentPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Deals","kind":"property","name":"Deals","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"IReadonlyList<Deal> Deals {get;}","python":"position.Deals: IReadonlyList[Deal]","summary":"Gets the position deals.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<Deal>","pythonType":"IReadonlyList[Deal]","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n{\n    foreach (var deal in position.Deals)\n        Print(\"Position {0} deal {1}: {2} {3} units at {4}\", position.Id, deal.Id, deal.PositionImpact, deal.VolumeInUnits, deal.ExecutionPrice);\n}","python":"for position in api.Positions:\n    for deal in position.Deals:\n        api.Print(f\"Position {position.Id} deal {deal.Id}: {deal.PositionImpact} {deal.VolumeInUnits} units at {deal.ExecutionPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Deals/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Deals/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.EntryPrice","kind":"property","name":"EntryPrice","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double EntryPrice {get;}","python":"position.EntryPrice: float","summary":"Entry price of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Entry price: {0}\", result.Position.EntryPrice);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Entry price: {result.Position.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/EntryPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/EntryPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.EntryTime","kind":"property","name":"EntryTime","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"DateTime EntryTime {get;}","python":"position.EntryTime: DateTime","summary":"Entry time of trade associated with the position. The Timezone used is set in the cBot attribute.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Position open for {0}\", Server.Time - position.EntryTime);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Position open for {api.Server.Time - position.EntryTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/EntryTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/EntryTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.GrossProfit","kind":"property","name":"GrossProfit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double GrossProfit {get;}","python":"position.GrossProfit: float","summary":"Gross profit accrued by the order associated with the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Gross profit: {0}\", position.GrossProfit);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Gross profit: {position.GrossProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/GrossProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/GrossProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.HasTrailingStop","kind":"property","name":"HasTrailingStop","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"bool HasTrailingStop {get;}","python":"position.HasTrailingStop: bool","summary":"When HasTrailingStop set to true, the server updates the Stop Loss every time the position moves in your favor.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40, \"Trailing\", true);\nif (result.IsSuccessful)\n    Print(\"Position has trailing stop: {0}\", result.Position.HasTrailingStop);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40, \"Trailing\", True)\nif result.IsSuccessful:\n    api.Print(f\"Position has trailing stop: {result.Position.HasTrailingStop}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/HasTrailingStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/HasTrailingStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"int Id {get;}","python":"position.Id: int","summary":"The position's unique identifier.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Opened position Id: {0}\", result.Position.Id);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Opened position Id: {result.Position.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Label","kind":"property","name":"Label","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"string Label {get;}","python":"position.Label: str","summary":"Label can be used to represent the order.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Position {0} is open\", result.Position.Label);","python":"result = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Position {result.Position.Label} is open\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Label/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Label/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.LastUpdateTime","kind":"property","name":"LastUpdateTime","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"DateTime? LastUpdateTime {get;}","python":"position.LastUpdateTime: DateTime | None","summary":"Gets the time when a position was last updated. The timezone used is set in the algorithm class attribute.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime?","pythonType":"DateTime | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.LastUpdateTime.HasValue)\n    Print(\"Last updated at {0}\", position.LastUpdateTime.Value);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.LastUpdateTime is not None:\n    api.Print(f\"Last updated at {position.LastUpdateTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/LastUpdateTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/LastUpdateTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Margin","kind":"property","name":"Margin","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double Margin {get;}","python":"position.Margin: float","summary":"The amount of used margin by the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var usedMargin = Positions.Sum(position => position.Margin);\nPrint(\"Margin used by open positions: {0}\", usedMargin);","python":"usedMargin = sum(position.Margin for position in api.Positions)\napi.Print(f\"Margin used by open positions: {usedMargin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Margin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Margin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.NetProfit","kind":"property","name":"NetProfit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double NetProfit {get;}","python":"position.NetProfit: float","summary":"The Net profit of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.NetProfit > 100)\n    ClosePosition(position);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.NetProfit > 100:\n    api.ClosePosition(position)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/NetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/NetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Pips","kind":"property","name":"Pips","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double Pips {get;}","python":"position.Pips: float","summary":"Represents the winning or loosing pips of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Pips: {0}\", position.Pips);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Pips: {position.Pips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Pips/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Pips/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Quantity","kind":"property","name":"Quantity","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double Quantity {get;}","python":"position.Quantity: float","summary":"Quantity of lots traded by the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Quantity in lots: {0}\", position.Quantity);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Quantity in lots: {position.Quantity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Quantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Quantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.StopLoss","kind":"property","name":"StopLoss","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double? StopLoss {get;}","python":"position.StopLoss: float | None","summary":"The Stop Loss level of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40);\nif (result.IsSuccessful && result.Position.StopLoss.HasValue)\n    Print(\"Stop loss price: {0}\", result.Position.StopLoss.Value);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40)\nif result.IsSuccessful and result.Position.StopLoss is not None:\n    api.Print(f\"Stop loss price: {result.Position.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLoss/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLoss/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.StopLossBreakEven","kind":"property","name":"StopLossBreakEven","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"StopLossBreakEven StopLossBreakEven {get;}","python":"position.StopLossBreakEven: StopLossBreakEven","summary":"The stop loss break even of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits, new StopLossBreakEven(15, 2));\nif (result.IsSuccessful && result.Position.StopLossBreakEven != null)\n    Print(\"Break-even trigger distance: {0} pips\", result.Position.StopLossBreakEven.TriggerDistance);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits, StopLossBreakEven(15, 2))\nif result.IsSuccessful and result.Position.StopLossBreakEven is not None:\n    api.Print(f\"Break-even trigger distance: {result.Position.StopLossBreakEven.TriggerDistance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLossBreakEven/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLossBreakEven/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.StopLossTriggerMethod","kind":"property","name":"StopLossTriggerMethod","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"StopTriggerMethod? StopLossTriggerMethod {get;}","python":"position.StopLossTriggerMethod: StopTriggerMethod | None","summary":"Trigger method for the position's Stop Loss.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40, \"\", false, StopTriggerMethod.Opposite);\nif (result.IsSuccessful)\n    Print(\"Stop loss trigger method: {0}\", result.Position.StopLossTriggerMethod);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40, \"\", False, StopTriggerMethod.Opposite)\nif result.IsSuccessful:\n    api.Print(f\"Stop loss trigger method: {result.Position.StopLossTriggerMethod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLossTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/StopLossTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Swap","kind":"property","name":"Swap","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double Swap {get;}","python":"position.Swap: float","summary":"Swap is the overnight interest rate if any, accrued on the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Swap: {0}\", position.Swap);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Swap: {position.Swap}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Swap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Swap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"Symbol Symbol {get;}","python":"position.Symbol: Symbol","summary":"Gets the position symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Symbol {0}, pip size {1}, spread {2}\", position.Symbol.Name, position.Symbol.PipSize, position.Symbol.Spread);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Symbol {position.Symbol.Name}, pip size {position.Symbol.PipSize}, spread {position.Symbol.Spread}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"string SymbolName {get;}","python":"position.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions)\n    Print(\"Position {0} symbol: {1}\", position.Id, position.SymbolName);","python":"for position in api.Positions:\n    api.Print(f\"Position {position.Id} symbol: {position.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.TakeProfit","kind":"property","name":"TakeProfit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double? TakeProfit {get;}","python":"position.TakeProfit: float | None","summary":"The take profit level of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40);\nif (result.IsSuccessful && result.Position.TakeProfit.HasValue)\n    Print(\"Take profit price: {0}\", result.Position.TakeProfit.Value);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40)\nif result.IsSuccessful and result.Position.TakeProfit is not None:\n    api.Print(f\"Take profit price: {result.Position.TakeProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/TakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/TakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.TradeType","kind":"property","name":"TradeType","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"TradeType TradeType {get;}","python":"position.TradeType: TradeType","summary":"Trade type (Buy/Sell) of the position.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Trade type: {0}\", position.TradeType);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Trade type: {position.TradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.VolumeInUnits","kind":"property","name":"VolumeInUnits","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"double VolumeInUnits {get;}","python":"position.VolumeInUnits: float","summary":"The amount traded by the position.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Volume in units: {0}\", position.VolumeInUnits);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Volume in units: {position.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/VolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/VolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.SymbolCode","kind":"property","name":"SymbolCode","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"string SymbolCode {get;}","python":"position.SymbolCode: str","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use SymbolName instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"long Volume {get;}","python":"position.Volume: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Position.Profit","kind":"property","name":"Profit","type":"T:cAlgo.API.Position","namespace":"cAlgo.API","group":"Positions","csharp":"decimal Profit {get;}","python":"position.Profit: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"decimal","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use GrossProfit instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PositionCloseReason","kind":"enum","name":"PositionCloseReason","type":null,"namespace":"cAlgo.API","group":"Positions","csharp":"public enum PositionCloseReason","python":"PositionCloseReason","summary":"The reason for closing the position.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use PositionCloseReason\n    public partial class PositionCloseReasonSample : Robot\n    {\n        protected override void OnStart()\n        {\n            Positions.Closed += Positions_Closed;\n        }\n\n        private void Positions_Closed(PositionClosedEventArgs obj)\n        {\n            Print(obj.Reason);\n\n            switch (obj.Reason)\n            {\n                case PositionCloseReason.Closed:\n                    // Do something if position closed\n                    break;\n\n                case PositionCloseReason.StopLoss:\n                    // Do something if position stop loss got hit\n                    break;\n\n                case PositionCloseReason.StopOut:\n                    // Do something if position stopped out\n                    break;\n\n                case PositionCloseReason.TakeProfit:\n                    // Do something if position take profit got hit\n                    break;\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass PositionCloseReasonSample():\n    def on_start(self):\n        api.Positions.Closed += self.on_position_closed\n\n    def on_position_closed(self, args):\n        api.Print(args.Reason)\n        match args.Reason:\n            case PositionCloseReason.Closed:\n                # Do something if position closed\n                pass\n            case PositionCloseReason.StopLoss:\n                # Do something if position stop loss got hit\n                pass\n            case PositionCloseReason.StopOut:\n                # Do something if position stopped out\n                pass\n            case PositionCloseReason.TakeProfit:\n                # Do something if position take profit got hit\n                pass","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PositionCloseReason.Closed","kind":"enum value","name":"Closed","type":"T:cAlgo.API.PositionCloseReason","namespace":"cAlgo.API","group":"Positions","csharp":"PositionCloseReason.Closed;","python":"PositionCloseReason.Closed","summary":"Positions was closed by the trader.","remarks":null,"parameters":[],"returns":{"csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PositionCloseReason.StopLoss","kind":"enum value","name":"StopLoss","type":"T:cAlgo.API.PositionCloseReason","namespace":"cAlgo.API","group":"Positions","csharp":"PositionCloseReason.StopLoss;","python":"PositionCloseReason.StopLoss","summary":"Position was closed by the Stop Loss.","remarks":null,"parameters":[],"returns":{"csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PositionCloseReason.TakeProfit","kind":"enum value","name":"TakeProfit","type":"T:cAlgo.API.PositionCloseReason","namespace":"cAlgo.API","group":"Positions","csharp":"PositionCloseReason.TakeProfit;","python":"PositionCloseReason.TakeProfit","summary":"Position was closed by the Take Profit.","remarks":null,"parameters":[],"returns":{"csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PositionCloseReason.StopOut","kind":"enum value","name":"StopOut","type":"T:cAlgo.API.PositionCloseReason","namespace":"cAlgo.API","group":"Positions","csharp":"PositionCloseReason.StopOut;","python":"PositionCloseReason.StopOut","summary":"Position was closed because the Stop Out level reached.","remarks":null,"parameters":[],"returns":{"csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/PositionCloseReason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PositionClosedEventArgs","kind":"class","name":"PositionClosedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PositionClosedEventArgs","python":"PositionClosedEventArgs","summary":"Provides data for the position closing event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        Positions.Closed += OnPositionClosed;\n    }\n\n    private void OnPositionClosed(PositionClosedEventArgs args)\n    {\n        var position = args.Position;\n        Print(\"Position closed with {0} profit\", position.GrossProfit);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.Positions.Closed += self.on_position_closed\n\n    def on_position_closed(self, args):\n        position = args.Position\n        print(f\"Position closed with {position.GrossProfit} profit\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.PositionClosedEventArgs.#ctor(cAlgo.API.Position,cAlgo.API.PositionCloseReason)","kind":"constructor","name":"PositionClosedEventArgs","type":"T:cAlgo.API.PositionClosedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PositionClosedEventArgs(Position position, PositionCloseReason reason)","python":"PositionClosedEventArgs(position: Position, reason: PositionCloseReason)","summary":"Provides data for the closing positions event.","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"reason","csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Closed += OnPositionsClosed;\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    Print(\"Position {0} closed, reason: {1}, net profit: {2}\", args.Position.Id, args.Reason, args.Position.NetProfit);\n}","python":"def on_start(self):\n    api.Positions.Closed += self.on_positions_closed\n\ndef on_positions_closed(self, args):\n    api.Print(f\"Position {args.Position.Id} closed, reason: {args.Reason}, net profit: {args.Position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PositionClosedEventArgs.Position","kind":"property","name":"Position","type":"T:cAlgo.API.PositionClosedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Position Position {get;}","python":"positionClosedEventArgs.Position: Position","summary":"Gets the position being closed.","remarks":null,"parameters":[],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Closed += OnPositionsClosed;\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    var position = args.Position;\n    if (position.Label != \"myLabel\")\n        return;\n\n    var oppositeTradeType = position.TradeType == TradeType.Buy ? TradeType.Sell : TradeType.Buy;\n    var tradeType = position.NetProfit > 0 ? position.TradeType : oppositeTradeType;\n    ExecuteMarketOrder(tradeType, position.SymbolName, position.VolumeInUnits, position.Label);\n}","python":"def on_start(self):\n    api.Positions.Closed += self.on_positions_closed\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\n\ndef on_positions_closed(self, args):\n    position = args.Position\n    if position.Label != \"myLabel\":\n        return\n\n    oppositeTradeType = TradeType.Sell if position.TradeType == TradeType.Buy else TradeType.Buy\n    tradeType = position.TradeType if position.NetProfit > 0 else oppositeTradeType\n    api.ExecuteMarketOrder(tradeType, position.SymbolName, position.VolumeInUnits, position.Label)"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PositionClosedEventArgs.Reason","kind":"property","name":"Reason","type":"T:cAlgo.API.PositionClosedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PositionCloseReason Reason {get;}","python":"positionClosedEventArgs.Reason: PositionCloseReason","summary":"Gets the reason of the position being closed.","remarks":null,"parameters":[],"returns":{"csharpType":"PositionCloseReason","pythonType":"PositionCloseReason","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Closed += OnPositionsClosed;\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    if (args.Reason == PositionCloseReason.StopLoss)\n        Print(\"Position {0} was stopped out with {1} net profit\", args.Position.Id, args.Position.NetProfit);\n}","python":"def on_start(self):\n    api.Positions.Closed += self.on_positions_closed\n\ndef on_positions_closed(self, args):\n    if args.Reason == PositionCloseReason.StopLoss:\n        api.Print(f\"Position {args.Position.Id} was stopped out with {args.Position.NetProfit} net profit\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Reason/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionClosedEventArgs/Reason/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PositionModifiedEventArgs","kind":"class","name":"PositionModifiedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PositionModifiedEventArgs","python":"PositionModifiedEventArgs","summary":"Provides data for the position modification event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use PositionModifiedEventArgs\n    public partial class Test : Robot\n    {\n        protected override void OnStart()\n        {\n            Positions.Modified += OnPositionModified;\n        }\n\n        private void OnPositionModified(PositionModifiedEventArgs obj)\n        {\n            Print($\"Position {obj.Position.Id} modified\");\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.Positions.Modified += self.on_position_modified\n\n    def on_position_modified(self, args):\n        print(f\"Position {args.Position.Id} modified\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionModifiedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionModifiedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PositionModifiedEventArgs.Position","kind":"property","name":"Position","type":"T:cAlgo.API.PositionModifiedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Position Position {get;}","python":"positionModifiedEventArgs.Position: Position","summary":"Gets or sets the modified position.","remarks":null,"parameters":[],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Modified += OnPositionsModified;\n}\n\nprivate void OnPositionsModified(PositionModifiedEventArgs args)\n{\n    var position = args.Position;\n    Print(\"Position {0} modified | Stop loss: {1} | Take profit: {2} | Volume: {3}\", position.Id, position.StopLoss, position.TakeProfit, position.VolumeInUnits);\n}","python":"def on_start(self):\n    api.Positions.Modified += self.on_positions_modified\n\ndef on_positions_modified(self, args):\n    position = args.Position\n    api.Print(f\"Position {position.Id} modified | Stop loss: {position.StopLoss} | Take profit: {position.TakeProfit} | Volume: {position.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionModifiedEventArgs/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionModifiedEventArgs/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PositionOpenedEventArgs","kind":"class","name":"PositionOpenedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PositionOpenedEventArgs","python":"PositionOpenedEventArgs","summary":"Provides data for the position opening event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public class Test : Robot\n{\n    protected override void OnStart()\n    {\n        Positions.Opened += OnPositionOpened;\n        ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");\n    }\n    private void OnPositionOpened(PositionOpenedEventArgs args)\n    {\n        var position = args.Position;\n        if(position.Label == \"myLabel\")\n            Print(\"Position opened by Test\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        api.Positions.Opened += self.on_position_opened\n        api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")\n\n    def on_position_opened(self, args):\n        position = args.Position\n        if position.Label == \"myLabel\":\n            print(\"Position opened by Test\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionOpenedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionOpenedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.PositionOpenedEventArgs.Position","kind":"property","name":"Position","type":"T:cAlgo.API.PositionOpenedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Position Position {get;}","python":"positionOpenedEventArgs.Position: Position","summary":"Gets or sets the position being opened.","remarks":null,"parameters":[],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Opened += OnPositionsOpened;\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\n}\n\nprivate void OnPositionsOpened(PositionOpenedEventArgs args)\n{\n    var position = args.Position;\n    Print(\"Position {0} opened at {1}, volume: {2}\", position.Id, position.EntryPrice, position.VolumeInUnits);\n}","python":"def on_start(self):\n    api.Positions.Opened += self.on_positions_opened\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\n\ndef on_positions_opened(self, args):\n    position = args.Position\n    api.Print(f\"Position {position.Id} opened at {position.EntryPrice}, volume: {position.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionOpenedEventArgs/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PositionOpenedEventArgs/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Positions","kind":"interface","name":"Positions","type":null,"namespace":"cAlgo.API","group":"Positions","csharp":"public interface Positions","python":"Positions","summary":"Provides access to methods of the positions collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Open positions: {0}\", Positions.Count);\nforeach (var position in Positions.FindAll(\"myLabel\", \"EURUSD\", TradeType.Buy))\n    Print(\"Position {0} net profit: {1}\", position.Id, position.NetProfit);","python":"api.Print(f\"Open positions: {api.Positions.Count}\")\nfor position in api.Positions.FindAll(\"myLabel\", \"EURUSD\", TradeType.Buy):\n    api.Print(f\"Position {position.Id} net profit: {position.NetProfit}\")"},{"csharp":"protected override void OnStart()\n{\n    Positions.Opened += OnPositionsOpened;\n    Positions.Closed += OnPositionsClosed;\n}\n\nprivate void OnPositionsOpened(PositionOpenedEventArgs args)\n{\n    Print(\"Position {0} opened\", args.Position.Id);\n}\n\nprivate void OnPositionsClosed(PositionClosedEventArgs args)\n{\n    Print(\"Position {0} closed, reason: {1}\", args.Position.Id, args.Reason);\n}","python":"def on_start(self):\n    api.Positions.Opened += self.on_positions_opened\n    api.Positions.Closed += self.on_positions_closed\n\ndef on_positions_opened(self, args):\n    api.Print(f\"Position {args.Position.Id} opened\")\n\ndef on_positions_closed(self, args):\n    api.Print(f\"Position {args.Position.Id} closed, reason: {args.Reason}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.Find(System.String)","kind":"method","name":"Find","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Find(string label)","python":"api.Positions.Find(label: str) -> Position | None","summary":"Find a position by its label.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"Position if it exists, null otherwise","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n    Print(\"Net profit: {0}\", position.NetProfit);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    api.Print(f\"Net profit: {position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.Find(System.String,System.String)","kind":"method","name":"Find","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Find(string label, string symbolName)","python":"api.Positions.Find(label: str, symbolName: str) -> Position | None","summary":"Find a position by its label and symbol name.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"Position if it exists, null otherwise","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\", \"EURUSD\");\nif (position != null)\n    Print(\"EURUSD position {0} net profit: {1}\", position.Id, position.NetProfit);","python":"position = api.Positions.Find(\"myLabel\", \"EURUSD\")\nif position is not None:\n    api.Print(f\"EURUSD position {position.Id} net profit: {position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.Find(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"Find","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Find(string label, string symbolName, TradeType tradeType)","python":"api.Positions.Find(label: str, symbolName: str, tradeType: TradeType) -> Position | None","summary":"Find a position by its label, symbol name and trade type","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type to search by"}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"Position if it exists, null otherwise","nullable":true},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Buy);\nif (position == null)\n    ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 20, 40);","python":"position = api.Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Buy)\nif position is None:\n    api.ExecuteMarketOrder(TradeType.Buy, \"EURUSD\", 10000, \"myLabel\", 20, 40)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Find/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindAll(System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position[] FindAll(string label)","python":"api.Positions.FindAll(label: str) -> list[Position]","summary":"Find all positions with this label.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"}],"returns":{"csharpType":"Position[]","pythonType":"list[Position]","summary":"Array of Positions","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions.FindAll(\"myLabel\"))\n{\n    if (!position.StopLoss.HasValue)\n        position.ModifyStopLossPips(20);\n}","python":"for position in api.Positions.FindAll(\"myLabel\"):\n    if position.StopLoss is None:\n        position.ModifyStopLossPips(20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindAll(System.String,System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position[] FindAll(string label, string symbolName)","python":"api.Positions.FindAll(label: str, symbolName: str) -> list[Position]","summary":"Find all positions with this label and symbol name.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"}],"returns":{"csharpType":"Position[]","pythonType":"list[Position]","summary":"Array of Positions","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var positions = Positions.FindAll(\"myLabel\", \"EURUSD\");\nPrint(\"EURUSD positions: {0}, total net profit: {1}\", positions.Length, positions.Sum(position => position.NetProfit));","python":"positions = api.Positions.FindAll(\"myLabel\", \"EURUSD\")\napi.Print(f\"EURUSD positions: {len(positions)}, total net profit: {sum(position.NetProfit for position in positions)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindAll(System.String,System.String,cAlgo.API.TradeType)","kind":"method","name":"FindAll","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position[] FindAll(string label, string symbolName, TradeType tradeType)","python":"api.Positions.FindAll(label: str, symbolName: str, tradeType: TradeType) -> list[Position]","summary":"Finds all the positions of this label, symbol name and trade type.","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":"Label to search by"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name to search by"},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Trade type to search by"}],"returns":{"csharpType":"Position[]","pythonType":"list[Position]","summary":"Array of Positions","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var position in Positions.FindAll(\"myLabel\", \"EURUSD\", TradeType.Sell))\n{\n    var result = ClosePosition(position);\n    Print(\"Position {0} closed: {1}\", position.Id, result.IsSuccessful);\n}","python":"for position in api.Positions.FindAll(\"myLabel\", \"EURUSD\", TradeType.Sell):\n    result = api.ClosePosition(position)\n    api.Print(f\"Position {position.Id} closed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindById(System.Int32)","kind":"method","name":"FindById","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position FindById(int id)","python":"api.Positions.FindById(id: int) -> Position | None","summary":"Find Position by Id.","remarks":null,"parameters":[{"name":"id","csharpType":"int","pythonType":"int","summary":"Position Id"}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"Position if found otherwise null.","nullable":true},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"const int positionId = 342343;\nvar position = Positions.FindById(positionId);\nif (position != null)\n    Print(\"Position {0} net profit: {1}\", positionId, position.NetProfit);","python":"positionId = 342343\nposition = api.Positions.FindById(positionId)\nif position is not None:\n    api.Print(f\"Position {positionId} net profit: {position.NetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindById/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/FindById/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Positions.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"int Count {get;}","python":"api.Positions.Count: int","summary":"The total number of open positions.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Positions.Count == 0)\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", 20, 40);","python":"if api.Positions.Count == 0:\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", 20, 40)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Positions.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Item {get;}","python":"api.Positions[index: int] -> Position","summary":"Finds a position by index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"the index in the list"}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Positions.Count > 0)\n    Print(\"First position Id: {0}\", Positions[0].Id);","python":"if api.Positions.Count > 0:\n    api.Print(f\"First position Id: {api.Positions[0].Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Positions.Closed","kind":"event","name":"Closed","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"event Action<PositionClosedEventArgs> Closed;","python":"api.Positions.Closed += handler  # handler(obj: PositionClosedEventArgs)","summary":"Occurs each time a position is closed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PositionClosedEventArgs>","pythonType":"Callable[[PositionClosedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Closed += OnPositionClosed;\n}\n\nprivate void OnPositionClosed(PositionClosedEventArgs args)\n{\n    var position = args.Position;\n    Print(\"Position {0} closed with {1} net profit, reason: {2}\", position.Id, position.NetProfit, args.Reason);\n}","python":"def on_start(self):\n    api.Positions.Closed += self.on_position_closed\n\ndef on_position_closed(self, args):\n    position = args.Position\n    api.Print(f\"Position {position.Id} closed with {position.NetProfit} net profit, reason: {args.Reason}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Closed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Closed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Positions.Modified","kind":"event","name":"Modified","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"event Action<PositionModifiedEventArgs> Modified;","python":"api.Positions.Modified += handler  # handler(obj: PositionModifiedEventArgs)","summary":"Occurs each time a position is modified.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PositionModifiedEventArgs>","pythonType":"Callable[[PositionModifiedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Modified += OnPositionModified;\n}\n\nprivate void OnPositionModified(PositionModifiedEventArgs args)\n{\n    var position = args.Position;\n    Print(\"Position {0} modified: SL {1}, TP {2}, volume {3}\", position.Id, position.StopLoss, position.TakeProfit, position.VolumeInUnits);\n}","python":"def on_start(self):\n    api.Positions.Modified += self.on_position_modified\n\ndef on_position_modified(self, args):\n    position = args.Position\n    api.Print(f\"Position {position.Id} modified: SL {position.StopLoss}, TP {position.TakeProfit}, volume {position.VolumeInUnits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Modified/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Modified/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Positions.Opened","kind":"event","name":"Opened","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"event Action<PositionOpenedEventArgs> Opened;","python":"api.Positions.Opened += handler  # handler(obj: PositionOpenedEventArgs)","summary":"Occurs each time a position is opened.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PositionOpenedEventArgs>","pythonType":"Callable[[PositionOpenedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Positions.Opened += OnPositionOpened;\n}\n\nprivate void OnPositionOpened(PositionOpenedEventArgs args)\n{\n    Print(\"Position {0} opened at {1}\", args.Position.Label, args.Position.EntryPrice);\n}","python":"def on_start(self):\n    api.Positions.Opened += self.on_position_opened\n\ndef on_position_opened(self, args):\n    api.Print(f\"Position {args.Position.Label} opened at {args.Position.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Opened/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/Opened/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.Find(System.String,cAlgo.API.Internals.Symbol)","kind":"method","name":"Find","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Find(string label, Symbol symbol)","python":"api.Positions.Find(label: str, symbol: Symbol) -> Position","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.Find(System.String,cAlgo.API.Internals.Symbol,cAlgo.API.TradeType)","kind":"method","name":"Find","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position Find(string label, Symbol symbol, TradeType tradeType)","python":"api.Positions.Find(label: str, symbol: Symbol, tradeType: TradeType) -> Position","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""}],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindAll(System.String,cAlgo.API.Internals.Symbol)","kind":"method","name":"FindAll","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position[] FindAll(string label, Symbol symbol)","python":"api.Positions.FindAll(label: str, symbol: Symbol) -> list[Position]","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""}],"returns":{"csharpType":"Position[]","pythonType":"list[Position]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Positions.FindAll(System.String,cAlgo.API.Internals.Symbol,cAlgo.API.TradeType)","kind":"method","name":"FindAll","type":"T:cAlgo.API.Positions","namespace":"cAlgo.API","group":"Positions","csharp":"Position[] FindAll(string label, Symbol symbol, TradeType tradeType)","python":"api.Positions.FindAll(label: str, symbol: Symbol, tradeType: TradeType) -> list[Position]","summary":"","remarks":null,"parameters":[{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""}],"returns":{"csharpType":"Position[]","pythonType":"list[Position]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Positions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.PositiveVolumeIndex","kind":"interface","name":"PositiveVolumeIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface PositiveVolumeIndex","python":"PositiveVolumeIndex","summary":"The positive volume index measures the trend of the stock prices for days when volume increases from previous day's volume.","remarks":"Assumes that the smart money is active on days when volume decreases (measured by the Negative Volume Index) and the not-so-smart money is active on days when volume increases.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PositiveVolumeIndex _positiveVolume;\n\nprotected override void Initialize()\n{\n   _positiveVolume = Indicators.PositiveVolumeIndex(Source);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _positiveVolume.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.positiveVolumeIndex = api.Indicators.PositiveVolumeIndex(api.Source)\n\n    def calculate(self, index):\n        api.Result[index] = self.positiveVolumeIndex.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Positive/Negative Volume Index indicators\n    public partial class VolumeIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PositiveVolumeIndex _positiveVolumeIndex;\n        private NegativeVolumeIndex _negativeVolumeIndex;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _positiveVolumeIndex = Indicators.PositiveVolumeIndex(Bars.ClosePrices);\n            _negativeVolumeIndex = Indicators.NegativeVolumeIndex(Bars.ClosePrices);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (BotPositions.Length == 0 && _negativeVolumeIndex.Result.Last(1) > _positiveVolumeIndex.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n            else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (BotPositions.Length == 0 && _negativeVolumeIndex.Result.Last(1) > _positiveVolumeIndex.Result.Last(1))\n                {\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n                }\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.positiveVolumeIndex = api.Indicators.PositiveVolumeIndex(api.Bars.ClosePrices)\n        self.negativeVolumeIndex = api.Indicators.NegativeVolumeIndex(api.Bars.ClosePrices)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\n    def on_bar(self):\n        if api.Bars.ClosePrices.Last(1) > self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            if len(self.get_bot_positions()) == 0 and self.negativeVolumeIndex.Result.Last(1) > self.positiveVolumeIndex.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(1) < self.simpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            if len(self.get_bot_positions()) == 0 and self.negativeVolumeIndex.Result.Last(1) > self.positiveVolumeIndex.Result.Last(1):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PositiveVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PositiveVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PositiveVolumeIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.PositiveVolumeIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"positiveVolumeIndex.Result: IndicatorDataSeries","summary":"Gets or sets the time series result of the Positive Volume Index indicator instance.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var positiveVolume = Indicators.PositiveVolumeIndex(Bars.ClosePrices);\nPrint(\"Positive Volume Index: {0}\", positiveVolume.Result.Last(1));","python":"positiveVolume = api.Indicators.PositiveVolumeIndex(api.Bars.ClosePrices)\napi.Print(f\"Positive Volume Index: {positiveVolume.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PositiveVolumeIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PositiveVolumeIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PriceAlert","kind":"interface","name":"PriceAlert","type":null,"namespace":"cAlgo.API","group":"Price Alert","csharp":"public interface PriceAlert","python":"PriceAlert","summary":"Represents a price alert.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var priceAlert = PriceAlerts.Add(Symbol, Symbol.Bid + 50 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\nPrint(\"Alert {0}: {1} {2} {3} {4}\", priceAlert.Id, priceAlert.Symbol.Name, priceAlert.QuoteType, priceAlert.Condition, priceAlert.Price);","python":"priceAlert = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 50 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\napi.Print(f\"Alert {priceAlert.Id}: {priceAlert.Symbol.Name} {priceAlert.QuoteType} {priceAlert.Condition} {priceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"M:cAlgo.API.PriceAlert.Update(cAlgo.API.Internals.Symbol,System.Double,cAlgo.API.PriceAlertQuoteType,cAlgo.API.PriceAlertCondition)","kind":"method","name":"Update","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"void Update(Symbol symbol, double price, PriceAlertQuoteType quoteType, PriceAlertCondition condition)","python":"priceAlert.Update(symbol: Symbol, price: float, quoteType: PriceAlertQuoteType, condition: PriceAlertCondition) -> None","summary":"Updates price alert.","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Symbol"},{"name":"price","csharpType":"double","pythonType":"float","summary":"Price"},{"name":"quoteType","csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"Quote type"},{"name":"condition","csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"Condition"}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var priceAlert = PriceAlerts.Add(Symbol, Symbol.Bid + 50 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\npriceAlert.Update(Symbol, Symbol.Ask + 100 * Symbol.PipSize, PriceAlertQuoteType.Ask, PriceAlertCondition.HigherOrEqual);\nPrint(\"Alert {0} moved to {1}\", priceAlert.Id, priceAlert.Price);","python":"priceAlert = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 50 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\npriceAlert.Update(api.Symbol, api.Symbol.Ask + 100 * api.Symbol.PipSize, PriceAlertQuoteType.Ask, PriceAlertCondition.HigherOrEqual)\napi.Print(f\"Alert {priceAlert.Id} moved to {priceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Update/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Update/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"M:cAlgo.API.PriceAlert.Update(cAlgo.API.Internals.Symbol,System.Double,cAlgo.API.PriceAlertQuoteType,cAlgo.API.PriceAlertCondition,System.Boolean,System.String)","kind":"method","name":"Update","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"void Update(Symbol symbol, double price, PriceAlertQuoteType quoteType, PriceAlertCondition condition, bool showPopup, string message)","python":"priceAlert.Update(symbol: Symbol, price: float, quoteType: PriceAlertQuoteType, condition: PriceAlertCondition, showPopup: bool, message: str) -> None","summary":"Updates price alert.","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Symbol"},{"name":"price","csharpType":"double","pythonType":"float","summary":"Price"},{"name":"quoteType","csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"Quote type"},{"name":"condition","csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"Condition"},{"name":"showPopup","csharpType":"bool","pythonType":"bool","summary":"Show Popup"},{"name":"message","csharpType":"string","pythonType":"str","summary":"Message"}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var priceAlert = PriceAlerts.Add(Symbol, Symbol.Bid + 50 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\npriceAlert.Update(Symbol, priceAlert.Price, priceAlert.QuoteType, priceAlert.Condition, true, SymbolName + \" reached the target\");\nPrint(\"Alert {0} shows a pop-up: {1} | Message: {2}\", priceAlert.Id, priceAlert.ShowPopup, priceAlert.Message);","python":"priceAlert = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 50 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\npriceAlert.Update(api.Symbol, priceAlert.Price, priceAlert.QuoteType, priceAlert.Condition, True, f\"{api.SymbolName} reached the target\")\napi.Print(f\"Alert {priceAlert.Id} shows a pop-up: {priceAlert.ShowPopup} | Message: {priceAlert.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Update/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Update/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.Condition","kind":"property","name":"Condition","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertCondition Condition {get;}","python":"priceAlert.Condition: PriceAlertCondition","summary":"Get condition.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n{\n    if (priceAlert.Condition == PriceAlertCondition.LowerOrEqual)\n        Print(\"Alert {0} triggers at or below {1}\", priceAlert.Id, priceAlert.Price);\n}","python":"for priceAlert in api.PriceAlerts:\n    if priceAlert.Condition == PriceAlertCondition.LowerOrEqual:\n        api.Print(f\"Alert {priceAlert.Id} triggers at or below {priceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Condition/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Condition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.Id","kind":"property","name":"Id","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"long Id {get;}","python":"priceAlert.Id: int","summary":"Get unique Id.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n    Print(\"{0} alert Id: {1}\", priceAlert.Symbol.Name, priceAlert.Id);","python":"for priceAlert in api.PriceAlerts:\n    api.Print(f\"{priceAlert.Symbol.Name} alert Id: {priceAlert.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.LastUpdateTime","kind":"property","name":"LastUpdateTime","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"DateTime LastUpdateTime {get;}","python":"priceAlert.LastUpdateTime: DateTime","summary":"Get/set last update time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n    Print(\"Alert {0} last updated at {1}\", priceAlert.Id, priceAlert.LastUpdateTime);","python":"for priceAlert in api.PriceAlerts:\n    api.Print(f\"Alert {priceAlert.Id} last updated at {priceAlert.LastUpdateTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/LastUpdateTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/LastUpdateTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.Message","kind":"property","name":"Message","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"string Message {get;}","python":"priceAlert.Message: str","summary":"Get optional message.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n{\n    if (!string.IsNullOrEmpty(priceAlert.Message))\n        Print(\"Alert {0} message: {1}\", priceAlert.Id, priceAlert.Message);\n}","python":"for priceAlert in api.PriceAlerts:\n    if priceAlert.Message:\n        api.Print(f\"Alert {priceAlert.Id} message: {priceAlert.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Message/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Message/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.Price","kind":"property","name":"Price","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"double Price {get;}","python":"priceAlert.Price: float","summary":"Get price level.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n{\n    var distanceInPips = (priceAlert.Price - priceAlert.Symbol.Bid) / priceAlert.Symbol.PipSize;\n    Print(\"Alert {0} price {1} is {2:F1} pips away\", priceAlert.Id, priceAlert.Price, distanceInPips);\n}","python":"for priceAlert in api.PriceAlerts:\n    distanceInPips = (priceAlert.Price - priceAlert.Symbol.Bid) / priceAlert.Symbol.PipSize\n    api.Print(f\"Alert {priceAlert.Id} price {priceAlert.Price} is {distanceInPips:.1f} pips away\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Price/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Price/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.QuoteType","kind":"property","name":"QuoteType","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertQuoteType QuoteType {get;}","python":"priceAlert.QuoteType: PriceAlertQuoteType","summary":"Get quote type.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n{\n    if (priceAlert.QuoteType == PriceAlertQuoteType.Ask)\n        Print(\"Alert {0} watches the ask price\", priceAlert.Id);\n}","python":"for priceAlert in api.PriceAlerts:\n    if priceAlert.QuoteType == PriceAlertQuoteType.Ask:\n        api.Print(f\"Alert {priceAlert.Id} watches the ask price\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/QuoteType/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/QuoteType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.ShowPopup","kind":"property","name":"ShowPopup","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"bool ShowPopup {get;}","python":"priceAlert.ShowPopup: bool","summary":"Get if the price alert will show a pop-up.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n    Print(\"Alert {0} shows a pop-up: {1}\", priceAlert.Id, priceAlert.ShowPopup);","python":"for priceAlert in api.PriceAlerts:\n    api.Print(f\"Alert {priceAlert.Id} shows a pop-up: {priceAlert.ShowPopup}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/ShowPopup/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/ShowPopup/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"P:cAlgo.API.PriceAlert.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.PriceAlert","namespace":"cAlgo.API","group":"Price Alert","csharp":"Symbol Symbol {get;}","python":"priceAlert.Symbol: Symbol","summary":"Get symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts)\n    Print(\"Alert {0} symbol: {1} (current bid {2})\", priceAlert.Id, priceAlert.Symbol.Name, priceAlert.Symbol.Bid);","python":"for priceAlert in api.PriceAlerts:\n    api.Print(f\"Alert {priceAlert.Id} symbol: {priceAlert.Symbol.Name} (current bid {priceAlert.Symbol.Bid})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlert/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (PriceAlerts, PriceAlerts.Add, PriceAlerts.Find and more)."}]}
{"id":"T:cAlgo.API.PriceAlertAddedEventArgs","kind":"class","name":"PriceAlertAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PriceAlertAddedEventArgs","python":"PriceAlertAddedEventArgs","summary":"Provides data for the price alert added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Added += OnPriceAlertsAdded;\n}\n\nprivate void OnPriceAlertsAdded(PriceAlertAddedEventArgs args)\n{\n    Print(\"Price alert added for {0} at {1}\", args.PriceAlert.Symbol.Name, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Added += self.on_price_alerts_added\n\ndef on_price_alerts_added(self, args):\n    api.Print(f\"Price alert added for {args.PriceAlert.Symbol.Name} at {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Added)."}]}
{"id":"P:cAlgo.API.PriceAlertAddedEventArgs.PriceAlert","kind":"property","name":"PriceAlert","type":"T:cAlgo.API.PriceAlertAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PriceAlert PriceAlert {get;}","python":"priceAlertAddedEventArgs.PriceAlert: PriceAlert","summary":"Gets added price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Added += OnPriceAlertsAdded;\n}\n\nprivate void OnPriceAlertsAdded(PriceAlertAddedEventArgs args)\n{\n    var alert = args.PriceAlert;\n    Print(\"Alert {0}: {1} {2} {3} ({4})\", alert.Id, alert.Symbol.Name, alert.Condition, alert.Price, alert.QuoteType);\n}","python":"def on_start(self):\n    api.PriceAlerts.Added += self.on_price_alerts_added\n\ndef on_price_alerts_added(self, args):\n    alert = args.PriceAlert\n    api.Print(f\"Alert {alert.Id}: {alert.Symbol.Name} {alert.Condition} {alert.Price} ({alert.QuoteType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertAddedEventArgs/PriceAlert/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertAddedEventArgs/PriceAlert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Added)."}]}
{"id":"T:cAlgo.API.PriceAlertCondition","kind":"enum","name":"PriceAlertCondition","type":null,"namespace":"cAlgo.API","group":"Price Alert","csharp":"public enum PriceAlertCondition","python":"PriceAlertCondition","summary":"Represents the price alert conditions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var resistance = Bars.HighPrices.Maximum(50);\nPriceAlerts.Add(Symbol, resistance, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\nPrint(\"Alert added for a breakout above {0}\", resistance);","python":"resistance = Functions.Maximum(api.Bars.HighPrices, 50)\napi.PriceAlerts.Add(api.Symbol, resistance, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\napi.Print(f\"Alert added for a breakout above {resistance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceAlertCondition.HigherOrEqual","kind":"enum value","name":"HigherOrEqual","type":"T:cAlgo.API.PriceAlertCondition","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertCondition.HigherOrEqual;","python":"PriceAlertCondition.HigherOrEqual","summary":"Price alert will be triggered if symbol price is above or equal than alert price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceAlertCondition.LowerOrEqual","kind":"enum value","name":"LowerOrEqual","type":"T:cAlgo.API.PriceAlertCondition","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertCondition.LowerOrEqual;","python":"PriceAlertCondition.LowerOrEqual","summary":"Price alert will be triggered if symbol price is lower or equal than alert price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertCondition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PriceAlertQuoteType","kind":"enum","name":"PriceAlertQuoteType","type":null,"namespace":"cAlgo.API","group":"Price Alert","csharp":"public enum PriceAlertQuoteType","python":"PriceAlertQuoteType","summary":"Represents the price alert quote types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var support = Bars.LowPrices.Minimum(50);\nPriceAlerts.Add(Symbol, support, PriceAlertQuoteType.Ask, PriceAlertCondition.LowerOrEqual);\nPrint(\"Alert added when the ask price drops to {0}\", support);","python":"support = Functions.Minimum(api.Bars.LowPrices, 50)\napi.PriceAlerts.Add(api.Symbol, support, PriceAlertQuoteType.Ask, PriceAlertCondition.LowerOrEqual)\napi.Print(f\"Alert added when the ask price drops to {support}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceAlertQuoteType.Bid","kind":"enum value","name":"Bid","type":"T:cAlgo.API.PriceAlertQuoteType","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertQuoteType.Bid;","python":"PriceAlertQuoteType.Bid","summary":"Symbol Bid price will be used for price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceAlertQuoteType.Ask","kind":"enum value","name":"Ask","type":"T:cAlgo.API.PriceAlertQuoteType","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlertQuoteType.Ask;","python":"PriceAlertQuoteType.Ask","summary":"Symbol Ask price will be used for price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlertQuoteType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PriceAlertRemovedEventArgs","kind":"class","name":"PriceAlertRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PriceAlertRemovedEventArgs","python":"PriceAlertRemovedEventArgs","summary":"Provides data for the price alert removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Removed += OnPriceAlertsRemoved;\n}\n\nprivate void OnPriceAlertsRemoved(PriceAlertRemovedEventArgs args)\n{\n    Print(\"Price alert {0} for {1} removed\", args.PriceAlert.Id, args.PriceAlert.Symbol.Name);\n}","python":"def on_start(self):\n    api.PriceAlerts.Removed += self.on_price_alerts_removed\n\ndef on_price_alerts_removed(self, args):\n    api.Print(f\"Price alert {args.PriceAlert.Id} for {args.PriceAlert.Symbol.Name} removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Removed)."}]}
{"id":"P:cAlgo.API.PriceAlertRemovedEventArgs.PriceAlert","kind":"property","name":"PriceAlert","type":"T:cAlgo.API.PriceAlertRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PriceAlert PriceAlert {get;}","python":"priceAlertRemovedEventArgs.PriceAlert: PriceAlert","summary":"Gets removed price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Removed += OnPriceAlertsRemoved;\n}\n\nprivate void OnPriceAlertsRemoved(PriceAlertRemovedEventArgs args)\n{\n    Print(\"Removed alert was at {0}, alerts left: {1}\", args.PriceAlert.Price, PriceAlerts.Count);\n}","python":"def on_start(self):\n    api.PriceAlerts.Removed += self.on_price_alerts_removed\n\ndef on_price_alerts_removed(self, args):\n    api.Print(f\"Removed alert was at {args.PriceAlert.Price}, alerts left: {api.PriceAlerts.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertRemovedEventArgs/PriceAlert/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertRemovedEventArgs/PriceAlert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Removed)."}]}
{"id":"T:cAlgo.API.PriceAlertTriggeredEventArgs","kind":"class","name":"PriceAlertTriggeredEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PriceAlertTriggeredEventArgs","python":"PriceAlertTriggeredEventArgs","summary":"Provides data for the price alert triggered event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Triggered += OnPriceAlertsTriggered;\n}\n\nprivate void OnPriceAlertsTriggered(PriceAlertTriggeredEventArgs args)\n{\n    Print(\"Price alert triggered: {0} {1} {2}\", args.PriceAlert.Symbol.Name, args.PriceAlert.Condition, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Triggered += self.on_price_alerts_triggered\n\ndef on_price_alerts_triggered(self, args):\n    api.Print(f\"Price alert triggered: {args.PriceAlert.Symbol.Name} {args.PriceAlert.Condition} {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertTriggeredEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertTriggeredEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Triggered)."}]}
{"id":"P:cAlgo.API.PriceAlertTriggeredEventArgs.PriceAlert","kind":"property","name":"PriceAlert","type":"T:cAlgo.API.PriceAlertTriggeredEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PriceAlert PriceAlert {get;}","python":"priceAlertTriggeredEventArgs.PriceAlert: PriceAlert","summary":"Gets triggered price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Triggered += OnPriceAlertsTriggered;\n}\n\nprivate void OnPriceAlertsTriggered(PriceAlertTriggeredEventArgs args)\n{\n    if (args.PriceAlert.Symbol.Name == SymbolName)\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"priceAlert\");\n}","python":"def on_start(self):\n    api.PriceAlerts.Triggered += self.on_price_alerts_triggered\n\ndef on_price_alerts_triggered(self, args):\n    if args.PriceAlert.Symbol.Name == api.SymbolName:\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"priceAlert\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertTriggeredEventArgs/PriceAlert/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertTriggeredEventArgs/PriceAlert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Triggered)."}]}
{"id":"T:cAlgo.API.PriceAlertUpdatedEventArgs","kind":"class","name":"PriceAlertUpdatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class PriceAlertUpdatedEventArgs","python":"PriceAlertUpdatedEventArgs","summary":"Provides data for the price alert updated event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Updated += OnPriceAlertsUpdated;\n}\n\nprivate void OnPriceAlertsUpdated(PriceAlertUpdatedEventArgs args)\n{\n    Print(\"Price alert {0} updated, new price: {1}\", args.PriceAlert.Id, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Updated += self.on_price_alerts_updated\n\ndef on_price_alerts_updated(self, args):\n    api.Print(f\"Price alert {args.PriceAlert.Id} updated, new price: {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertUpdatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertUpdatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Updated)."}]}
{"id":"P:cAlgo.API.PriceAlertUpdatedEventArgs.PriceAlert","kind":"property","name":"PriceAlert","type":"T:cAlgo.API.PriceAlertUpdatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public PriceAlert PriceAlert {get;}","python":"priceAlertUpdatedEventArgs.PriceAlert: PriceAlert","summary":"Gets updated price alert.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Updated += OnPriceAlertsUpdated;\n}\n\nprivate void OnPriceAlertsUpdated(PriceAlertUpdatedEventArgs args)\n{\n    var alert = args.PriceAlert;\n    Print(\"Alert {0} updated at {1}, message: {2}\", alert.Id, alert.LastUpdateTime, alert.Message);\n}","python":"def on_start(self):\n    api.PriceAlerts.Updated += self.on_price_alerts_updated\n\ndef on_price_alerts_updated(self, args):\n    alert = args.PriceAlert\n    api.Print(f\"Alert {alert.Id} updated at {alert.LastUpdateTime}, message: {alert.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertUpdatedEventArgs/PriceAlert/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/PriceAlertUpdatedEventArgs/PriceAlert/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (PriceAlerts.Updated)."}]}
{"id":"T:cAlgo.API.PriceAlerts","kind":"interface","name":"PriceAlerts","type":null,"namespace":"cAlgo.API","group":"Price Alert","csharp":"public interface PriceAlerts","python":"PriceAlerts","summary":"Represents a collection of price alerts.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        Print($\"Price Alerts Count: {PriceAlerts.Count}\");\n\n        foreach (var priceAlert in PriceAlerts)\n        {\n            Print($\"Price Alert Id: {priceAlert.Id}, Symbol: {priceAlert.Symbol.Name}, Price: {priceAlert.Price}, Quote Type: {priceAlert.QuoteType}, Condition: {priceAlert.Condition}\");\n        }\n\n        PriceAlerts.Added += args => Print($\"Price Alert added: {args.PriceAlert.Id}\");\n        PriceAlerts.Removed += args => Print($\"Price Alert removed: {args.PriceAlert.Id}\");\n        PriceAlerts.Updated += args => Print($\"Price Alert updated: {args.PriceAlert.Id}\");\n        PriceAlerts.Triggered += args => Print($\"Price Alert triggered: {args.PriceAlert.Id}\");\n\n        var newPriceAlert = PriceAlerts.Add(Symbol, Symbol.Bid + (100 * Symbol.PipSize), PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\n\n        newPriceAlert.Update(Symbol, newPriceAlert.Price, newPriceAlert.QuoteType, newPriceAlert.Condition, true, \"Price alert message\");\n\n        Print($\"Finding price alert result: {PriceAlerts.Find(newPriceAlert.Id) == newPriceAlert}\");\n\n        PriceAlerts.Remove(newPriceAlert);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        print(f\"Price Alerts Count: {api.PriceAlerts.Count}\")\n\n        for priceAlert in api.PriceAlerts:\n            print(f\"Price Alert Id: {priceAlert.Id}, Symbol: {priceAlert.Symbol.Name}, Price: {priceAlert.Price}, Quote Type: {priceAlert.QuoteType}, Condition: {priceAlert.Condition}\")\n\n        api.PriceAlerts.Added += lambda args: print(f\"Price Alert added: {args.PriceAlert.Id}\")\n        api.PriceAlerts.Removed += lambda args: print(f\"Price Alert removed: {args.PriceAlert.Id}\")\n        api.PriceAlerts.Updated += lambda args: print(f\"Price Alert updated: {args.PriceAlert.Id}\")\n        api.PriceAlerts.Triggered += lambda args: print(f\"Price Alert triggered: {args.PriceAlert.Id}\")\n\n        newPriceAlert = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + (100 * api.Symbol.PipSize), PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\n        newPriceAlert.Update(api.Symbol, newPriceAlert.Price, newPriceAlert.QuoteType, newPriceAlert.Condition, True, \"Price alert message\")\n\n        print(f\"Finding price alert result: {api.PriceAlerts.Find(newPriceAlert.Id) == newPriceAlert}\")\n\n        api.PriceAlerts.Remove(newPriceAlert)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"M:cAlgo.API.PriceAlerts.Add(cAlgo.API.Internals.Symbol,System.Double,cAlgo.API.PriceAlertQuoteType,cAlgo.API.PriceAlertCondition)","kind":"method","name":"Add","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlert Add(Symbol symbol, double price, PriceAlertQuoteType quoteType, PriceAlertCondition condition)","python":"api.PriceAlerts.Add(symbol: Symbol, price: float, quoteType: PriceAlertQuoteType, condition: PriceAlertCondition) -> PriceAlert","summary":"Adds a new price alert.","remarks":null,"parameters":[{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Symbol"},{"name":"price","csharpType":"double","pythonType":"float","summary":"Price"},{"name":"quoteType","csharpType":"PriceAlertQuoteType","pythonType":"PriceAlertQuoteType","summary":"Quote type"},{"name":"condition","csharpType":"PriceAlertCondition","pythonType":"PriceAlertCondition","summary":"Condition"}],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"Added PriceAlert.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var targetPrice = Symbol.Bid - 30 * Symbol.PipSize;\nvar priceAlert = PriceAlerts.Add(Symbol, targetPrice, PriceAlertQuoteType.Bid, PriceAlertCondition.LowerOrEqual);\nPrint(\"Price alert {0} added at {1}\", priceAlert.Id, priceAlert.Price);","python":"targetPrice = api.Symbol.Bid - 30 * api.Symbol.PipSize\npriceAlert = api.PriceAlerts.Add(api.Symbol, targetPrice, PriceAlertQuoteType.Bid, PriceAlertCondition.LowerOrEqual)\napi.Print(f\"Price alert {priceAlert.Id} added at {priceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Add/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Add/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Throws ArgumentException 'Price alert is not supported in current environment.' (after normal argument validation)."}]}
{"id":"M:cAlgo.API.PriceAlerts.Find(System.Int64)","kind":"method","name":"Find","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlert Find(long id)","python":"api.PriceAlerts.Find(id: int) -> PriceAlert | None","summary":"Finds a price alert by its Id.","remarks":null,"parameters":[{"name":"id","csharpType":"long","pythonType":"int","summary":"The Id of the price alert."}],"returns":{"csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"PriceAlert if it exists, null otherwise.","nullable":true},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var added = PriceAlerts.Add(Symbol, Symbol.Bid + 50 * Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual);\nvar priceAlert = PriceAlerts.Find(added.Id);\nif (priceAlert != null)\n    Print(\"Found alert {0} at {1}\", priceAlert.Id, priceAlert.Price);","python":"added = api.PriceAlerts.Add(api.Symbol, api.Symbol.Bid + 50 * api.Symbol.PipSize, PriceAlertQuoteType.Bid, PriceAlertCondition.HigherOrEqual)\npriceAlert = api.PriceAlerts.Find(added.Id)\nif priceAlert is not None:\n    api.Print(f\"Found alert {priceAlert.Id} at {priceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Find/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Find/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"M:cAlgo.API.PriceAlerts.FindAll(System.String)","kind":"method","name":"FindAll","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"PriceAlert[] FindAll(string symbolName)","python":"api.PriceAlerts.FindAll(symbolName: str) -> list[PriceAlert]","summary":"Finds all price alerts by their symbol.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"The symbol name of the price alert."}],"returns":{"csharpType":"PriceAlert[]","pythonType":"list[PriceAlert]","summary":"Array of PriceAlerts.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var eurUsdAlerts = PriceAlerts.FindAll(\"EURUSD\");\nPrint(\"EURUSD price alerts: {0}\", eurUsdAlerts.Length);","python":"eurUsdAlerts = api.PriceAlerts.FindAll(\"EURUSD\")\napi.Print(f\"EURUSD price alerts: {len(eurUsdAlerts)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/FindAll/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/FindAll/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"M:cAlgo.API.PriceAlerts.Remove(cAlgo.API.PriceAlert)","kind":"method","name":"Remove","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"bool Remove(PriceAlert priceAlert)","python":"api.PriceAlerts.Remove(priceAlert: PriceAlert) -> bool","summary":"Removes a price alert.","remarks":null,"parameters":[{"name":"priceAlert","csharpType":"PriceAlert","pythonType":"PriceAlert","summary":"Price alert"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if succeeded otherwise False.","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var priceAlert in PriceAlerts.FindAll(SymbolName))\n{\n    var removed = PriceAlerts.Remove(priceAlert);\n    Print(\"Alert {0} removed: {1}\", priceAlert.Id, removed);\n}","python":"for priceAlert in api.PriceAlerts.FindAll(api.SymbolName):\n    removed = api.PriceAlerts.Remove(priceAlert)\n    api.Print(f\"Alert {priceAlert.Id} removed: {removed}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Remove/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Remove/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"P:cAlgo.API.PriceAlerts.Count","kind":"property","name":"Count","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"int Count {get;}","python":"api.PriceAlerts.Count: int","summary":"Gets the total number of active price alerts.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Active price alerts: {0}\", PriceAlerts.Count);","python":"api.Print(f\"Active price alerts: {api.PriceAlerts.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"E:cAlgo.API.PriceAlerts.Added","kind":"event","name":"Added","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"event Action<PriceAlertAddedEventArgs> Added;","python":"api.PriceAlerts.Added += handler  # handler(obj: PriceAlertAddedEventArgs)","summary":"Occurs when a new price alert is added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PriceAlertAddedEventArgs>","pythonType":"Callable[[PriceAlertAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Added += OnPriceAlertAdded;\n}\n\nprivate void OnPriceAlertAdded(PriceAlertAddedEventArgs args)\n{\n    Print(\"Price alert added: {0} at {1}\", args.PriceAlert.Symbol.Name, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Added += self.on_price_alert_added\n\ndef on_price_alert_added(self, args):\n    api.Print(f\"Price alert added: {args.PriceAlert.Symbol.Name} at {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"E:cAlgo.API.PriceAlerts.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"event Action<PriceAlertRemovedEventArgs> Removed;","python":"api.PriceAlerts.Removed += handler  # handler(obj: PriceAlertRemovedEventArgs)","summary":"Occurs when a price alert is removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PriceAlertRemovedEventArgs>","pythonType":"Callable[[PriceAlertRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Removed += OnPriceAlertRemoved;\n}\n\nprivate void OnPriceAlertRemoved(PriceAlertRemovedEventArgs args)\n{\n    Print(\"Price alert removed: {0}\", args.PriceAlert.Id);\n}","python":"def on_start(self):\n    api.PriceAlerts.Removed += self.on_price_alert_removed\n\ndef on_price_alert_removed(self, args):\n    api.Print(f\"Price alert removed: {args.PriceAlert.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"E:cAlgo.API.PriceAlerts.Triggered","kind":"event","name":"Triggered","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"event Action<PriceAlertTriggeredEventArgs> Triggered;","python":"api.PriceAlerts.Triggered += handler  # handler(obj: PriceAlertTriggeredEventArgs)","summary":"Occurs when a price alert is triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PriceAlertTriggeredEventArgs>","pythonType":"Callable[[PriceAlertTriggeredEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Triggered += OnPriceAlertTriggered;\n}\n\nprivate void OnPriceAlertTriggered(PriceAlertTriggeredEventArgs args)\n{\n    Print(\"Price alert triggered: {0} reached {1}\", args.PriceAlert.Symbol.Name, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Triggered += self.on_price_alert_triggered\n\ndef on_price_alert_triggered(self, args):\n    api.Print(f\"Price alert triggered: {args.PriceAlert.Symbol.Name} reached {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Triggered/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Triggered/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"E:cAlgo.API.PriceAlerts.Updated","kind":"event","name":"Updated","type":"T:cAlgo.API.PriceAlerts","namespace":"cAlgo.API","group":"Price Alert","csharp":"event Action<PriceAlertUpdatedEventArgs> Updated;","python":"api.PriceAlerts.Updated += handler  # handler(obj: PriceAlertUpdatedEventArgs)","summary":"Occurs when a price alert is updated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<PriceAlertUpdatedEventArgs>","pythonType":"Callable[[PriceAlertUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    PriceAlerts.Updated += OnPriceAlertUpdated;\n}\n\nprivate void OnPriceAlertUpdated(PriceAlertUpdatedEventArgs args)\n{\n    Print(\"Price alert {0} updated, new price: {1}\", args.PriceAlert.Id, args.PriceAlert.Price);\n}","python":"def on_start(self):\n    api.PriceAlerts.Updated += self.on_price_alert_updated\n\ndef on_price_alert_updated(self, args):\n    api.Print(f\"Price alert {args.PriceAlert.Id} updated, new price: {args.PriceAlert.Price}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Updated/","markdown":"https://help.ctrader.com/ctrader-algo/references/PriceAlert/PriceAlerts/Updated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised."}]}
{"id":"T:cAlgo.API.PriceDataSourceId","kind":"struct","name":"PriceDataSourceId","type":null,"namespace":"cAlgo.API","group":"DataSource","csharp":"public sealed struct PriceDataSourceId : ValueType","python":"PriceDataSourceId","summary":"Represents the Id for price data, it's used for backtesting data sources.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var priceDataSourceId = request.PriceDataSourceId;\n    Print(\"Data requested for {0} {1}\", priceDataSourceId.Symbol.Name, priceDataSourceId.TimeFrame);\n}","python":"def on_data_requested(self, request):\n    priceDataSourceId = request.PriceDataSourceId\n    api.Print(f\"Data requested for {priceDataSourceId.Symbol.Name} {priceDataSourceId.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.PriceDataSourceId.#ctor(cAlgo.API.Internals.Symbol,cAlgo.API.TimeFrame)","kind":"constructor","name":"PriceDataSourceId","type":"T:cAlgo.API.PriceDataSourceId","namespace":"cAlgo.API","group":"DataSource","csharp":"public PriceDataSourceId(Symbol Symbol, TimeFrame TimeFrame)","python":"PriceDataSourceId(Symbol: Symbol, TimeFrame: TimeFrame)","summary":"Represents the Id for price data, it's used for backtesting data sources.","remarks":null,"parameters":[{"name":"Symbol","csharpType":"Symbol","pythonType":"Symbol","summary":"Symbol"},{"name":"TimeFrame","csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"TimeFrame"}],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"private void OnDataRequested(BacktestingDataRequest request)\n{\n    var priceDataSourceId = request.PriceDataSourceId;\n    Print(\"Data requested for {0} {1}\", priceDataSourceId.Symbol.Name, priceDataSourceId.TimeFrame);\n}","python":"def on_data_requested(self, request):\n    priceDataSourceId = request.PriceDataSourceId\n    api.Print(f\"Data requested for {priceDataSourceId.Symbol.Name} {priceDataSourceId.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.PriceDataSourceId.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.PriceDataSourceId","namespace":"cAlgo.API","group":"DataSource","csharp":"public Symbol Symbol {get; set;}","python":"priceDataSourceId.Symbol: Symbol","summary":"Symbol","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.PriceDataSourceId.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.PriceDataSourceId","namespace":"cAlgo.API","group":"DataSource","csharp":"public TimeFrame TimeFrame {get; set;}","python":"priceDataSourceId.TimeFrame: TimeFrame","summary":"TimeFrame","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/DataSource/PriceDataSourceId/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.Indicators.PriceOscillator","kind":"interface","name":"PriceOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface PriceOscillator","python":"PriceOscillator","summary":"The Price Oscillator calculates the spread between a short-period moving average and a long-period moving average.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate PriceOscillator priceOscillator;\n\nprotected override void Initialize()\n{\n    priceOscillator = Indicators.PriceOscillator(Bars.ClosePrices, 22, 9, MovingAverageType.Simple);\n}\n\npublic override void Calculate(int index)\n{\n    double current = priceOscillator.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.priceOscillator = api.Indicators.PriceOscillator(api.Bars.ClosePrices, 22, 9, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        current = self.priceOscillator.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Price Oscillator indicator\n    public partial class PriceOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PriceOscillator _priceOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _priceOscillator = Indicators.PriceOscillator(Bars.ClosePrices, 22, 9, MovingAverageType.Simple);\n        }\n\n        protected override void OnBar()\n        {\n            if (_priceOscillator.Result.Last(1) > 0 && _priceOscillator.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_priceOscillator.Result.Last(1) < 0 && _priceOscillator.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass PriceOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.priceOscillator = api.Indicators.PriceOscillator(api.Bars.ClosePrices, 22, 9, MovingAverageType.Simple)\n\n    def on_bar_closed(self):\n        if self.priceOscillator.Result.Last(0) > 0 and self.priceOscillator.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.priceOscillator.Result.Last(0) < 0 and self.priceOscillator.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PriceOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.PriceOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"priceOscillator.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Price Oscillator indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PriceOscillator priceOscillator;\n\nprotected override void Initialize()\n{\n    priceOscillator = Indicators.PriceOscillator\n        (Bars.ClosePrices, 14, 5, MovingAverageType.Simple);\n}\n\npublic override void Calculate(int index)\n{\n    double result = priceOscillator.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.priceOscillator = api.Indicators.PriceOscillator(api.Bars.ClosePrices, 14, 5, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        result = self.priceOscillator.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.PriceROC","kind":"interface","name":"PriceROC","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface PriceROC","python":"PriceROC","summary":"The Price ROC calculates the percentage change between the most recent price and the n-periods of the past price.","remarks":"Can be used to determine whether an instrument is overbought or oversold.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PriceROC _result;\nprotected override void Initialize()\n{\n    _result = Indicators.PriceROC(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _result.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.priceRoc = api.Indicators.PriceROC(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.priceRoc.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Price ROC indicator\n    public partial class PriceROCSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PriceROC _priceROC;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _priceROC = Indicators.PriceROC(Bars.ClosePrices, 12);\n        }\n\n        protected override void OnBar()\n        {\n            if (_priceROC.Result.Last(1) > 0 && _priceROC.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_priceROC.Result.Last(1) < 0 && _priceROC.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass PriceROCSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.priceROC = api.Indicators.PriceROC(api.Bars.ClosePrices, 12)\n\n    def on_bar_closed(self):\n        if self.priceROC.Result.Last(0) > 0 and self.priceROC.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.priceROC.Result.Last(0) < 0 and self.priceROC.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceROC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceROC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PriceROC.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.PriceROC","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"priceROC.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Price ROC indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PriceROC _result;\nprotected override void Initialize()\n{\n    _result = Indicators.PriceROC(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _result.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.priceRoc = api.Indicators.PriceROC(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.priceRoc.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceROC/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceROC/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.PriceType","kind":"enum","name":"PriceType","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public enum PriceType","python":"PriceType","summary":"An enumeration of the different price types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":"Use StandardSeriesType instead.","examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        var openPrices = Bars.GetPrices(PriceType.Open);\n        Print($\"Last Open Price is: {openPrices.LastValue}\");\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        openPrices = api.Bars.GetPrices(PriceType.Open)\n        print(f\"Last Open Price is: {openPrices.LastValue}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Open","kind":"enum value","name":"Open","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Open;","python":"PriceType.Open","summary":"Bar Open price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.High","kind":"enum value","name":"High","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.High;","python":"PriceType.High","summary":"Bar High price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Low","kind":"enum value","name":"Low","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Low;","python":"PriceType.Low","summary":"Bar Low price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Close","kind":"enum value","name":"Close","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Close;","python":"PriceType.Close","summary":"Bar close price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.TickVolume","kind":"enum value","name":"TickVolume","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.TickVolume;","python":"PriceType.TickVolume","summary":"Bar tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Median","kind":"enum value","name":"Median","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Median;","python":"PriceType.Median","summary":"Bar median price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Typical","kind":"enum value","name":"Typical","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Typical;","python":"PriceType.Typical","summary":"Bar typical price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Weighted","kind":"enum value","name":"Weighted","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Weighted;","python":"PriceType.Weighted","summary":"Bar weighted price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.PriceType.Average","kind":"enum value","name":"Average","type":"T:cAlgo.API.PriceType","namespace":"cAlgo.API","group":"Indicators","csharp":"PriceType.Average;","python":"PriceType.Average","summary":"Bar average price.","remarks":null,"parameters":[],"returns":{"csharpType":"PriceType","pythonType":"PriceType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.PriceVolumeTrend","kind":"interface","name":"PriceVolumeTrend","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface PriceVolumeTrend","python":"PriceVolumeTrend","summary":"Price and Volume Trend is a variation of On Balance Volume, used to determine the strength of trends and warn of reversals.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PriceVolumeTrend _priceVolumeTrend;\n\nprotected override void Initialize()\n{\n   _priceVolumeTrend = Indicators.PriceVolumeTrend(Source);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _priceVolumeTrend.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.priceVolumeTrend = api.Indicators.PriceVolumeTrend(api.Source)\n\n    def calculate(self, index):\n        # Display Result of Indicator\n        api.Result[index] = self.priceVolumeTrend.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Price Volume Trend indicator\n    public partial class PriceVolumeTrendSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private PriceVolumeTrend _priceVolumeTrend;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _priceVolumeTrend = Indicators.PriceVolumeTrend(Bars.ClosePrices);\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_priceVolumeTrend.Result, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_priceVolumeTrend.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_priceVolumeTrend.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass PriceVolumeTrendSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.priceVolumeTrend = api.Indicators.PriceVolumeTrend(api.Bars.ClosePrices)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.priceVolumeTrend.Result, 20)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.priceVolumeTrend.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.priceVolumeTrend.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceVolumeTrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceVolumeTrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.PriceVolumeTrend.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.PriceVolumeTrend","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"priceVolumeTrend.Result: IndicatorDataSeries","summary":"Gets or sets the time series of the Price Volume Trend indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private PriceVolumeTrend _priceVolumeTrend;\n\nprotected override void OnStart()\n{\n    _priceVolumeTrend = Indicators.PriceVolumeTrend(Bars.ClosePrices);\n}\n\nprotected override void OnBar()\n{\n    var currentValue = _priceVolumeTrend.Result.Last(1);\n    Print(\"Price Volume Trend: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.priceVolumeTrend = api.Indicators.PriceVolumeTrend(api.Bars.ClosePrices)\n\ndef on_bar(self):\n    currentValue = self.priceVolumeTrend.Result.Last(1)\n    api.Print(f\"Price Volume Trend: {currentValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceVolumeTrend/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/PriceVolumeTrend/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ProgressBar","kind":"class","name":"ProgressBar","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class ProgressBar : ControlBase","python":"ProgressBar","summary":"Progress bar control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    private ProgressBar _progressBar;\n\n    protected override void OnStart()\n    {\n        _progressBar = new ProgressBar\n        {\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n            Width = 200,\n            Height = 100,\n            Minimum = 0,\n            Maximum = 100\n        };\n\n        Chart.AddControl(_progressBar);\n\n        Timer.Start(1);\n    }\n\n    protected override void OnTimer()\n    {\n        _progressBar.Value += 5;\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.progressBar = ProgressBar()\n        self.progressBar.HorizontalAlignment = HorizontalAlignment.Center\n        self.progressBar.VerticalAlignment = VerticalAlignment.Center\n        self.progressBar.Width = 200\n        self.progressBar.Height = 100\n        self.progressBar.Minimum = 0\n        self.progressBar.Maximum = 100\n        api.Chart.AddControl(self.progressBar)\n        api.Timer.Start(1)\n\n    def on_timer(self):\n        self.progressBar.Value += 5","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var progressBar = new ProgressBar\n        {\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n            Width = 200,\n            Height = 30,\n            IsIndeterminate = true\n        };\n\n        Chart.AddControl(progressBar);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        progressBar = ProgressBar()\n        progressBar.HorizontalAlignment = HorizontalAlignment.Center\n        progressBar.VerticalAlignment = VerticalAlignment.Center\n        progressBar.Width = 200\n        progressBar.Height = 30\n        progressBar.IsIndeterminate = True\n        api.Chart.AddControl(progressBar)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ProgressBar.#ctor","kind":"constructor","name":"ProgressBar","type":"T:cAlgo.API.ProgressBar","namespace":"cAlgo.API","group":"Controls","csharp":"public ProgressBar()","python":"ProgressBar()","summary":"Initializes a new instance of the ProgressBar class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var progressBar = new ProgressBar { Width = 200, Height = 20, Minimum = 0, Maximum = 100, Value = 25 };\nChart.AddControl(progressBar);","python":"progressBar = ProgressBar()\nprogressBar.Width = 200\nprogressBar.Height = 20\nprogressBar.Value = 25\napi.Chart.AddControl(progressBar)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ProgressBar.IsIndeterminate","kind":"property","name":"IsIndeterminate","type":"T:cAlgo.API.ProgressBar","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsIndeterminate {get; set;}","python":"progressBar.IsIndeterminate: bool","summary":"Gets / sets whether the ProgressBar shows actual values or generic, continuous progress feedback.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var progressBar = new ProgressBar { Width = 200, Height = 10, IsIndeterminate = true };\nChart.AddControl(progressBar);\nPrint(\"Indeterminate: {0}\", progressBar.IsIndeterminate);","python":"progressBar = ProgressBar()\nprogressBar.Width = 200\nprogressBar.Height = 10\nprogressBar.IsIndeterminate = True\napi.Chart.AddControl(progressBar)\napi.Print(f\"Indeterminate: {progressBar.IsIndeterminate}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/IsIndeterminate/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/IsIndeterminate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ProgressBar.Maximum","kind":"property","name":"Maximum","type":"T:cAlgo.API.ProgressBar","namespace":"cAlgo.API","group":"Controls","csharp":"public double Maximum {get; set;}","python":"progressBar.Maximum: float","summary":"Get / set progress bar maximum value amount if type is Determinate (default is 100).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var progressBar = new ProgressBar { Width = 200, Height = 20, Maximum = Bars.Count, Value = Bars.Count / 2 };\nChart.AddControl(progressBar);\nPrint(\"Maximum: {0}\", progressBar.Maximum);","python":"progressBar = ProgressBar()\nprogressBar.Width = 200\nprogressBar.Height = 20\nprogressBar.Maximum = api.Bars.Count\nprogressBar.Value = api.Bars.Count / 2\napi.Chart.AddControl(progressBar)\napi.Print(f\"Maximum: {progressBar.Maximum}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Maximum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Maximum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ProgressBar.Minimum","kind":"property","name":"Minimum","type":"T:cAlgo.API.ProgressBar","namespace":"cAlgo.API","group":"Controls","csharp":"public double Minimum {get; set;}","python":"progressBar.Minimum: float","summary":"Get / set progress bar minimum value amount if type is Determinate (default is 0).","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var progressBar = new ProgressBar { Width = 200, Height = 20, Minimum = 10, Maximum = 60, Value = 35 };\nChart.AddControl(progressBar);\nPrint(\"Minimum: {0}\", progressBar.Minimum);","python":"progressBar = ProgressBar()\nprogressBar.Width = 200\nprogressBar.Height = 20\nprogressBar.Minimum = 10\nprogressBar.Maximum = 60\nprogressBar.Value = 35\napi.Chart.AddControl(progressBar)\napi.Print(f\"Minimum: {progressBar.Minimum}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Minimum/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Minimum/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ProgressBar.Value","kind":"property","name":"Value","type":"T:cAlgo.API.ProgressBar","namespace":"cAlgo.API","group":"Controls","csharp":"public double Value {get; set;}","python":"progressBar.Value: float","summary":"Get / set progress bar value amount if type is Determinate.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var dailyTarget = 100.0;\nvar progressBar = new ProgressBar { Width = 200, Height = 20, Maximum = dailyTarget };\nprogressBar.Value = Math.Max(0, Math.Min(dailyTarget, Account.Equity - Account.Balance));\nChart.AddControl(progressBar);","python":"dailyTarget = 100.0\nprogressBar = ProgressBar()\nprogressBar.Width = 200\nprogressBar.Height = 20\nprogressBar.Maximum = dailyTarget\nprogressBar.Value = max(0, min(dailyTarget, api.Account.Equity - api.Account.Balance))\napi.Chart.AddControl(progressBar)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Value/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Value/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ProportionalAmountType","kind":"enum","name":"ProportionalAmountType","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum ProportionalAmountType","python":"ProportionalAmountType","summary":"Defines types of amounts you can use for using symbol volume methods.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.VolumeForProportionalRisk(ProportionalAmountType.Balance, 1, 20);\nPrint(\"Volume risking 1% of the balance with a 20 pips stop loss: {0}\", volume);","python":"volume = api.Symbol.VolumeForProportionalRisk(ProportionalAmountType.Balance, 1, 20)\napi.Print(f\"Volume risking 1% of the balance with a 20 pips stop loss: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ProportionalAmountType.Balance","kind":"enum value","name":"Balance","type":"T:cAlgo.API.ProportionalAmountType","namespace":"cAlgo.API","group":"Symbols","csharp":"ProportionalAmountType.Balance;","python":"ProportionalAmountType.Balance","summary":"Account Balance.","remarks":null,"parameters":[],"returns":{"csharpType":"ProportionalAmountType","pythonType":"ProportionalAmountType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ProportionalAmountType.Equity","kind":"enum value","name":"Equity","type":"T:cAlgo.API.ProportionalAmountType","namespace":"cAlgo.API","group":"Symbols","csharp":"ProportionalAmountType.Equity;","python":"ProportionalAmountType.Equity","summary":"Account Equity.","remarks":null,"parameters":[],"returns":{"csharpType":"ProportionalAmountType","pythonType":"ProportionalAmountType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/ProportionalAmountType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ProtectionType","kind":"enum","name":"ProtectionType","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public enum ProtectionType","python":"ProtectionType","summary":"The protection type for orders and positions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Stop loss {0}, take profit {1}\", result.PendingOrder.StopLoss, result.PendingOrder.TakeProfit);","python":"result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, \"myLabel\", 20, 40, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Stop loss {result.PendingOrder.StopLoss}, take profit {result.PendingOrder.TakeProfit}\")"},{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.TradeType == TradeType.Buy)\n{\n    var pipSize = position.Symbol.PipSize;\n    ModifyPosition(position, position.EntryPrice - 20 * pipSize, position.EntryPrice + 40 * pipSize, ProtectionType.Absolute);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.TradeType == TradeType.Buy:\n    pipSize = position.Symbol.PipSize\n    api.ModifyPosition(position, position.EntryPrice - 20 * pipSize, position.EntryPrice + 40 * pipSize, ProtectionType.Absolute)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ProtectionType.None","kind":"enum value","name":"None","type":"T:cAlgo.API.ProtectionType","namespace":"cAlgo.API","group":"Trading","csharp":"ProtectionType.None;","python":"ProtectionType.None","summary":"No protection.","remarks":null,"parameters":[],"returns":{"csharpType":"ProtectionType","pythonType":"ProtectionType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ProtectionType.Relative","kind":"enum value","name":"Relative","type":"T:cAlgo.API.ProtectionType","namespace":"cAlgo.API","group":"Trading","csharp":"ProtectionType.Relative;","python":"ProtectionType.Relative","summary":"Relative or distance based protection type.","remarks":null,"parameters":[],"returns":{"csharpType":"ProtectionType","pythonType":"ProtectionType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ProtectionType.Absolute","kind":"enum value","name":"Absolute","type":"T:cAlgo.API.ProtectionType","namespace":"cAlgo.API","group":"Trading","csharp":"ProtectionType.Absolute;","python":"ProtectionType.Absolute","summary":"Absolute or price based protection type.","remarks":null,"parameters":[],"returns":{"csharpType":"ProtectionType","pythonType":"ProtectionType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/ProtectionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RadioButton","kind":"class","name":"RadioButton","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class RadioButton : Control","python":"RadioButton","summary":"Reporesents the Radiobutton chart control type.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the Radio button chart control\n    public partial class RadioButtonSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7\n            };\n\n            var firstRadioButton = new RadioButton\n            {\n                Text = \"Unchecked\"\n            };\n\n            firstRadioButton.Checked += RadioButton_Checked;\n            firstRadioButton.Unchecked += RadioButton_Unchecked;\n\n            stackPanel.AddChild(firstRadioButton);\n\n            var secondRadioButton = new RadioButton\n            {\n                Text = \"Unchecked\"\n            };\n\n            secondRadioButton.Checked += RadioButton_Checked;\n            secondRadioButton.Unchecked += RadioButton_Unchecked;\n\n            stackPanel.AddChild(secondRadioButton);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void RadioButton_Unchecked(RadioButtonEventArgs obj)\n        {\n            var radioButton = obj.RadioButton;\n\n            radioButton.Text = \"Unchecked\";\n        }\n\n        private void RadioButton_Checked(RadioButtonEventArgs obj)\n        {\n            var radioButton = obj.RadioButton;\n\n            radioButton.Text = \"Checked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n\n        firstRadioButton = RadioButton()\n        firstRadioButton.Text = \"Unchecked\"\n        firstRadioButton.Checked += self.on_radio_button_checked\n        firstRadioButton.Unchecked += self.on_radio_button_unchecked\n\n        stackPanel.AddChild(firstRadioButton)\n\n        secondRadioButton = RadioButton()\n        secondRadioButton.Text = \"Unchecked\"\n        secondRadioButton.Checked += self.on_radio_button_checked\n        secondRadioButton.Unchecked += self.on_radio_button_unchecked\n\n        stackPanel.AddChild(secondRadioButton)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_radio_button_checked(self, args):\n        args.RadioButton.Text = \"Checked\"\n\n    def on_radio_button_unchecked(self, args):\n        args.RadioButton.Text = \"Unchecked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.RadioButton.#ctor","kind":"constructor","name":"RadioButton","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public RadioButton()","python":"RadioButton()","summary":"Initializes a new instance of the Radiobutton class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyRadioButton = new RadioButton { Text = \"Buy\", GroupName = \"Direction\", IsChecked = true };\nvar sellRadioButton = new RadioButton { Text = \"Sell\", GroupName = \"Direction\" };\nvar panel = new StackPanel { Orientation = Orientation.Horizontal };\npanel.AddChild(buyRadioButton);\npanel.AddChild(sellRadioButton);\nChart.AddControl(panel);","python":"buyRadioButton = RadioButton()\nbuyRadioButton.Text = \"Buy\"\nbuyRadioButton.GroupName = \"Direction\"\nbuyRadioButton.IsChecked = True\nsellRadioButton = RadioButton()\nsellRadioButton.Text = \"Sell\"\nsellRadioButton.GroupName = \"Direction\"\npanel = StackPanel()\npanel.Orientation = Orientation.Horizontal\npanel.AddChild(buyRadioButton)\npanel.AddChild(sellRadioButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.RadioButton.Content","kind":"property","name":"Content","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Content {get; set;}","python":"radioButton.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var label = new TextBlock { Text = \"Sell\", ForegroundColor = Color.Red, FontWeight = FontWeight.Bold };\nvar radioButton = new RadioButton { Content = label, GroupName = \"Direction\" };\nChart.AddControl(radioButton);","python":"label = TextBlock()\nlabel.Text = \"Sell\"\nlabel.ForegroundColor = Color.Red\nradioButton = RadioButton()\nradioButton.Content = label\nradioButton.GroupName = \"Direction\"\napi.Chart.AddControl(radioButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.RadioButton.GroupName","kind":"property","name":"GroupName","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public string GroupName {get; set;}","python":"radioButton.GroupName: str","summary":"Gets or sets the name of the group.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nforeach (var timeFrameName in new[] { \"Hour\", \"Hour4\", \"Daily\" })\n    panel.AddChild(new RadioButton { Text = timeFrameName, GroupName = \"TimeFrame\" });\nChart.AddControl(panel);","python":"panel = StackPanel()\nfor timeFrameName in [\"Hour\", \"Hour4\", \"Daily\"]:\n    radioButton = RadioButton()\n    radioButton.Text = timeFrameName\n    radioButton.GroupName = \"TimeFrame\"\n    panel.AddChild(radioButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/GroupName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/GroupName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.RadioButton.IsChecked","kind":"property","name":"IsChecked","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsChecked {get; set;}","python":"radioButton.IsChecked: bool","summary":"Defines if the radiobutton is checked.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyRadioButton = new RadioButton { Text = \"Buy\", GroupName = \"Direction\", IsChecked = true };\nChart.AddControl(buyRadioButton);\nvar tradeType = buyRadioButton.IsChecked ? TradeType.Buy : TradeType.Sell;\nPrint(\"Trade direction: {0}\", tradeType);","python":"buyRadioButton = RadioButton()\nbuyRadioButton.Text = \"Buy\"\nbuyRadioButton.IsChecked = True\napi.Chart.AddControl(buyRadioButton)\ntradeType = TradeType.Buy if buyRadioButton.IsChecked else TradeType.Sell\napi.Print(f\"Trade direction: {tradeType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/IsChecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/IsChecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.RadioButton.Text","kind":"property","name":"Text","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"radioButton.Text: str","summary":"Gets or sets the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radioButton = new RadioButton { Text = \"Market order\" };\nChart.AddControl(radioButton);\nPrint(\"Radio button text: {0}\", radioButton.Text);","python":"radioButton = RadioButton()\nradioButton.Text = \"Market order\"\napi.Chart.AddControl(radioButton)\napi.Print(f\"Radio button text: {radioButton.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.RadioButton.Checked","kind":"event","name":"Checked","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<RadioButtonEventArgs> Checked;","python":"radioButton.Checked += handler  # handler(obj: RadioButtonEventArgs)","summary":"Occurs when checked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<RadioButtonEventArgs>","pythonType":"Callable[[RadioButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sellRadioButton = new RadioButton { Text = \"Sell\", GroupName = \"Direction\" };\nsellRadioButton.Checked += args => Print(\"Direction set to {0}\", args.RadioButton.Text);\nChart.AddControl(sellRadioButton);","python":"def on_start(self):\n    sellRadioButton = RadioButton()\n    sellRadioButton.Text = \"Sell\"\n    sellRadioButton.GroupName = \"Direction\"\n    sellRadioButton.Checked += self.on_radio_button_checked\n    api.Chart.AddControl(sellRadioButton)\n\ndef on_radio_button_checked(self, args):\n    api.Print(f\"Direction set to {args.RadioButton.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Checked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Checked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.RadioButton.Click","kind":"event","name":"Click","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<RadioButtonEventArgs> Click;","python":"radioButton.Click += handler  # handler(obj: RadioButtonEventArgs)","summary":"Occurs when clicked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<RadioButtonEventArgs>","pythonType":"Callable[[RadioButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var radioButton = new RadioButton { Text = \"Buy\", GroupName = \"Direction\" };\nradioButton.Click += args => Print(\"{0} clicked\", args.RadioButton.Text);\nChart.AddControl(radioButton);","python":"def on_start(self):\n    radioButton = RadioButton()\n    radioButton.Text = \"Buy\"\n    radioButton.GroupName = \"Direction\"\n    radioButton.Click += self.on_radio_button_click\n    api.Chart.AddControl(radioButton)\n\ndef on_radio_button_click(self, args):\n    api.Print(f\"{args.RadioButton.Text} clicked\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Click/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Click/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.RadioButton.Unchecked","kind":"event","name":"Unchecked","type":"T:cAlgo.API.RadioButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<RadioButtonEventArgs> Unchecked;","python":"radioButton.Unchecked += handler  # handler(obj: RadioButtonEventArgs)","summary":"Occurs when unchecked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<RadioButtonEventArgs>","pythonType":"Callable[[RadioButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var buyRadioButton = new RadioButton { Text = \"Buy\", GroupName = \"Direction\", IsChecked = true };\nbuyRadioButton.Unchecked += args => Print(\"{0} is no longer selected\", args.RadioButton.Text);\nChart.AddControl(buyRadioButton);","python":"def on_start(self):\n    buyRadioButton = RadioButton()\n    buyRadioButton.Text = \"Buy\"\n    buyRadioButton.GroupName = \"Direction\"\n    buyRadioButton.IsChecked = True\n    buyRadioButton.Unchecked += self.on_radio_button_unchecked\n    api.Chart.AddControl(buyRadioButton)\n\ndef on_radio_button_unchecked(self, args):\n    api.Print(f\"{args.RadioButton.Text} is no longer selected\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Unchecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/Unchecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.RadioButtonEventArgs","kind":"class","name":"RadioButtonEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class RadioButtonEventArgs","python":"RadioButtonEventArgs","summary":"Represents the radio button actions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the RadioButtonEventArgs\n    public partial class RadioButtonEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var firstRadioButton = new RadioButton\n            {\n                Text = \"First Radio Button\"\n            };\n\n            firstRadioButton.Checked += OnRadioButtonChanged;\n            firstRadioButton.Unchecked += OnRadioButtonChanged;\n\n            var secondRadioButton = new RadioButton\n            {\n                Text = \"Second Radio Button\"\n            };\n\n            secondRadioButton.Checked += OnRadioButtonChanged;\n            secondRadioButton.Unchecked += OnRadioButtonChanged;\n\n            var panel = new StackPanel\n            {\n                Orientation = Orientation.Vertical,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            panel.AddChild(firstRadioButton);\n            panel.AddChild(secondRadioButton);\n\n            Chart.AddControl(panel);\n        }\n\n        private void OnRadioButtonChanged(RadioButtonEventArgs obj)\n        {\n            var state = obj.RadioButton.IsChecked ? \"Checked\" : \"Unchecked\";\n\n            obj.RadioButton.Text = state;\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        firstRadioButton = RadioButton()\n        firstRadioButton.Text = \"First Radio Button\"\n\n        firstRadioButton.Checked += self.on_radio_button_changed\n        firstRadioButton.Unchecked += self.on_radio_button_changed\n\n        secondRadioButton = RadioButton()\n        secondRadioButton.Text = \"Second Radio Button\"\n\n        secondRadioButton.Checked += self.on_radio_button_changed\n        secondRadioButton.Unchecked += self.on_radio_button_changed\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        panel.AddChild(firstRadioButton)\n        panel.AddChild(secondRadioButton)\n\n        api.Chart.AddControl(panel)\n\n    def on_radio_button_changed(self, args):\n        state = \"Checked\" if args.RadioButton.IsChecked else \"Unchecked\"\n        args.RadioButton.Text = state","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/RadioButtonEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/RadioButtonEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked)."}]}
{"id":"P:cAlgo.API.RadioButtonEventArgs.RadioButton","kind":"property","name":"RadioButton","type":"T:cAlgo.API.RadioButtonEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public RadioButton RadioButton {get;}","python":"radioButtonEventArgs.RadioButton: RadioButton","summary":"Gets the radiobutton data.","remarks":null,"parameters":[],"returns":{"csharpType":"RadioButton","pythonType":"RadioButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var buyRadioButton = new RadioButton { Text = \"Buy\", GroupName = \"direction\" };\n    buyRadioButton.Checked += OnRadioButtonChecked;\n    Chart.AddControl(buyRadioButton);\n}\n\nprivate void OnRadioButtonChecked(RadioButtonEventArgs args)\n{\n    Print(\"Direction selected: {0}, checked: {1}\", args.RadioButton.Text, args.RadioButton.IsChecked);\n}","python":"def on_start(self):\n    buyRadioButton = RadioButton()\n    buyRadioButton.Text = \"Buy\"\n    buyRadioButton.GroupName = \"direction\"\n    buyRadioButton.Checked += self.on_radio_button_checked\n    api.Chart.AddControl(buyRadioButton)\n\ndef on_radio_button_checked(self, args):\n    api.Print(f\"Direction selected: {args.RadioButton.Text}, checked: {args.RadioButton.IsChecked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/RadioButtonEventArgs/RadioButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/RadioButtonEventArgs/RadioButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked)."}]}
{"id":"T:cAlgo.API.Indicators.RainbowOscillator","kind":"interface","name":"RainbowOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface RainbowOscillator","python":"RainbowOscillator","summary":"Developed by Mel Widner, Rainbow Oscillator is based on multiple moving averages and helps to identify trends and provides overbought/oversold levels.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate RainbowOscillator rainbow;\n//...\nprotected override void Initialize()\n{\n    rainbow = Indicators.RainbowOscillator\n        (Bars.ClosePrices, 9, MovingAverageType.Simple);\n    //...\n}\npublic override void Calculate(int index)\n{\n    double result = rainbow.Result[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.rainbowOscillator = api.Indicators.RainbowOscillator(api.Bars.ClosePrices, 9, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        result = self.rainbowOscillator.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Rainbow Oscillator indicator\n    public partial class RainbowOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private RainbowOscillator _rainbowOscillator;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _rainbowOscillator = Indicators.RainbowOscillator(Bars.ClosePrices, 9, MovingAverageType.Simple);\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_rainbowOscillator.Result, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_rainbowOscillator.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_rainbowOscillator.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass RainbowOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.rainbowOscillator = api.Indicators.RainbowOscillator(api.Bars.ClosePrices, 9, MovingAverageType.Simple)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.rainbowOscillator.Result, 9)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.rainbowOscillator.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.rainbowOscillator.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RainbowOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RainbowOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.RainbowOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.RainbowOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"rainbowOscillator.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Rainbow Oscillator indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate RainbowOscillator rainbow;\n//...\nprotected override void Initialize()\n{\n    rainbow = Indicators.RainbowOscillator\n        (Bars.ClosePrices, 9, MovingAverageType.Simple);\n    //...\n}\npublic override void Calculate(int index)\n{\n    double result = rainbow.Result[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.rainbowOscillator = api.Indicators.RainbowOscillator(api.Bars.ClosePrices, 9, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        result = self.rainbowOscillator.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RainbowOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RainbowOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RateLimitException","kind":"class","name":"RateLimitException","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public sealed class RateLimitException : Exception","python":"RateLimitException","summary":"Represents errors that occur when API rate limits are exceeded.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, \"Sample\");\n}\n\nprotected override void OnException(Exception exception)\n{\n    if (exception is RateLimitException)\n        Print(\"API rate limit exceeded, slow down requests: {0}\", exception.Message);\n}","python":"def on_start(self):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, \"Sample\")\n\ndef on_exception(self, exception):\n    if isinstance(exception, RateLimitException):\n        api.Print(f\"API rate limit exceeded, slow down requests: {exception.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/RateLimitException/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/RateLimitException/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Rectangle","kind":"class","name":"Rectangle","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public class Rectangle : Shape","python":"Rectangle","summary":"Represents the rectangle.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the Rectangle shape which is a chart control\n    public partial class RectangleShapeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6\n            };\n\n            var rectangle = new Rectangle\n            {\n                StrokeColor = Color.Blue,\n                FillColor = Color.Red,\n                StrokeThickness = 2,\n                Margin = 10,\n                Width = 300,\n                Height = 100\n            };\n\n            stackPanel.AddChild(rectangle);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.6\n\n        rectangle = Rectangle()\n        rectangle.StrokeColor = Color.Blue\n        rectangle.FillColor = Color.Red\n        rectangle.StrokeThickness = 2\n        rectangle.Margin = Thickness(10)\n        rectangle.Width = 300\n        rectangle.Height = 100\n\n        stackPanel.AddChild(rectangle)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.Rectangle.#ctor","kind":"constructor","name":"Rectangle","type":"T:cAlgo.API.Rectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"public Rectangle()","python":"Rectangle()","summary":"Initializes a new instance of the Rectangle class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = new Rectangle { Width = 120, Height = 40, FillColor = Color.FromArgb(100, Color.Red), StrokeColor = Color.Red };\nChart.AddControl(rectangle);","python":"rectangle = Rectangle()\nrectangle.Width = 120\nrectangle.Height = 40\nrectangle.FillColor = Color.FromArgb(100, Color.Red)\nrectangle.StrokeColor = Color.Red\napi.Chart.AddControl(rectangle)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Rectangle.RadiusX","kind":"property","name":"RadiusX","type":"T:cAlgo.API.Rectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"public double RadiusX {get; set;}","python":"rectangle.RadiusX: float","summary":"Gets or sets the x-axis radius of the ellipse that is used to round the corners of the rectangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = new Rectangle { Width = 150, Height = 60, FillColor = Color.Teal, RadiusX = 10, RadiusY = 10 };\nChart.AddControl(rectangle);\nPrint(\"Corner x radius: {0}\", rectangle.RadiusX);","python":"rectangle = Rectangle()\nrectangle.Width = 150\nrectangle.Height = 60\nrectangle.FillColor = Color.Teal\nrectangle.RadiusX = 10\nrectangle.RadiusY = 10\napi.Chart.AddControl(rectangle)\napi.Print(f\"Corner x radius: {rectangle.RadiusX}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/RadiusX/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/RadiusX/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Rectangle.RadiusY","kind":"property","name":"RadiusY","type":"T:cAlgo.API.Rectangle","namespace":"cAlgo.API","group":"Shapes","csharp":"public double RadiusY {get; set;}","python":"rectangle.RadiusY: float","summary":"Gets or sets the y-axis radius of the ellipse that is used to round the corners of the rectangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = new Rectangle { Width = 150, Height = 60, FillColor = Color.Teal, RadiusX = 20, RadiusY = 30 };\nChart.AddControl(rectangle);\nPrint(\"Corner y radius: {0}\", rectangle.RadiusY);","python":"rectangle = Rectangle()\nrectangle.Width = 150\nrectangle.Height = 60\nrectangle.FillColor = Color.Teal\nrectangle.RadiusX = 20\nrectangle.RadiusY = 30\napi.Chart.AddControl(rectangle)\napi.Print(f\"Corner y radius: {rectangle.RadiusY}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/RadiusY/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Rectangle/RadiusY/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.RelativeStopLossProtection","kind":"record","name":"RelativeStopLossProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class RelativeStopLossProtection","python":"RelativeStopLossProtection","summary":"Represents a stop loss defined as a distance (in pips) from the order's entry price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful)\n    Print(\"Stop loss price: {0}\", result.Position.StopLoss);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful:\n    api.Print(f\"Stop loss price: {result.Position.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeStopLossProtection.#ctor(System.Double)","kind":"constructor","name":"RelativeStopLossProtection","type":"T:cAlgo.API.RelativeStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeStopLossProtection(double Distance)","python":"RelativeStopLossProtection(Distance: float)","summary":"Represents a stop loss defined as a distance (in pips) from the order's entry price.","remarks":null,"parameters":[{"name":"Distance","csharpType":"double","pythonType":"float","summary":"The stop loss distance, in pips, from the order's entry price."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful)\n    Print(\"Stop loss price: {0}\", result.Position.StopLoss);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful:\n    api.Print(f\"Stop loss price: {result.Position.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeStopLossProtection.#ctor(cAlgo.API.RelativeStopLossProtection)","kind":"constructor","name":"RelativeStopLossProtection","type":"T:cAlgo.API.RelativeStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeStopLossProtection(RelativeStopLossProtection original)","python":"RelativeStopLossProtection(original: RelativeStopLossProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeStopLossProtection.Distance","kind":"property","name":"Distance","type":"T:cAlgo.API.RelativeStopLossProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Distance {get; set;}","python":"relativeStopLossProtection.Distance: float","summary":"The stop loss distance, in pips, from the order's entry price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Distance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Distance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.RelativeStrengthIndex","kind":"interface","name":"RelativeStrengthIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface RelativeStrengthIndex","python":"RelativeStrengthIndex","summary":"The RSI (Wilder) is momentum oscillator, measuring the velocity and magnitude of directional price movements.","remarks":"The RSI is most typically used on a 14 day timeframe, measured on a scale from 0 to 100, with high and low levels marked at 70 and 30, respectively. Shorter or longer timeframes are used for alternately shorter or longer outlooks. More extreme high and low levels�80 and 20, or 90 and 10�occur less frequently but indicate stronger momentum.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private RelativeStrengthIndex _rsi;\nprotected override void Initialize()\n{\n    _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _rsi.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.relativeStrengthIndex = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.relativeStrengthIndex.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Relative Strength Index indicator\n    public partial class RelativeStrengthIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private RelativeStrengthIndex _relativeStrengthIndex;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _relativeStrengthIndex = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 20);\n        }\n\n        protected override void OnBar()\n        {\n            if (_relativeStrengthIndex.Result.Last(1) > 70 && _relativeStrengthIndex.Result.Last(2) < 70)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_relativeStrengthIndex.Result.Last(1) < 20 && _relativeStrengthIndex.Result.Last(2) > 20)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass RelativeStrengthIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.relativeStrengthIndex = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 20)\n\n    def on_bar_closed(self):\n        if self.relativeStrengthIndex.Result.Last(0) > 70 and self.relativeStrengthIndex.Result.Last(1) < 70:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.relativeStrengthIndex.Result.Last(0) < 20 and self.relativeStrengthIndex.Result.Last(1) > 20:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeStrengthIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeStrengthIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.RelativeStrengthIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.RelativeStrengthIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"relativeStrengthIndex.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Relative Strength Index indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private RelativeStrengthIndex _rsi;\nprotected override void Initialize()\n{\n    _rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _rsi.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.relativeStrengthIndex = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.relativeStrengthIndex.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeStrengthIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeStrengthIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RelativeTakeProfitLastProtection","kind":"record","name":"RelativeTakeProfitLastProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class RelativeTakeProfitLastProtection","python":"RelativeTakeProfitLastProtection","summary":"Represents the final take profit in a relative take profit ladder, closing the remaining order volume at a distance (in pips) from the entry price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful)\n    Print(\"Take profit price: {0}\", result.Position.TakeProfit);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful:\n    api.Print(f\"Take profit price: {result.Position.TakeProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitLastProtection.#ctor(System.Double)","kind":"constructor","name":"RelativeTakeProfitLastProtection","type":"T:cAlgo.API.RelativeTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitLastProtection(double Distance)","python":"RelativeTakeProfitLastProtection(Distance: float)","summary":"Represents the final take profit in a relative take profit ladder, closing the remaining order volume at a distance (in pips) from the entry price.","remarks":null,"parameters":[{"name":"Distance","csharpType":"double","pythonType":"float","summary":"The take profit distance, in pips, from the order's entry price."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nif (result.IsSuccessful)\n    Print(\"Take profit price: {0}\", result.Position.TakeProfit);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\nif result.IsSuccessful:\n    api.Print(f\"Take profit price: {result.Position.TakeProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitLastProtection.#ctor(cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitLastProtection","type":"T:cAlgo.API.RelativeTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitLastProtection(RelativeTakeProfitLastProtection original)","python":"RelativeTakeProfitLastProtection(original: RelativeTakeProfitLastProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitLastProtection.Distance","kind":"property","name":"Distance","type":"T:cAlgo.API.RelativeTakeProfitLastProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Distance {get; set;}","python":"relativeTakeProfitLastProtection.Distance: float","summary":"The take profit distance, in pips, from the order's entry price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Distance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitLastProtection/Distance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RelativeTakeProfitProtection","kind":"record","name":"RelativeTakeProfitProtection","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class RelativeTakeProfitProtection","python":"RelativeTakeProfitProtection","summary":"Represents a partial take profit closing a portion of the order volume at a distance (in pips) from the entry price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var firstTakeProfit = new RelativeTakeProfitProtection(10000, 20);\nvar takeProfits = new RelativeTakeProfitProtections(firstTakeProfit, new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 20000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Half of the position closes {0} pips from entry: {1}\", firstTakeProfit.Distance, result.IsSuccessful);","python":"firstTakeProfit = RelativeTakeProfitProtection(10000, 20)\ntakeProfits = RelativeTakeProfitProtections(firstTakeProfit, RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 20000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Half of the position closes {firstTakeProfit.Distance} pips from entry: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtection.#ctor(System.Double,System.Double)","kind":"constructor","name":"RelativeTakeProfitProtection","type":"T:cAlgo.API.RelativeTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection(double Volume, double Distance)","python":"RelativeTakeProfitProtection(Volume: float, Distance: float)","summary":"Represents a partial take profit closing a portion of the order volume at a distance (in pips) from the entry price.","remarks":null,"parameters":[{"name":"Volume","csharpType":"double","pythonType":"float","summary":"The portion of the order volume to close when the take profit is triggered."},{"name":"Distance","csharpType":"double","pythonType":"float","summary":"The take profit distance, in pips, from the order's entry price."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var firstTakeProfit = new RelativeTakeProfitProtection(10000, 20);\nvar takeProfits = new RelativeTakeProfitProtections(firstTakeProfit, new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 20000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Half of the position closes {0} pips from entry: {1}\", firstTakeProfit.Distance, result.IsSuccessful);","python":"firstTakeProfit = RelativeTakeProfitProtection(10000, 20)\ntakeProfits = RelativeTakeProfitProtections(firstTakeProfit, RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 20000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Half of the position closes {firstTakeProfit.Distance} pips from entry: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtection.#ctor(cAlgo.API.RelativeTakeProfitProtection)","kind":"constructor","name":"RelativeTakeProfitProtection","type":"T:cAlgo.API.RelativeTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection(RelativeTakeProfitProtection original)","python":"RelativeTakeProfitProtection(original: RelativeTakeProfitProtection)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtection.Distance","kind":"property","name":"Distance","type":"T:cAlgo.API.RelativeTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Distance {get; set;}","python":"relativeTakeProfitProtection.Distance: float","summary":"The take profit distance, in pips, from the order's entry price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Distance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Distance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtection.Volume","kind":"property","name":"Volume","type":"T:cAlgo.API.RelativeTakeProfitProtection","namespace":"cAlgo.API","group":"Trading","csharp":"public double Volume {get; set;}","python":"relativeTakeProfitProtection.Volume: float","summary":"The portion of the order volume to close when the take profit is triggered.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Volume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtection/Volume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RelativeTakeProfitProtections","kind":"record","name":"RelativeTakeProfitProtections","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class RelativeTakeProfitProtections","python":"RelativeTakeProfitProtections","summary":"Represents a ladder of up to four partial take profits at distances (in pips) from the entry price, followed by a final take profit that closes any remaining volume.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(\n    new RelativeTakeProfitProtection(10000, 20),\n    new RelativeTakeProfitProtection(10000, 35),\n    new RelativeTakeProfitLastProtection(50));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 30000, \"myLabel\", new RelativeStopLossProtection(25), takeProfits);\nif (result.IsSuccessful)\n    Print(\"Position {0} opened with a three level take profit ladder\", result.Position.Id);","python":"takeProfits = RelativeTakeProfitProtections(\n    RelativeTakeProfitProtection(10000, 20),\n    RelativeTakeProfitProtection(10000, 35),\n    RelativeTakeProfitLastProtection(50))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 30000, \"myLabel\", RelativeStopLossProtection(25), takeProfits)\nif result.IsSuccessful:\n    api.Print(f\"Position {result.Position.Id} opened with a three level take profit ladder\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitLastProtection lastTakeProfit)","python":"RelativeTakeProfitProtections(lastTakeProfit: RelativeTakeProfitLastProtection)","summary":"Initializes a new instance with only a final take profit.","remarks":null,"parameters":[{"name":"lastTakeProfit","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Order executed: {0}\", result.IsSuccessful);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Order executed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)","python":"RelativeTakeProfitProtections(firstTakeProfit: RelativeTakeProfitProtection, lastTakeProfit: RelativeTakeProfitLastProtection)","summary":"Initializes a new instance with one partial take profit and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The first partial take profit."},{"name":"lastTakeProfit","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 20000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Order executed: {0}\", result.IsSuccessful);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 20000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Order executed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)","python":"RelativeTakeProfitProtections(firstTakeProfit: RelativeTakeProfitProtection, secondTakeProfit: RelativeTakeProfitProtection, lastTakeProfit: RelativeTakeProfitLastProtection)","summary":"Initializes a new instance with two partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The second partial take profit."},{"name":"lastTakeProfit","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitProtection(10000, 30), new RelativeTakeProfitLastProtection(45));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 30000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Order executed: {0}\", result.IsSuccessful);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitProtection(10000, 30), RelativeTakeProfitLastProtection(45))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 30000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Order executed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitProtection thirdTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)","python":"RelativeTakeProfitProtections(firstTakeProfit: RelativeTakeProfitProtection, secondTakeProfit: RelativeTakeProfitProtection, thirdTakeProfit: RelativeTakeProfitProtection, lastTakeProfit: RelativeTakeProfitLastProtection)","summary":"Initializes a new instance with three partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The second partial take profit."},{"name":"thirdTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The third partial take profit."},{"name":"lastTakeProfit","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(\n    new RelativeTakeProfitProtection(10000, 15),\n    new RelativeTakeProfitProtection(10000, 25),\n    new RelativeTakeProfitProtection(10000, 35),\n    new RelativeTakeProfitLastProtection(50));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 40000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Order executed: {0}\", result.IsSuccessful);","python":"takeProfits = RelativeTakeProfitProtections(\n    RelativeTakeProfitProtection(10000, 15),\n    RelativeTakeProfitProtection(10000, 25),\n    RelativeTakeProfitProtection(10000, 35),\n    RelativeTakeProfitLastProtection(50))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 40000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Order executed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitProtection,cAlgo.API.RelativeTakeProfitLastProtection)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitProtection thirdTakeProfit, RelativeTakeProfitProtection fourthTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)","python":"RelativeTakeProfitProtections(firstTakeProfit: RelativeTakeProfitProtection, secondTakeProfit: RelativeTakeProfitProtection, thirdTakeProfit: RelativeTakeProfitProtection, fourthTakeProfit: RelativeTakeProfitProtection, lastTakeProfit: RelativeTakeProfitLastProtection)","summary":"Initializes a new instance with four partial take profits and a final take profit.","remarks":null,"parameters":[{"name":"firstTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The first partial take profit."},{"name":"secondTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The second partial take profit."},{"name":"thirdTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The third partial take profit."},{"name":"fourthTakeProfit","csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"The fourth partial take profit."},{"name":"lastTakeProfit","csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"The final take profit that closes the remaining volume."}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(\n    new RelativeTakeProfitProtection(10000, 10),\n    new RelativeTakeProfitProtection(10000, 20),\n    new RelativeTakeProfitProtection(10000, 30),\n    new RelativeTakeProfitProtection(10000, 40),\n    new RelativeTakeProfitLastProtection(60));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 50000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits);\nPrint(\"Order executed: {0}\", result.IsSuccessful);","python":"takeProfits = RelativeTakeProfitProtections(\n    RelativeTakeProfitProtection(10000, 10),\n    RelativeTakeProfitProtection(10000, 20),\n    RelativeTakeProfitProtection(10000, 30),\n    RelativeTakeProfitProtection(10000, 40),\n    RelativeTakeProfitLastProtection(60))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 50000, \"myLabel\", RelativeStopLossProtection(20), takeProfits)\napi.Print(f\"Order executed: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RelativeTakeProfitProtections.#ctor(cAlgo.API.RelativeTakeProfitProtections)","kind":"constructor","name":"RelativeTakeProfitProtections","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtections(RelativeTakeProfitProtections original)","python":"RelativeTakeProfitProtections(original: RelativeTakeProfitProtections)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtections.FirstTakeProfit","kind":"property","name":"FirstTakeProfit","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection FirstTakeProfit {get;}","python":"relativeTakeProfitProtections.FirstTakeProfit: RelativeTakeProfitProtection","summary":"Gets the first partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));\nPrint(\"First take profit: {0} units at {1} pips\", takeProfits.FirstTakeProfit.Volume, takeProfits.FirstTakeProfit.Distance);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))\napi.Print(f\"First take profit: {takeProfits.FirstTakeProfit.Volume} units at {takeProfits.FirstTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FirstTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FirstTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtections.FourthTakeProfit","kind":"property","name":"FourthTakeProfit","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection FourthTakeProfit {get;}","python":"relativeTakeProfitProtections.FourthTakeProfit: RelativeTakeProfitProtection","summary":"Gets the fourth partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var ladder = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 10), new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitProtection(10000, 30), new RelativeTakeProfitProtection(10000, 40), new RelativeTakeProfitLastProtection(60));\nPrint(\"Fourth take profit: {0} units at {1} pips\", ladder.FourthTakeProfit.Volume, ladder.FourthTakeProfit.Distance);","python":"ladder = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 10), RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitProtection(10000, 30), RelativeTakeProfitProtection(10000, 40), RelativeTakeProfitLastProtection(60))\napi.Print(f\"Fourth take profit: {ladder.FourthTakeProfit.Volume} units at {ladder.FourthTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FourthTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FourthTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtections.LastTakeProfit","kind":"property","name":"LastTakeProfit","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitLastProtection LastTakeProfit {get;}","python":"relativeTakeProfitProtections.LastTakeProfit: RelativeTakeProfitLastProtection","summary":"Gets the final take profit that closes the remaining volume.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitLastProtection","pythonType":"RelativeTakeProfitLastProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var order = PendingOrders.FirstOrDefault(pendingOrder => pendingOrder.RelativeTakeProfitProtections != null);\nif (order != null)\n    Print(\"Order {0} closes the rest at {1} pips\", order.Id, order.RelativeTakeProfitProtections.LastTakeProfit.Distance);","python":"orders = [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.RelativeTakeProfitProtections is not None]\nif len(orders) > 0:\n    api.Print(f\"Order {orders[0].Id} closes the rest at {orders[0].RelativeTakeProfitProtections.LastTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/LastTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/LastTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtections.SecondTakeProfit","kind":"property","name":"SecondTakeProfit","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection SecondTakeProfit {get;}","python":"relativeTakeProfitProtections.SecondTakeProfit: RelativeTakeProfitProtection","summary":"Gets the second partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitProtection(10000, 30), new RelativeTakeProfitLastProtection(45));\nif (takeProfits.SecondTakeProfit != null)\n    Print(\"Second take profit at {0} pips\", takeProfits.SecondTakeProfit.Distance);","python":"takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitProtection(10000, 30), RelativeTakeProfitLastProtection(45))\nif takeProfits.SecondTakeProfit is not None:\n    api.Print(f\"Second take profit at {takeProfits.SecondTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/SecondTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/SecondTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RelativeTakeProfitProtections.ThirdTakeProfit","kind":"property","name":"ThirdTakeProfit","type":"T:cAlgo.API.RelativeTakeProfitProtections","namespace":"cAlgo.API","group":"Trading","csharp":"public RelativeTakeProfitProtection ThirdTakeProfit {get;}","python":"relativeTakeProfitProtections.ThirdTakeProfit: RelativeTakeProfitProtection","summary":"Gets the third partial take profit, if any.","remarks":null,"parameters":[],"returns":{"csharpType":"RelativeTakeProfitProtection","pythonType":"RelativeTakeProfitProtection","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var ladder = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 15), new RelativeTakeProfitProtection(10000, 25), new RelativeTakeProfitProtection(10000, 35), new RelativeTakeProfitLastProtection(50));\nPrint(\"Third take profit at {0} pips\", ladder.ThirdTakeProfit.Distance);","python":"ladder = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 15), RelativeTakeProfitProtection(10000, 25), RelativeTakeProfitProtection(10000, 35), RelativeTakeProfitLastProtection(50))\napi.Print(f\"Third take profit at {ladder.ThirdTakeProfit.Distance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/ThirdTakeProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/ThirdTakeProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.RelativeVigorIndex","kind":"interface","name":"RelativeVigorIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface RelativeVigorIndex","python":"RelativeVigorIndex","summary":"The RVI is a momentum oscillator, measuring the strength of a trend.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private RelativeVigorIndex _relativeVigorIndex;\n\nprotected override void OnStart()\n{\n    _relativeVigorIndex = Indicators.RelativeVigorIndex(10);\n}\n\nprotected override void OnBar()\n{\n    Print(\"RVI: {0}, Signal: {1}\", _relativeVigorIndex.Result.Last(1), _relativeVigorIndex.Signal.Last(1));\n}","python":"def on_start(self):\n    self.relativeVigorIndex = api.Indicators.RelativeVigorIndex(10)\n\ndef on_bar(self):\n    api.Print(f\"RVI: {self.relativeVigorIndex.Result.Last(1)}, Signal: {self.relativeVigorIndex.Signal.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.RelativeVigorIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.RelativeVigorIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"relativeVigorIndex.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Relative Vigor Index calculation (blue line).","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var relativeVigorIndex = Indicators.RelativeVigorIndex(10);\nPrint(\"Relative Vigor Index: {0}\", relativeVigorIndex.Result.Last(1));","python":"relativeVigorIndex = api.Indicators.RelativeVigorIndex(10)\napi.Print(f\"Relative Vigor Index: {relativeVigorIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.RelativeVigorIndex.Signal","kind":"property","name":"Signal","type":"T:cAlgo.API.Indicators.RelativeVigorIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Signal {get;}","python":"relativeVigorIndex.Signal: IndicatorDataSeries","summary":"Gets the Signal line of RVI (red line).","remarks":"Signal: 10 periods SMA of the blue line","parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var relativeVigorIndex = Indicators.RelativeVigorIndex(10);\nif (relativeVigorIndex.Result.Last(1) > relativeVigorIndex.Signal.Last(1) && relativeVigorIndex.Result.Last(2) <= relativeVigorIndex.Signal.Last(2))\n    Print(\"RVI crossed above its signal line: {0}\", relativeVigorIndex.Signal.Last(1));","python":"relativeVigorIndex = api.Indicators.RelativeVigorIndex(10)\nif relativeVigorIndex.Result.Last(1) > relativeVigorIndex.Signal.Last(1) and relativeVigorIndex.Result.Last(2) <= relativeVigorIndex.Signal.Last(2):\n    api.Print(f\"RVI crossed above its signal line: {relativeVigorIndex.Signal.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/Signal/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/RelativeVigorIndex/Signal/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ResizeMode","kind":"enum","name":"ResizeMode","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum ResizeMode","python":"ResizeMode","summary":"Types of resize modes for windows","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Fixed size\", Width = 300, Height = 200, ResizeMode = ResizeMode.NoResize };\nwindow.Show();\nPrint(\"Resize mode: {0}\", window.ResizeMode);","python":"window = Window()\nwindow.Title = \"Fixed size\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.ResizeMode = ResizeMode.NoResize\nwindow.Show()\napi.Print(f\"Resize mode: {window.ResizeMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ResizeMode.NoResize","kind":"enum value","name":"NoResize","type":"T:cAlgo.API.ResizeMode","namespace":"cAlgo.API","group":"Windows","csharp":"ResizeMode.NoResize;","python":"ResizeMode.NoResize","summary":"For windows that cannot be resized","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ResizeMode.CanMinimize","kind":"enum value","name":"CanMinimize","type":"T:cAlgo.API.ResizeMode","namespace":"cAlgo.API","group":"Windows","csharp":"ResizeMode.CanMinimize;","python":"ResizeMode.CanMinimize","summary":"For windows that can only be minimized","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ResizeMode.CanResize","kind":"enum value","name":"CanResize","type":"T:cAlgo.API.ResizeMode","namespace":"cAlgo.API","group":"Windows","csharp":"ResizeMode.CanResize;","python":"ResizeMode.CanResize","summary":"For windows that can be resized from all directions","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ResizeMode.CanResizeWithGrip","kind":"enum value","name":"CanResizeWithGrip","type":"T:cAlgo.API.ResizeMode","namespace":"cAlgo.API","group":"Windows","csharp":"ResizeMode.CanResizeWithGrip;","python":"ResizeMode.CanResizeWithGrip","summary":"For windows that can only be resized by the bottom edge resize grip","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Robot","kind":"class","name":"Robot","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public class Robot : Algo","python":"Robot","summary":"Base class for all cBots.","remarks":"Provides a convenient framework for creating cBots including methods to create, modify, cancel orders and close positions, methods triggered by each tick and each bar, access to built-in Indicators and more.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class SampleBot : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"cBot started on {0}\", SymbolName);\n    }\n\n    protected override void OnBarClosed()\n    {\n        if (Positions.Find(\"SampleBot\", SymbolName) != null)\n            return;\n\n        var closedBar = Bars.Last(1);\n        var tradeType = closedBar.Close > closedBar.Open ? TradeType.Buy : TradeType.Sell;\n        ExecuteMarketOrder(tradeType, SymbolName, Symbol.QuantityToVolumeInUnits(VolumeInLots), \"SampleBot\");\n    }\n\n    protected override void OnError(Error error)\n    {\n        Print(\"Trade error: {0}\", error.Code);\n    }\n\n    protected override void OnStop()\n    {\n        Print(\"cBot stopped\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\nfrom cAlgo.API import *\nfrom robot_wrapper import *\n\nclass SampleBot():\n    def on_start(self):\n        api.Print(f\"cBot started on {api.SymbolName}\")\n\n    def on_bar_closed(self):\n        if api.Positions.Find(\"SampleBot\", api.SymbolName) is not None:\n            return\n        closedBar = api.Bars.Last(1)\n        tradeType = TradeType.Buy if closedBar.Close > closedBar.Open else TradeType.Sell\n        api.ExecuteMarketOrder(tradeType, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots), \"SampleBot\")\n\n    def on_error(self, error):\n        api.Print(f\"Trade error: {error.Code}\")\n\n    def on_stop(self):\n        api.Print(\"cBot stopped\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.#ctor","kind":"constructor","name":"Robot","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public Robot()","python":"Robot()","summary":"Robot class constructor","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SampleBot : Robot\n{\n    public SampleBot()\n    {\n        // The platform creates the cBot instance, API members are available from OnStart\n    }\n\n    protected override void OnStart()\n    {\n        Print(\"Started on {0}\", SymbolName);\n    }\n}","python":"# Not available in Python: the cBot instance is created by the platform, initialize it in on_start\ndef on_start(self):\n    api.Print(f\"Started on {api.SymbolName}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.CancelPendingOrder(cAlgo.API.PendingOrder)","kind":"method","name":"CancelPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult CancelPendingOrder(PendingOrder pendingOrder)","python":"api.CancelPendingOrder(pendingOrder: PendingOrder) -> TradeResult","summary":"Cancel a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrder(PendingOrders[0]);","python":"api.CancelPendingOrder(api.PendingOrders[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/CancelPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/CancelPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.CancelPendingOrderAsync(cAlgo.API.PendingOrder,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"CancelPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation CancelPendingOrderAsync(PendingOrder pendingOrder, Action<TradeResult> callback)","python":"api.CancelPendingOrderAsync(pendingOrder: PendingOrder, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Cancel a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to cancel"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when pending order is cancelled"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"CancelPendingOrderAsync(PendingOrders[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.CancelPendingOrderAsync(api.PendingOrders[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/CancelPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/CancelPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePosition(cAlgo.API.Position)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position)","python":"api.ClosePosition(position: Position) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePosition(cAlgo.API.Position,System.Int64)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, long volume)","python":"api.ClosePosition(position: Position, volume: int) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"},{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ClosePosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ClosePosition(Position position, double volume)","python":"api.ClosePosition(position: Position, volume: float) -> TradeResult","summary":"Close a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume which is closed"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePosition(Positions[0]);","python":"api.ClosePosition(api.Positions[0])"},{"csharp":"ClosePosition(Positions[0], 10000);","python":"api.ClosePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePositionAsync(cAlgo.API.Position,System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, long volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ClosePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ClosePositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ClosePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ClosePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Close a position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"The position to close"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to close"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ClosePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ClosePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ClosePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ClosePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000)"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\")"},{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketOrder(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbolName: str, volume: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketOrderAsync(TradeType.Buy, Symbol.Name, 10000, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Execute a Market Range Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Range Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid)"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\")"},{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\");","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true);","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ExecuteMarketRangeOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ExecuteMarketRangeOrder(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Execute a Market Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrder(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.ExecuteMarketRangeOrder(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":"Stop loss in pips"},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":"Take profit in pips"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", 10, 20, \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market range order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market range order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketRangeOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketRangeOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ExecuteMarketRangeOrderAsync(tradeType: TradeType, symbolName: str, volume: float, marketRangePips: float, basePrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Execute a market order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"marketRangePips","csharpType":"double","pythonType":"float","summary":"The market range (slippage) in Pips"},{"name":"basePrice","csharpType":"double","pythonType":"float","summary":"Base price to calculate relative slippage price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Event raised when position is opened"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ExecuteMarketRangeOrderAsync(TradeType.Buy, Symbol.Name, 10000, 2, Symbol.Bid, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ExecuteMarketRangeOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, 2, api.Symbol.Bid, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ExecuteMarketRangeOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.GetFitness(cAlgo.API.GetFitnessArgs)","kind":"method","name":"GetFitness","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal double GetFitness(GetFitnessArgs args)","python":"api.GetFitness(args: GetFitnessArgs) -> float","summary":"Override this method to provide custom fitness value for Optimization","remarks":null,"parameters":[{"name":"args","csharpType":"GetFitnessArgs","pythonType":"GetFitnessArgs","summary":""}],"returns":{"csharpType":"double","pythonType":"float","summary":"Fitness value of your cBot","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override double GetFitness(GetFitnessArgs args)\n{\n    if (args.TotalTrades == 0)\n        return 0;\n    return args.NetProfit / Math.Max(args.MaxEquityDrawdown, 1);\n}","python":"def get_fitness(self, args):\n    if args.TotalTrades == 0:\n        return 0\n    return args.NetProfit / max(args.MaxEquityDrawdown, 1)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/GetFitness/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/GetFitness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"},{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)"},{"csharp":"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)));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);","python":"api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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);","python":"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)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"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","summary":"Modify a Pending Order","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order which is affected"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New order expiration time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"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));","python":"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))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Int64,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"long","pythonType":"int","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New Protection type"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(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, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify a Pending Order in asynchronous execution mode","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"Pending Order to modify"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"New target price at which the order becomes market order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"New expiry date and time"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume in units for the order"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":"Maximum distance for order execution from target price"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when order is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPendingOrderAsync(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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPendingOrderAsync(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), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPendingOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double volume)","python":"api.ModifyPosition(position: Position, volume: float) -> TradeResult","summary":"Modify the volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10000);","python":"api.ModifyPosition(api.Positions[0], 10000)"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)))"},{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade);","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.ModifyPosition(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Modify the protection of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPosition(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.ModifyPosition(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"New protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss price"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit price"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"New stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"New take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], 10, 20, ProtectionType.Relative, true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], 10, 20, ProtectionType.Relative, True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Modify Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"ModifyPositionAsync(Positions[0], new AbsoluteStopLossProtection(10), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 10), new AbsoluteTakeProfitProtection(2000, 20), new AbsoluteTakeProfitLastProtection(30)), true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ModifyPositionAsync(api.Positions[0], AbsoluteStopLossProtection(10), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 10), AbsoluteTakeProfitProtection(2000, 20), AbsoluteTakeProfitLastProtection(30)), True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ModifyPositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnBar","kind":"method","name":"OnBar","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnBar()","python":"api.OnBar() -> None","summary":"Called on each incoming Bar.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnBar()\n{\n    Print(\"New bar opened at {0}, open price {1}\", Bars.LastBar.OpenTime, Bars.LastBar.Open);\n}","python":"def on_bar(self):\n    api.Print(f\"New bar opened at {api.Bars.LastBar.OpenTime}, open price {api.Bars.LastBar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnBar/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnBar/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnBarClosed","kind":"method","name":"OnBarClosed","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnBarClosed()","python":"api.OnBarClosed() -> None","summary":"Called when a new bar is opened; the method is called for the previous (closed) bar.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnBarClosed()\n{\n    var closedBar = Bars.Last(1);\n    Print(\"Bar closed: O={0} H={1} L={2} C={3}\", closedBar.Open, closedBar.High, closedBar.Low, closedBar.Close);\n}","python":"def on_bar_closed(self):\n    closedBar = api.Bars.Last(1)\n    api.Print(f\"Bar closed: O={closedBar.Open} H={closedBar.High} L={closedBar.Low} C={closedBar.Close}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnBarClosed/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnBarClosed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnError(cAlgo.API.Error)","kind":"method","name":"OnError","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnError(Error error)","python":"api.OnError(error: Error) -> None","summary":"Called if there is an error executing a trade operation.","remarks":null,"parameters":[{"name":"error","csharpType":"Error","pythonType":"Error","summary":"Error description."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnError(Error error)\n{\n    Print(\"Trade error: {0}\", error.Code);\n    if (error.Code == ErrorCode.NoMoney)\n        Stop();\n}","python":"def on_error(self, error):\n    api.Print(f\"Trade error: {error.Code}\")\n    if error.Code == ErrorCode.NoMoney:\n        api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnError/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnError/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnStart","kind":"method","name":"OnStart","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnStart()","python":"api.OnStart() -> None","summary":"Called when cBot is being started. Override this method to initialize cBot, create nested indicators, etc.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private SimpleMovingAverage _sma;\n\nprotected override void OnStart()\n{\n    _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n    Print(\"cBot started on {0} {1}\", SymbolName, TimeFrame);\n}","python":"def on_start(self):\n    self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n    api.Print(f\"cBot started on {api.SymbolName} {api.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnStart/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnStart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnStop","kind":"method","name":"OnStop","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnStop()","python":"api.OnStop() -> None","summary":"Called when cBot is stopped.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStop()\n{\n    foreach (var position in Positions.FindAll(\"myLabel\"))\n        ClosePosition(position);\n    Print(\"cBot stopped, positions closed\");\n}","python":"def on_stop(self):\n    for position in api.Positions.FindAll(\"myLabel\"):\n        api.ClosePosition(position)\n    api.Print(\"cBot stopped, positions closed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnStop/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnStop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnTick","kind":"method","name":"OnTick","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnTick()","python":"api.OnTick() -> None","summary":"Called on each incoming market tick.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    var spreadInPips = Symbol.Spread / Symbol.PipSize;\n    Print(\"Bid: {0}, Ask: {1}, Spread: {2} pips\", Symbol.Bid, Symbol.Ask, spreadInPips);\n}","python":"def on_tick(self):\n    spreadInPips = api.Symbol.Spread / api.Symbol.PipSize\n    api.Print(f\"Bid: {api.Symbol.Bid}, Ask: {api.Symbol.Ask}, Spread: {spreadInPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnTick/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/OnTick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Target price (or better) at which the order is filled"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label that represents the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"The action when the position closes"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5)"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\")"},{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 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));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a Stop Limit Order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopLimitOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place Stop Limit order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price (or better) at which order is filled"},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":"Maximum distance for order execution from target price"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopLimitOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopLimitOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask)"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\")"},{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\");","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven) -> TradeResult","summary":"Place a stop order","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which order becomes a market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Representing label"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrder(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));","python":"api.PlaceStopOrder(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 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), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{cAlgo.API.ProtectionType},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":"Stop loss"},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":"Take profit"},{"name":"protectionType","csharpType":"ProtectionType?","pythonType":"ProtectionType | None","summary":"Protection type"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.RelativeStopLossProtection,cAlgo.API.RelativeTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"RelativeStopLossProtection","pythonType":"RelativeStopLossProtection","summary":"Relative Stop loss"},{"name":"takeProfits","csharpType":"RelativeTakeProfitProtections","pythonType":"RelativeTakeProfitProtections","summary":"Relative Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,cAlgo.API.AbsoluteStopLossProtection,cAlgo.API.AbsoluteTakeProfitProtections,System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,cAlgo.API.StopLossBreakEven,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Place stop order in asynchronous execution mode","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Direction of trade"},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Symbol name of trade"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume of trade"},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":"Price at which the order becomes market order"},{"name":"label","csharpType":"string","pythonType":"str","summary":"Label representing the order"},{"name":"stopLoss","csharpType":"AbsoluteStopLossProtection","pythonType":"AbsoluteStopLossProtection","summary":"Absolute Stop loss"},{"name":"takeProfits","csharpType":"AbsoluteTakeProfitProtections","pythonType":"AbsoluteTakeProfitProtections","summary":"Absolute Take profits"},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":"Order expiry date and time"},{"name":"comment","csharpType":"string","pythonType":"str","summary":"Order comment"},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":"Enable/disable TrailingStop for position"},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":"Trigger method for position's StopLoss"},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"Determines how pending order will be triggered in case it is a StopOrder"},{"name":"stopLossBreakEven","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":"Break-even for position's StopLoss"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Action when order is placed"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"PlaceStopOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, \"myLabel\", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), \"order comment\", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.PlaceStopOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, \"myLabel\", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), \"order comment\", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/PlaceStopOrderAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ReversePosition(cAlgo.API.Position)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position)","python":"api.ReversePosition(position: Position) -> TradeResult","summary":"Modify the direction of trade at position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0]);","python":"api.ReversePosition(api.Positions[0])"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ReversePosition(cAlgo.API.Position,System.Double)","kind":"method","name":"ReversePosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ReversePosition(Position position, double volume)","python":"api.ReversePosition(position: Position, volume: float) -> TradeResult","summary":"Modify the direction of trade and volume of a position","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position which is affected"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Volume (in units) of Trade"}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"Trade Result","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePosition(Positions[0]);","python":"api.ReversePosition(api.Positions[0])"},{"csharp":"ReversePosition(Positions[0], 10000);","python":"api.ReversePosition(api.Positions[0], 10000)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePosition/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePosition/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ReversePositionAsync(cAlgo.API.Position,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to reverse"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ReversePositionAsync(cAlgo.API.Position,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ReversePositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ReversePositionAsync(Position position, double volume, Action<TradeResult> callback)","python":"api.ReversePositionAsync(position: Position, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"Reverses Position in asynchronous execution mode","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":"Position to modify"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"New volume"},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":"Method that is called when position is modified"}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"Trade Operation","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ReversePositionAsync(Positions[0], result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"},{"csharp":"ReversePositionAsync(Positions[0], 10000, result => Print(\"Trade operation successful: {0}\", result.IsSuccessful));","python":"api.ReversePositionAsync(api.Positions[0], 10000, lambda result: api.Print(f\"Trade operation successful: {result.IsSuccessful}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePositionAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/ReversePositionAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.Stop","kind":"method","name":"Stop","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public void Stop()","python":"api.Stop() -> None","summary":"Stops the cBot. cBot will be completely stopped and will not send/receive any signals.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.Balance < 1000)\n{\n    Print(\"Balance is below 1000, stopping the cBot\");\n    Stop();\n}","python":"if api.Account.Balance < 1000:\n    api.Print(\"Balance is below 1000, stopping the cBot\")\n    api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Stop/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Stop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Robot.Account","kind":"property","name":"Account","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public IAccount Account {get;}","python":"api.Account: IAccount","summary":"Contains all Account information","remarks":null,"parameters":[],"returns":{"csharpType":"IAccount","pythonType":"IAccount","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Balance: {0} {1}\", Account.Balance, Account.Asset.Name);\nPrint(\"Equity: {0}, Free margin: {1}\", Account.Equity, Account.FreeMargin);\nif (Account.MarginLevel.HasValue)\n    Print(\"Margin level: {0}%\", Account.MarginLevel.Value);","python":"api.Print(f\"Balance: {api.Account.Balance} {api.Account.Asset.Name}\")\napi.Print(f\"Equity: {api.Account.Equity}, Free margin: {api.Account.FreeMargin}\")\nif api.Account.MarginLevel is not None:\n    api.Print(f\"Margin level: {api.Account.MarginLevel}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Account/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/Account/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Robot.LastResult","kind":"property","name":"LastResult","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult LastResult {get;}","python":"api.LastResult: TradeResult","summary":"The latest trade result","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\nif (LastResult.IsSuccessful)\n    Print(\"Position opened at {0}\", LastResult.Position.EntryPrice);\nelse\n    Print(\"Order failed: {0}\", LastResult.Error);","python":"api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\nif api.LastResult.IsSuccessful:\n    api.Print(f\"Position opened at {api.LastResult.Position.EntryPrice}\")\nelse:\n    api.Print(f\"Order failed: {api.LastResult.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/LastResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/LastResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnPositionOpened(cAlgo.API.Position)","kind":"method","name":"OnPositionOpened","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnPositionOpened(Position openedPosition)","python":"api.OnPositionOpened(openedPosition: Position) -> None","summary":"","remarks":null,"parameters":[{"name":"openedPosition","csharpType":"Position","pythonType":"Position","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Subscribe to Positions.Opened event instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnPositionClosed(cAlgo.API.Position)","kind":"method","name":"OnPositionClosed","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnPositionClosed(Position position)","python":"api.OnPositionClosed(position: Position) -> None","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Subscribe to Positions.Closed event instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.OnPendingOrderCreated(cAlgo.API.PendingOrder)","kind":"method","name":"OnPendingOrderCreated","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"protected internal void OnPendingOrderCreated(PendingOrder newOrder)","python":"api.OnPendingOrderCreated(newOrder: PendingOrder) -> None","summary":"","remarks":null,"parameters":[{"name":"newOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Subscribe to PendingOrders.Created event instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, long volume)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: int) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, long volume, string label)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: int, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean)","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, bool hasTrailingStop)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ExecuteMarketOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ExecuteMarketOrder(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ExecuteMarketOrder(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, long volume, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, long volume, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, long volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ExecuteMarketOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.Double},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ExecuteMarketOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, Symbol symbol, double volume, string label, double? stopLossPips, double? takeProfitPips, double? marketRangePips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ExecuteMarketOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, marketRangePips: float | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"marketRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Int64,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, long volume, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, volume: int, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Int64,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, long volume, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, volume: int, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean)","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrder(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double})","kind":"method","name":"ModifyPendingOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)","python":"api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Int64,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: int, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPendingOrderAsync(cAlgo.API.PendingOrder,System.Double,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Double,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{cAlgo.API.StopTriggerMethod},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPendingOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.ModifyPendingOrderAsync(pendingOrder: PendingOrder, targetPrice: float, stopLossPips: float | None, takeProfitPips: float | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"pendingOrder","csharpType":"PendingOrder","pythonType":"PendingOrder","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expirationTime","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopLimitRangePips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean)","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPosition(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"ModifyPosition","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.ModifyPosition(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.ModifyPositionAsync(cAlgo.API.Position,System.Nullable{System.Double},System.Nullable{System.Double},System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"ModifyPositionAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.ModifyPositionAsync(position: Position, stopLoss: float | None, takeProfit: float | None, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"position","csharpType":"Position","pythonType":"Position","summary":""},{"name":"stopLoss","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfit","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Please use new version with ProtectionType parameter.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopLimitOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopLimitOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"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)","python":"api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"stopLimitRangePips","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod})","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrder(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod)","kind":"method","name":"PlaceStopOrder","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeResult PlaceStopOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod)","python":"api.PlaceStopOrder(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod) -> TradeResult","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""}],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Int64,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: int, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"long","pythonType":"int","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,cAlgo.API.Internals.Symbol,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbol: Symbol, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbol","csharpType":"Symbol","pythonType":"Symbol","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Robot.PlaceStopOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.String,System.Nullable{System.Double},System.Nullable{System.Double},System.Nullable{System.DateTime},System.String,System.Boolean,System.Nullable{cAlgo.API.StopTriggerMethod},cAlgo.API.StopTriggerMethod,System.Action{cAlgo.API.TradeResult})","kind":"method","name":"PlaceStopOrderAsync","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public TradeOperation PlaceStopOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)","python":"api.PlaceStopOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, label: str, stopLossPips: float | None, takeProfitPips: float | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation","summary":"","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":""},{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""},{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"targetPrice","csharpType":"double","pythonType":"float","summary":""},{"name":"label","csharpType":"string","pythonType":"str","summary":""},{"name":"stopLossPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"takeProfitPips","csharpType":"double?","pythonType":"float | None","summary":""},{"name":"expiration","csharpType":"DateTime?","pythonType":"DateTime | None","summary":""},{"name":"comment","csharpType":"string","pythonType":"str","summary":""},{"name":"hasTrailingStop","csharpType":"bool","pythonType":"bool","summary":""},{"name":"stopLossTriggerMethod","csharpType":"StopTriggerMethod?","pythonType":"StopTriggerMethod | None","summary":""},{"name":"stopOrderTriggerMethod","csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":""},{"name":"callback","csharpType":"Action<TradeResult>","pythonType":"Callable[[TradeResult], None]","summary":""}],"returns":{"csharpType":"TradeOperation","pythonType":"TradeOperation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Parameters 'double? stopLossPips' and 'double? takeProfitPips' was replaced with 'double? stopLoss' and 'double? takeProfit'.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Robot.Trade","kind":"property","name":"Trade","type":"T:cAlgo.API.Robot","namespace":"cAlgo.API","group":"General","csharp":"public ITrade Trade {get;}","python":"api.Trade: ITrade","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"ITrade","pythonType":"ITrade","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/General/Robot/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/Robot/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RobotAttribute","kind":"class","name":"RobotAttribute","type":null,"namespace":"cAlgo.API","group":"Attributes","csharp":"public sealed class RobotAttribute : Attribute","python":"RobotAttribute","summary":"Sealed class RobotAttribute.","remarks":"Marks a class as a Robot. The Robot attribute cannot be ommited.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // config.json declares the cBot settings, the class holds only the code\n    public partial class RobotAttributeSample : Robot\n    {\n        protected override void OnStart()\n        {\n            Print(\"cBot started on {0}, time zone {1}\", SymbolName, TimeZone.DisplayName);\n        }\n    }\n}","python":"class RobotAttributeSample():\n    def on_start(self):\n        api.Print(f\"cBot started on {api.SymbolName}, time zone {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RobotAttribute.#ctor","kind":"constructor","name":"RobotAttribute","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public RobotAttribute()","python":"RobotAttribute()","summary":"Initializes a new RobotAttribute instance.","remarks":"To make it effective apply enclosed in square brackets, e.g. [Robot], in front of the robot class declaration.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NewRobot : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"cBot started\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"cBot started\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.AccessRights","kind":"property","name":"AccessRights","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public AccessRights AccessRights {get; set;}","python":"robotAttribute.AccessRights: AccessRights","summary":"Gets or sets the access rights required for the cBot.","remarks":null,"parameters":[],"returns":{"csharpType":"AccessRights","pythonType":"AccessRights","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NoAccessRobot : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"cBot runs without file system or network access\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"cBot runs without file system or network access\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AccessRights/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AccessRights/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.AddIndicators","kind":"property","name":"AddIndicators","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public bool AddIndicators {get; set;}","python":"robotAttribute.AddIndicators: bool","summary":"Gets or sets whether indicators created by robot will be added to chart or not.","remarks":"Default value is false.","parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class AddIndicatorsBot : Robot\n{\n    private SimpleMovingAverage _sma;\n\n    protected override void OnStart()\n    {\n        _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\n    }\n\n    protected override void OnBarClosed()\n    {\n        Print(\"SMA: {0}\", _sma.Result.Last(1));\n    }\n}","python":"def on_start(self):\n    self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\n\ndef on_bar_closed(self):\n    api.Print(f\"SMA: {self.sma.Result.Last(1)}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AddIndicators\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AddIndicators/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AddIndicators/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.AdditionalInfoUrl","kind":"property","name":"AdditionalInfoUrl","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string AdditionalInfoUrl {get; set;}","python":"robotAttribute.AdditionalInfoUrl: str","summary":"Gets or sets additional info url.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"public partial class AdditionalInfoUrlExampleBot : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"cBot started\");\n    }\n}","python":"def on_start(self):\n    api.Print(\"cBot started\")","config":"{\n  \"AccessRights\": \"None\",\n  \"AdditionalInfoUrl\": \"https://ctrader.com/\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AdditionalInfoUrl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/AdditionalInfoUrl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.DefaultSymbolName","kind":"property","name":"DefaultSymbolName","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string DefaultSymbolName {get; set;}","python":"robotAttribute.DefaultSymbolName: str","summary":"Not used. cTrader applies no default symbol to a cBot: a new instance runs on the symbol it is added with, which the cBot reads from SymbolName.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"Instance symbol: {0}\", SymbolName);\n}","python":"def on_start(self):\n    api.Print(f\"Instance symbol: {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/DefaultSymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/DefaultSymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.DefaultTimeFrame","kind":"property","name":"DefaultTimeFrame","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string DefaultTimeFrame {get; set;}","python":"robotAttribute.DefaultTimeFrame: str","summary":"Not used. cTrader applies no default time frame to a cBot: a new instance runs on the time frame of the chart it is added to, which the cBot reads from TimeFrame.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Print(\"Instance time frame: {0}\", TimeFrame);\n}","python":"def on_start(self):\n    api.Print(f\"Instance time frame: {api.TimeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/DefaultTimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/DefaultTimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.Name","kind":"property","name":"Name","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string Name {get;}","python":"robotAttribute.Name: str","summary":"The name of a robot. Sets from constructor.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NameSample : Robot\n{\n    protected override void OnStart()\n    {\n        var attribute = (RobotAttribute)Attribute.GetCustomAttribute(GetType(), typeof(RobotAttribute));\n        Print(\"cBot name: {0}\", attribute.Name ?? GetType().Name);\n    }\n}","python":"def on_start(self):\n    api.Print(\"cBot started\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.RobotAttribute.TimeZone","kind":"property","name":"TimeZone","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public string TimeZone {get; set;}","python":"robotAttribute.TimeZone: str","summary":"Sets the timezone for all the robot or indicator datetime references","remarks":"All dates and times within the robot or indicator will be converted to this timezone","parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class NewsRobot : Robot\n{\n    protected override void OnStart()\n    {\n        Print(\"New York time: {0}\", Server.Time);\n    }\n}","python":"def on_start(self):\n    api.Print(f\"New York time: {api.Server.Time}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Eastern Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/TimeZone/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/TimeZone/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.RobotAttribute.#ctor(System.String)","kind":"constructor","name":"RobotAttribute","type":"T:cAlgo.API.RobotAttribute","namespace":"cAlgo.API","group":"Attributes","csharp":"public RobotAttribute(string name)","python":"RobotAttribute(name: str)","summary":"","remarks":null,"parameters":[{"name":"name","csharpType":"string","pythonType":"str","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":"Deprecated.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RobotStartDialog","kind":"class","name":"RobotStartDialog","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public class RobotStartDialog","python":"RobotStartDialog","summary":"Represents a common dialog box that allows a user to start a cBot.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var robotType = (RobotType)AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot);\n\n        var robotStartDialog = new RobotStartDialog(robotType);\n\n        robotStartDialog.ShowDialog();\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        robotType = RobotType(api.AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot))\n        robotStartDialog = RobotStartDialog(robotType)\n        robotStartDialog.ShowDialog()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything."}]}
{"id":"M:cAlgo.API.RobotStartDialog.#ctor(cAlgo.API.RobotType)","kind":"constructor","name":"RobotStartDialog","type":"T:cAlgo.API.RobotStartDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public RobotStartDialog(RobotType robotType)","python":"RobotStartDialog(robotType: RobotType)","summary":"Creates an RobotStartDialog.","remarks":null,"parameters":[{"name":"robotType","csharpType":"RobotType","pythonType":"RobotType","summary":""}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot) is RobotType robotType)\n{\n    var robotStartDialog = new RobotStartDialog(robotType);\n    robotStartDialog.ShowDialog();\n}","python":"algoType = api.AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot)\nif algoType is not None:\n    robotStartDialog = RobotStartDialog(RobotType(algoType))\n    robotStartDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything."}]}
{"id":"M:cAlgo.API.RobotStartDialog.ShowDialog","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.RobotStartDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void ShowDialog()","python":"robotStartDialog.ShowDialog() -> None","summary":"Shows the dialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var startButton = new Button { Text = \"Start Sample Breakout\" };\nstartButton.Click += args =>\n{\n    if (AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot) is RobotType robotType)\n        new RobotStartDialog(robotType).ShowDialog();\n};\nChart.AddControl(startButton);","python":"algoType = api.AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot)\nif algoType is not None:\n    RobotStartDialog(RobotType(algoType)).ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns normally, no exception."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns normally, no exception."}]}
{"id":"P:cAlgo.API.RobotStartDialog.RobotType","kind":"property","name":"RobotType","type":"T:cAlgo.API.RobotStartDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public RobotType RobotType {get; set;}","python":"robotStartDialog.RobotType: RobotType","summary":"Gets or sets the Robot Type.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotType","pythonType":"RobotType","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"if (AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot) is RobotType robotType)\n{\n    var robotStartDialog = new RobotStartDialog(robotType);\n    Print(\"Dialog cBot: {0}\", robotStartDialog.RobotType.Name);\n}","python":"algoType = api.AlgoRegistry.Get(\"Sample Breakout\", AlgoKind.Robot)\nif algoType is not None:\n    robotStartDialog = RobotStartDialog(RobotType(algoType))\n    api.Print(f\"Dialog cBot: {robotStartDialog.RobotType.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/RobotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/RobotStartDialog/RobotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns without showing anything."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns without showing anything."}]}
{"id":"T:cAlgo.API.RobotState","kind":"enum","name":"RobotState","type":null,"namespace":"cAlgo.API","group":"Robots","csharp":"public enum RobotState","python":"RobotState","summary":"Represents the predefined states of a Robot instance.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n   protected override void OnStart()\n   {\n       foreach (var chartRobot in ChartRobots)\n       {\n            Print($\"Name: {chartRobot.Name} | State: {chartRobot.State}\");\n       }\n   }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        for chartRobot in api.ChartRobots:\n            print(f\"Name: {chartRobot.Name} | State: {chartRobot.State}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RobotState.Stopped","kind":"enum value","name":"Stopped","type":"T:cAlgo.API.RobotState","namespace":"cAlgo.API","group":"Robots","csharp":"RobotState.Stopped;","python":"RobotState.Stopped","summary":"Robot instance is stopped.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotState","pythonType":"RobotState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RobotState.Running","kind":"enum value","name":"Running","type":"T:cAlgo.API.RobotState","namespace":"cAlgo.API","group":"Robots","csharp":"RobotState.Running;","python":"RobotState.Running","summary":"Robot instance is running.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotState","pythonType":"RobotState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RobotState.Stopping","kind":"enum value","name":"Stopping","type":"T:cAlgo.API.RobotState","namespace":"cAlgo.API","group":"Robots","csharp":"RobotState.Stopping;","python":"RobotState.Stopping","summary":"Stop was requested, but Robot instance has not stopped yet","remarks":null,"parameters":[],"returns":{"csharpType":"RobotState","pythonType":"RobotState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RobotState.Restarting","kind":"enum value","name":"Restarting","type":"T:cAlgo.API.RobotState","namespace":"cAlgo.API","group":"Robots","csharp":"RobotState.Restarting;","python":"RobotState.Restarting","summary":"Restarting Robot instance because of crash or change of parameters, symbols, account, etc.","remarks":null,"parameters":[],"returns":{"csharpType":"RobotState","pythonType":"RobotState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/Robots/RobotState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RobotType","kind":"interface","name":"RobotType","type":null,"namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"public interface RobotType","python":"RobotType","summary":"Represents a robot / cBot algorithm type.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        if (AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot) is RobotType robotType)\n            Print($\"Name: {robotType.Name} | Parameters #: {robotType.Parameters.Count}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nfrom System import Action\n\nclass Test():\n    def on_start(self):\n        algoType = api.AlgoRegistry.Get(\"Sample Break Even\", AlgoKind.Robot)\n        if algoType is not None:\n            robotType = RobotType(algoType)\n            print(f\"Name: {robotType.Name} | Parameters #: {robotType.Parameters.Count}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/RobotType/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/RobotType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Robots, ChartRobot.Type, ChartTemplateRobot.Type and more)."}]}
{"id":"P:cAlgo.API.RobotType.Parameters","kind":"property","name":"Parameters","type":"T:cAlgo.API.RobotType","namespace":"cAlgo.API","group":"AlgoRegistry","csharp":"IReadonlyList<AlgoParameter> Parameters {get;}","python":"robotType.Parameters: IReadonlyList[AlgoParameter]","summary":"Gets collection of Robot parameters.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<AlgoParameter>","pythonType":"IReadonlyList[AlgoParameter]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var robotType in AlgoRegistry.Robots)\n    Print(\"{0} has {1} parameters\", robotType.Name, robotType.Parameters.Count);","python":"for robotType in api.AlgoRegistry.Robots:\n    api.Print(f\"{robotType.Name} has {robotType.Parameters.Count} parameters\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/RobotType/Parameters/","markdown":"https://help.ctrader.com/ctrader-algo/references/AlgoRegistry/RobotType/Parameters/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Robots, ChartRobot.Type, ChartTemplateRobot.Type and more)."}]}
{"id":"T:cAlgo.API.RoundingMode","kind":"enum","name":"RoundingMode","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum RoundingMode","python":"RoundingMode","summary":"The rounding mode for normalizing trade volume.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var riskAmount = Account.Balance * 0.01;\nvar volume = riskAmount / (20 * Symbol.PipValue);\nvar normalizedVolume = Symbol.NormalizeVolumeInUnits(volume, RoundingMode.Down);\nPrint(\"Raw volume {0}, normalized volume {1}\", volume, normalizedVolume);","python":"riskAmount = api.Account.Balance * 0.01\nvolume = riskAmount / (20 * api.Symbol.PipValue)\nnormalizedVolume = api.Symbol.NormalizeVolumeInUnits(volume, RoundingMode.Down)\napi.Print(f\"Raw volume {volume}, normalized volume {normalizedVolume}\")"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to normalize volume based on different rounding modes\n    public partial class NormalizingVolumeSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n            Print(Symbol.NormalizeVolumeInUnits(volumeInUnits, RoundingMode));\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"class NormalizingVolumeSample():\n    def initialize(self):\n        volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        api.Print(api.Symbol.NormalizeVolumeInUnits(volumeInUnits, api.RoundingMode))","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"RoundingMode\",\n      \"DisplayName\": \"Rounding Mode\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.RoundingMode\",\n      \"DefaultValue\": \"ToNearest\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RoundingMode.ToNearest","kind":"enum value","name":"ToNearest","type":"T:cAlgo.API.RoundingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"RoundingMode.ToNearest;","python":"RoundingMode.ToNearest","summary":"Round value to the nearest tradable volume.","remarks":null,"parameters":[],"returns":{"csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.ToNearest);\nPrint(\"Nearest tradable volume: {0}\", volume);","python":"volume = api.Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.ToNearest)\napi.Print(f\"Nearest tradable volume: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RoundingMode.Down","kind":"enum value","name":"Down","type":"T:cAlgo.API.RoundingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"RoundingMode.Down;","python":"RoundingMode.Down","summary":"Round value down to tradable volume.","remarks":null,"parameters":[],"returns":{"csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Down);\nPrint(\"Volume rounded down: {0}\", volume);","python":"volume = api.Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Down)\napi.Print(f\"Volume rounded down: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RoundingMode.Up","kind":"enum value","name":"Up","type":"T:cAlgo.API.RoundingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"RoundingMode.Up;","python":"RoundingMode.Up","summary":"Round value up to tradable volume.","remarks":null,"parameters":[],"returns":{"csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Up);\nPrint(\"Volume rounded up: {0}\", volume);","python":"volume = api.Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Up)\napi.Print(f\"Volume rounded up: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/RoundingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.RunningMode","kind":"enum","name":"RunningMode","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public enum RunningMode","python":"RunningMode","summary":"Defines if a cBot is running in real time, in the silent backtesting mode, in the visual backtesting mode, or in the optimization mode.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use the RunningMode property of your robot\n    public partial class RunningModeSample : Robot\n    {\n        protected override void OnStart()\n        {\n            switch (RunningMode)\n            {\n                case RunningMode.RealTime:\n                    Print(\"Trading on live market data\");\n                    break;\n\n                case RunningMode.SilentBacktesting:\n                    Print(\"Backtesting with the visual mode off\");\n                    break;\n\n                case RunningMode.VisualBacktesting:\n                    Print(\"Backtesting with the visual mode on\");\n                    break;\n\n                case RunningMode.Optimization:\n                    Print(\"Running in the optimizer\");\n                    break;\n            }\n        }\n    }\n}","python":"class RunningModeSample():\n    def on_start(self):\n        if api.RunningMode == RunningMode.RealTime:\n            api.Print(\"Trading on live market data\")\n        elif api.RunningMode == RunningMode.SilentBacktesting:\n            api.Print(\"Backtesting with the visual mode off\")\n        elif api.RunningMode == RunningMode.VisualBacktesting:\n            api.Print(\"Backtesting with the visual mode on\")\n        elif api.RunningMode == RunningMode.Optimization:\n            api.Print(\"Running in the optimizer\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RunningMode.RealTime","kind":"enum value","name":"RealTime","type":"T:cAlgo.API.RunningMode","namespace":"cAlgo.API","group":"Application","csharp":"RunningMode.RealTime;","python":"RunningMode.RealTime","summary":"The cBot is running in real time.","remarks":null,"parameters":[],"returns":{"csharpType":"RunningMode","pythonType":"RunningMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RunningMode.SilentBacktesting","kind":"enum value","name":"SilentBacktesting","type":"T:cAlgo.API.RunningMode","namespace":"cAlgo.API","group":"Application","csharp":"RunningMode.SilentBacktesting;","python":"RunningMode.SilentBacktesting","summary":"The cBot is running in the silent backtesting mode.","remarks":null,"parameters":[],"returns":{"csharpType":"RunningMode","pythonType":"RunningMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RunningMode.VisualBacktesting","kind":"enum value","name":"VisualBacktesting","type":"T:cAlgo.API.RunningMode","namespace":"cAlgo.API","group":"Application","csharp":"RunningMode.VisualBacktesting;","python":"RunningMode.VisualBacktesting","summary":"The cBot is running in the visual backtesting mode.","remarks":null,"parameters":[],"returns":{"csharpType":"RunningMode","pythonType":"RunningMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.RunningMode.Optimization","kind":"enum value","name":"Optimization","type":"T:cAlgo.API.RunningMode","namespace":"cAlgo.API","group":"Application","csharp":"RunningMode.Optimization;","python":"RunningMode.Optimization","summary":"The cBot is running in the optimization mode.","remarks":null,"parameters":[],"returns":{"csharpType":"RunningMode","pythonType":"RunningMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/RunningMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SaveFileDialog","kind":"class","name":"SaveFileDialog","type":null,"namespace":"cAlgo.API","group":"Dialogs","csharp":"public class SaveFileDialog","python":"SaveFileDialog","summary":"Represents a common dialog box that allows a user to specify a filename to save.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var saveFileDialog = new SaveFileDialog\n        {\n            Title = \"Save File\",\n            AddExtension = true,\n        };\n\n        var result = saveFileDialog.ShowDialog();\n\n        if (result == FileDialogResult.Cancel)\n            return;\n\n        saveFileDialog.WriteToFile(\"Write to selected user file here\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        saveFileDialog = SaveFileDialog()\n        saveFileDialog.Title = \"Save File\"\n        saveFileDialog.AddExtension = True\n\n        result = saveFileDialog.ShowDialog()\n\n        if result == FileDialogResult.Cancel:\n            return\n\n        saveFileDialog.WriteToFile(\"Write to selected user file here\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.SaveFileDialog.#ctor","kind":"constructor","name":"SaveFileDialog","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public SaveFileDialog()","python":"SaveFileDialog()","summary":"Creates a SaveFileDialog.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { Title = \"Export positions\", Filter = \"CSV files (*.csv)|*.csv\", DefaultExt = \"csv\" };\nif (saveFileDialog.ShowDialog() == FileDialogResult.OK)\n    saveFileDialog.WriteToFile(string.Join(Environment.NewLine, Positions.Select(position => position.SymbolName + \",\" + position.NetProfit)));","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.Title = \"Export positions\"\nsaveFileDialog.Filter = \"CSV files (*.csv)|*.csv\"\nsaveFileDialog.DefaultExt = \"csv\"\nif saveFileDialog.ShowDialog() == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(\"\\n\".join(f\"{p.SymbolName},{p.NetProfit}\" for p in api.Positions))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.SaveFileDialog.Reset","kind":"method","name":"Reset","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void Reset()","python":"saveFileDialog.Reset() -> None","summary":"Resets all dialog properties to their default values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { Title = \"Export\", DefaultExt = \"csv\" };\nsaveFileDialog.ShowDialog();\nsaveFileDialog.Reset();\nPrint(\"Default extension after reset: '{0}'\", saveFileDialog.DefaultExt);","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.Title = \"Export\"\nsaveFileDialog.DefaultExt = \"csv\"\nsaveFileDialog.ShowDialog()\nsaveFileDialog.Reset()\napi.Print(f\"Default extension after reset: '{saveFileDialog.DefaultExt}'\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Reset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Reset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"M:cAlgo.API.SaveFileDialog.ShowDialog","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog()","python":"saveFileDialog.ShowDialog() -> FileDialogResult","summary":"Shows a file dialog, with the owner as the main Window","remarks":null,"parameters":[],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { Filter = \"Text files (*.txt)|*.txt\" };\nvar result = saveFileDialog.ShowDialog();\nif (result == FileDialogResult.OK)\n    saveFileDialog.WriteToFile(\"Net profit: \" + History.Sum(trade => trade.NetProfit));\nelse\n    Print(\"Dialog result: {0}\", result);","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.Filter = \"Text files (*.txt)|*.txt\"\nresult = saveFileDialog.ShowDialog()\nif result == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(f\"Net profit: {sum(trade.NetProfit for trade in api.History)}\")\nelse:\n    api.Print(f\"Dialog result: {result}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None."}]}
{"id":"M:cAlgo.API.SaveFileDialog.ShowDialog(cAlgo.API.Window)","kind":"method","name":"ShowDialog","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public FileDialogResult ShowDialog(Window owner)","python":"saveFileDialog.ShowDialog(owner: Window) -> FileDialogResult","summary":"Shows a file dialog, with the passed owner window.","remarks":null,"parameters":[{"name":"owner","csharpType":"Window","pythonType":"Window","summary":"The window that owns the file dialog."}],"returns":{"csharpType":"FileDialogResult","pythonType":"FileDialogResult","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Export\", Width = 300, Height = 150 };\nvar exportButton = new Button { Text = \"Export\" };\nexportButton.Click += args =>\n{\n    var saveFileDialog = new SaveFileDialog { DefaultExt = \"txt\" };\n    if (saveFileDialog.ShowDialog(window) == FileDialogResult.OK)\n        saveFileDialog.WriteToFile(\"Equity: \" + Account.Equity);\n};\nwindow.Child = exportButton;\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Export\"\nwindow.Width = 300\nwindow.Height = 150\nwindow.Show()\nsaveFileDialog = SaveFileDialog()\nsaveFileDialog.DefaultExt = \"txt\"\nif saveFileDialog.ShowDialog(window) == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(f\"Equity: {api.Account.Equity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ShowDialog/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ShowDialog/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None."},{"name":"Cloud","support":"None","behaviour":"No dialog is shown. Returns FileDialogResult.None."}]}
{"id":"M:cAlgo.API.SaveFileDialog.WriteToFile(System.String)","kind":"method","name":"WriteToFile","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void WriteToFile(string data)","python":"saveFileDialog.WriteToFile(data: str) -> None","summary":"Writes data to selected file.","remarks":null,"parameters":[{"name":"data","csharpType":"string","pythonType":"str","summary":"File data"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { DefaultExt = \"txt\" };\nif (saveFileDialog.ShowDialog() == FileDialogResult.OK)\n    saveFileDialog.WriteToFile(\"Equity at \" + Server.Time + \": \" + Account.Equity);","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.DefaultExt = \"txt\"\nif saveFileDialog.ShowDialog() == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(f\"Equity at {api.Server.Time}: {api.Account.Equity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/WriteToFile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/WriteToFile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is written. No exception is thrown."},{"name":"Cloud","support":"None","behaviour":"Nothing is written. No exception is thrown."}]}
{"id":"M:cAlgo.API.SaveFileDialog.WriteToFile(System.Byte[])","kind":"method","name":"WriteToFile","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public void WriteToFile(byte[] data)","python":"saveFileDialog.WriteToFile(data: list[int]) -> None","summary":"Writes data to selected file.","remarks":null,"parameters":[{"name":"data","csharpType":"byte[]","pythonType":"list[int]","summary":"File data"}],"returns":null,"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { DefaultExt = \"bin\" };\nif (saveFileDialog.ShowDialog() == FileDialogResult.OK)\n    saveFileDialog.WriteToFile(Encoding.UTF8.GetBytes(\"Balance: \" + Account.Balance));","python":"from System.Text import Encoding\nsaveFileDialog = SaveFileDialog()\nsaveFileDialog.DefaultExt = \"bin\"\nif saveFileDialog.ShowDialog() == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(Encoding.UTF8.GetBytes(f\"Balance: {api.Account.Balance}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/WriteToFile/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/WriteToFile/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Nothing is written. No exception is thrown."},{"name":"Cloud","support":"None","behaviour":"Nothing is written. No exception is thrown."}]}
{"id":"P:cAlgo.API.SaveFileDialog.AddExtension","kind":"property","name":"AddExtension","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool AddExtension {get; set;}","python":"saveFileDialog.AddExtension: bool","summary":"Gets or sets a value indicating whether a file dialog automatically adds an extension to a file name if the user omits an extension.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { AddExtension = true, DefaultExt = \"txt\" };\nif (saveFileDialog.ShowDialog() == FileDialogResult.OK)\n    saveFileDialog.WriteToFile(\"Balance: \" + Account.Balance);","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.AddExtension = True\nsaveFileDialog.DefaultExt = \"txt\"\nif saveFileDialog.ShowDialog() == FileDialogResult.OK:\n    saveFileDialog.WriteToFile(f\"Balance: {api.Account.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/AddExtension/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/AddExtension/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.SaveFileDialog.DefaultExt","kind":"property","name":"DefaultExt","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string DefaultExt {get; set;}","python":"saveFileDialog.DefaultExt: str","summary":"Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { DefaultExt = \"csv\", Filter = \"CSV files (*.csv)|*.csv\" };\nsaveFileDialog.ShowDialog();\nPrint(\"Default extension: {0}\", saveFileDialog.DefaultExt);","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.DefaultExt = \"csv\"\nsaveFileDialog.Filter = \"CSV files (*.csv)|*.csv\"\nsaveFileDialog.ShowDialog()\napi.Print(f\"Default extension: {saveFileDialog.DefaultExt}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/DefaultExt/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/DefaultExt/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.SaveFileDialog.Filter","kind":"property","name":"Filter","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Filter {get; set;}","python":"saveFileDialog.Filter: str","summary":"Gets or sets the filter string that determines what types of files are displayed in file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { Filter = \"JSON files (*.json)|*.json|All files (*.*)|*.*\" };\nsaveFileDialog.ShowDialog();","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.Filter = \"JSON files (*.json)|*.json|All files (*.*)|*.*\"\nsaveFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Filter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Filter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.SaveFileDialog.InitialDirectory","kind":"property","name":"InitialDirectory","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string InitialDirectory {get; set;}","python":"saveFileDialog.InitialDirectory: str","summary":"Gets or sets the initial directory that is displayed by a file dialog.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) };\nsaveFileDialog.ShowDialog();","python":"from System import Environment\nsaveFileDialog = SaveFileDialog()\nsaveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)\nsaveFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/InitialDirectory/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/InitialDirectory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.SaveFileDialog.Title","kind":"property","name":"Title","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public string Title {get; set;}","python":"saveFileDialog.Title: str","summary":"Gets or sets a string shown in the title bar of the dialog. If this property is null, a localized default from the operating system itself will be used.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { Title = \"Save trading journal\" };\nsaveFileDialog.ShowDialog();","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.Title = \"Save trading journal\"\nsaveFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"P:cAlgo.API.SaveFileDialog.ValidateNames","kind":"property","name":"ValidateNames","type":"T:cAlgo.API.SaveFileDialog","namespace":"cAlgo.API","group":"Dialogs","csharp":"public bool ValidateNames {get; set;}","python":"saveFileDialog.ValidateNames: bool","summary":"Gets or sets a value indicating whether the dialog accepts only valid file names.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var saveFileDialog = new SaveFileDialog { ValidateNames = true };\nsaveFileDialog.ShowDialog();","python":"saveFileDialog = SaveFileDialog()\nsaveFileDialog.ValidateNames = True\nsaveFileDialog.ShowDialog()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ValidateNames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ValidateNames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."},{"name":"Cloud","support":"None","behaviour":"No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored."}]}
{"id":"T:cAlgo.API.ScrollBarVisibility","kind":"enum","name":"ScrollBarVisibility","type":null,"namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public enum ScrollBarVisibility","python":"ScrollBarVisibility","summary":"Specifies the visibility of a ScrollBar for scrollable content.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the ScrollBarVisibility\n    public partial class ScrollBarVisibilitySample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var scrollViewer = new ScrollViewer\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n                HorizontalScrollBarVisibility = HorizontalScrollBarVisibility,\n                VerticalScrollBarVisibility = VerticalScrollBarVisibility,\n                Height = 100\n            };\n\n            var grid = new Grid(10, 2)\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            scrollViewer.Content = grid;\n\n            for (int iRow = 0; iRow < 10; iRow++)\n            {\n                grid.AddChild(new TextBlock\n                {\n                    Text = \"Text\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iRow, 0);\n\n                grid.AddChild(new Button\n                {\n                    Text = \"Button\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iRow, 1);\n            }\n\n            Chart.AddControl(scrollViewer);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Black\n        textBlock.Margin = Thickness(5)\n        return textBlock\n\n    def initialize(self):\n        scrollViewer = ScrollViewer()\n        scrollViewer.HorizontalAlignment = HorizontalAlignment.Center\n        scrollViewer.VerticalAlignment = VerticalAlignment.Center\n        scrollViewer.BackgroundColor = Color.Gold\n        scrollViewer.Opacity = 0.7\n        scrollViewer.HorizontalScrollBarVisibility = api.HorizontalScrollBarVisibility\n        scrollViewer.VerticalScrollBarVisibility = api.VerticalScrollBarVisibility\n        scrollViewer.Height = 100\n\n        grid = Grid(10, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        scrollViewer.Content = grid\n\n        for iRow in range(10):\n            grid.AddChild(self.get_text_block(\"Text\"), iRow, 0)\n\n            button = Button()\n            button.Text = \"Button\"\n            button.Margin = Thickness(5)\n            button.ForegroundColor = Color.Black\n            button.FontWeight = FontWeight.ExtraBold\n\n            grid.AddChild(button, iRow, 1)\n\n        api.Chart.AddControl(scrollViewer)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"HorizontalScrollBarVisibility\",\n      \"DisplayName\": \"Horizontal Scroll Bar Visibility\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.ScrollBarVisibility\",\n      \"DefaultValue\": \"Auto\"\n    },\n    {\n      \"Name\": \"VerticalScrollBarVisibility\",\n      \"DisplayName\": \"Vertical Scroll Bar Visibility\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.ScrollBarVisibility\",\n      \"DefaultValue\": \"Visible\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ScrollBarVisibility.Disabled","kind":"enum value","name":"Disabled","type":"T:cAlgo.API.ScrollBarVisibility","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"ScrollBarVisibility.Disabled;","python":"ScrollBarVisibility.Disabled","summary":"A ScrollBar does not appear even when the viewport cannot display all of the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ScrollBarVisibility.Auto","kind":"enum value","name":"Auto","type":"T:cAlgo.API.ScrollBarVisibility","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"ScrollBarVisibility.Auto;","python":"ScrollBarVisibility.Auto","summary":"A ScrollBar appears and the dimension of the ScrollViewer is applied to the content when the viewport cannot display all of the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ScrollBarVisibility.Hidden","kind":"enum value","name":"Hidden","type":"T:cAlgo.API.ScrollBarVisibility","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"ScrollBarVisibility.Hidden;","python":"ScrollBarVisibility.Hidden","summary":"A ScrollBar does not appear even when the viewport cannot display all of the content. The dimension of the ScrollViewer is not applied to the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.ScrollBarVisibility.Visible","kind":"enum value","name":"Visible","type":"T:cAlgo.API.ScrollBarVisibility","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"ScrollBarVisibility.Visible;","python":"ScrollBarVisibility.Visible","summary":"A ScrollBar always appears. The dimension of the ScrollViewer is applied to the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ScrollViewer","kind":"class","name":"ScrollViewer","type":null,"namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public class ScrollViewer : Control","python":"ScrollViewer","summary":"Represents a scrollable area that can contain other visible elements.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to create a scrollable chart controls container via ScrollViewer control\n    public partial class ScrollViewerSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var scrollViewer = new ScrollViewer\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n                HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,\n                VerticalScrollBarVisibility = ScrollBarVisibility.Visible,\n                Height = 100\n            };\n\n            var grid = new Grid(10, 2)\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            scrollViewer.Content = grid;\n\n            for (int iRow = 0; iRow < 10; iRow++)\n            {\n                grid.AddChild(new TextBlock\n                {\n                    Text = \"Text\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iRow, 0);\n\n                grid.AddChild(new Button\n                {\n                    Text = \"Button\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iRow, 1);\n            }\n\n            Chart.AddControl(scrollViewer);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        scrollViewer = ScrollViewer()\n        scrollViewer.HorizontalAlignment = HorizontalAlignment.Center\n        scrollViewer.VerticalAlignment = VerticalAlignment.Center\n        scrollViewer.BackgroundColor = Color.Gold\n        scrollViewer.Opacity = 0.7\n        scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto\n        scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible\n        scrollViewer.Height = 100\n\n        grid = Grid(10, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        scrollViewer.Content = grid\n\n        for iRow in range(10):\n            textBlock = TextBlock()\n            textBlock.Text = \"Text\"\n            textBlock.Margin = Thickness(5)\n            textBlock.ForegroundColor = Color.Black\n            textBlock.FontWeight = FontWeight.ExtraBold\n\n            grid.AddChild(textBlock, iRow, 0)\n\n            button = Button()\n            button.Text = \"Button\"\n            button.Margin = Thickness(5)\n            button.ForegroundColor = Color.Black\n            button.FontWeight = FontWeight.ExtraBold\n\n            grid.AddChild(button, iRow, 1)\n\n        api.Chart.AddControl(scrollViewer)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ScrollViewer.#ctor","kind":"constructor","name":"ScrollViewer","type":"T:cAlgo.API.ScrollViewer","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public ScrollViewer()","python":"ScrollViewer()","summary":"Initializes a new instance of the Scroll viewer class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nforeach (var position in Positions)\n    panel.AddChild(new TextBlock { Text = position.SymbolName + \" \" + position.NetProfit });\nvar scrollViewer = new ScrollViewer { Content = panel, Height = 150 };\nChart.AddControl(scrollViewer);","python":"panel = StackPanel()\nfor position in api.Positions:\n    row = TextBlock()\n    row.Text = f\"{position.SymbolName} {position.NetProfit}\"\n    panel.AddChild(row)\nscrollViewer = ScrollViewer()\nscrollViewer.Content = panel\nscrollViewer.Height = 150\napi.Chart.AddControl(scrollViewer)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ScrollViewer.Content","kind":"property","name":"Content","type":"T:cAlgo.API.ScrollViewer","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public ControlBase Content {get; set;}","python":"scrollViewer.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var grid = new Grid(30, 2);\nfor (var i = 0; i < 30; i++)\n    grid.AddChild(new TextBlock { Text = Bars.ClosePrices.Last(i).ToString() }, i, 0);\nvar scrollViewer = new ScrollViewer { Height = 200 };\nscrollViewer.Content = grid;\nChart.AddControl(scrollViewer);","python":"grid = Grid(30, 2)\nfor i in range(30):\n    textBlock = TextBlock()\n    textBlock.Text = str(api.Bars.ClosePrices.Last(i))\n    grid.AddChild(textBlock, i, 0)\nscrollViewer = ScrollViewer()\nscrollViewer.Height = 200\nscrollViewer.Content = grid\napi.Chart.AddControl(scrollViewer)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ScrollViewer.HorizontalScrollBarVisibility","kind":"property","name":"HorizontalScrollBarVisibility","type":"T:cAlgo.API.ScrollViewer","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public ScrollBarVisibility HorizontalScrollBarVisibility {get; set;}","python":"scrollViewer.HorizontalScrollBarVisibility: ScrollBarVisibility","summary":"Defines the horizontal scroll bar visibility.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { Orientation = Orientation.Horizontal };\nfor (var i = 1; i <= 20; i++)\n    panel.AddChild(new Button { Text = \"Level \" + i });\nvar scrollViewer = new ScrollViewer { Content = panel, Width = 250, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto };\nChart.AddControl(scrollViewer);","python":"panel = StackPanel()\npanel.Orientation = Orientation.Horizontal\nfor i in range(1, 21):\n    button = Button()\n    button.Text = f\"Level {i}\"\n    panel.AddChild(button)\nscrollViewer = ScrollViewer()\nscrollViewer.Content = panel\nscrollViewer.Width = 250\nscrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto\napi.Chart.AddControl(scrollViewer)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/HorizontalScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/HorizontalScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ScrollViewer.VerticalScrollBarVisibility","kind":"property","name":"VerticalScrollBarVisibility","type":"T:cAlgo.API.ScrollViewer","namespace":"cAlgo.API","group":"ScrollViewer","csharp":"public ScrollBarVisibility VerticalScrollBarVisibility {get; set;}","python":"scrollViewer.VerticalScrollBarVisibility: ScrollBarVisibility","summary":"Defines the vertical scroll bar visibility.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel();\nfor (var i = 1; i <= 50; i++)\n    panel.AddChild(new TextBlock { Text = \"Row \" + i });\nvar scrollViewer = new ScrollViewer { Content = panel, Height = 120, VerticalScrollBarVisibility = ScrollBarVisibility.Auto };\nChart.AddControl(scrollViewer);","python":"panel = StackPanel()\nfor i in range(1, 51):\n    row = TextBlock()\n    row.Text = f\"Row {i}\"\n    panel.AddChild(row)\nscrollViewer = ScrollViewer()\nscrollViewer.Content = panel\nscrollViewer.Height = 120\nscrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto\napi.Chart.AddControl(scrollViewer)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/VerticalScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/ScrollViewer/ScrollViewer/VerticalScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Shape","kind":"class","name":"Shape","type":null,"namespace":"cAlgo.API","group":"Shapes","csharp":"public abstract class Shape : ControlBase","python":"Shape","summary":"Provides the base class for shape elements, such as Ellipse, Polygon, and Rectangle.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var canvas = new Canvas { Width = 300, Height = 120 };\nvar shapes = new Shape[]\n{\n    new Rectangle { Width = 80, Height = 40, Left = 10, Top = 10, FillColor = Color.SteelBlue },\n    new Ellipse { Width = 40, Height = 40, Left = 110, Top = 10, FillColor = Color.Orange },\n    new Line { X1 = 170, Y1 = 30, X2 = 280, Y2 = 30, StrokeColor = Color.White }\n};\nforeach (var shape in shapes)\n{\n    shape.StrokeThickness = 2;\n    canvas.AddChild(shape);\n}\nChart.AddControl(canvas);","python":"canvas = Canvas()\ncanvas.Width = 300\ncanvas.Height = 120\nrectangle = Rectangle()\nrectangle.Width = 80\nrectangle.Height = 40\nrectangle.FillColor = Color.SteelBlue\nellipse = Ellipse()\nellipse.Width = 40\nellipse.Height = 40\nellipse.Left = 110\nellipse.FillColor = Color.Orange\nfor shape in [rectangle, ellipse]:\n    shape.StrokeThickness = 2\n    canvas.AddChild(shape)\napi.Chart.AddControl(canvas)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.FillColor","kind":"property","name":"FillColor","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public Color FillColor {get; set;}","python":"shape.FillColor: Color","summary":"Gets or sets the fill color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = new Rectangle { Width = 120, Height = 40 };\nrectangle.FillColor = Symbol.Bid > Bars.OpenPrices.LastValue ? Color.Green : Color.Red;\nChart.AddControl(rectangle);","python":"rectangle = Rectangle()\nrectangle.Width = 120\nrectangle.Height = 40\nrectangle.FillColor = Color.Green if api.Symbol.Bid > api.Bars.OpenPrices.LastValue else Color.Red\napi.Chart.AddControl(rectangle)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/FillColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/FillColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.Stretch","kind":"property","name":"Stretch","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public Stretch Stretch {get; set;}","python":"shape.Stretch: Stretch","summary":"Gets or sets the stretch value.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polygon = new Polygon { Width = 200, Height = 100, FillColor = Color.Purple, Stretch = Stretch.Uniform };\npolygon.Points = new[] { new Point(0, 10), new Point(10, 0), new Point(20, 10) };\nChart.AddControl(polygon);","python":"polygon = Polygon()\npolygon.Width = 200\npolygon.Height = 100\npolygon.FillColor = Color.Purple\npolygon.Stretch = Stretch.Uniform\npolygon.Points = [Point(0, 10), Point(10, 0), Point(20, 10)]\napi.Chart.AddControl(polygon)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeColor","kind":"property","name":"StrokeColor","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public Color StrokeColor {get; set;}","python":"shape.StrokeColor: Color","summary":"Gets or sets the stroke color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ellipse = new Ellipse { Width = 60, Height = 60, StrokeColor = Color.Red, StrokeThickness = 3 };\nChart.AddControl(ellipse);\nPrint(\"Stroke color: {0}\", ellipse.StrokeColor);","python":"ellipse = Ellipse()\nellipse.Width = 60\nellipse.Height = 60\nellipse.StrokeColor = Color.Red\nellipse.StrokeThickness = 3\napi.Chart.AddControl(ellipse)\napi.Print(f\"Stroke color: {ellipse.StrokeColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeDashArray","kind":"property","name":"StrokeDashArray","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public double[] StrokeDashArray {get; set;}","python":"shape.StrokeDashArray: list[float]","summary":"Gets or sets a collection of Double values that indicate the pattern of dashes and gaps that is used to outline shapes.","remarks":null,"parameters":[],"returns":{"csharpType":"double[]","pythonType":"list[float]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 0, Y1 = 20, X2 = 300, Y2 = 20, StrokeColor = Color.Gray, StrokeThickness = 2 };\nline.StrokeDashArray = new double[] { 4, 2 };\nChart.AddControl(line);","python":"line = Line()\nline.Y1 = 20\nline.X2 = 300\nline.Y2 = 20\nline.StrokeColor = Color.Gray\nline.StrokeThickness = 2\nline.StrokeDashArray = [4.0, 2.0]\napi.Chart.AddControl(line)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashArray/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashArray/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeDashCap","kind":"property","name":"StrokeDashCap","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public PenLineCap StrokeDashCap {get; set;}","python":"shape.StrokeDashCap: PenLineCap","summary":"Gets or sets a PenLineCap enumeration value that specifies how the ends of a dash are drawn.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 0, Y1 = 20, X2 = 300, Y2 = 20, StrokeColor = Color.Gray, StrokeThickness = 4 };\nline.StrokeDashArray = new double[] { 2, 2 };\nline.StrokeDashCap = PenLineCap.Round;\nChart.AddControl(line);","python":"line = Line()\nline.Y1 = 20\nline.X2 = 300\nline.Y2 = 20\nline.StrokeColor = Color.Gray\nline.StrokeThickness = 4\nline.StrokeDashArray = [2.0, 2.0]\nline.StrokeDashCap = PenLineCap.Round\napi.Chart.AddControl(line)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeDashOffset","kind":"property","name":"StrokeDashOffset","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public double StrokeDashOffset {get; set;}","python":"shape.StrokeDashOffset: float","summary":"Gets or sets a Double that specifies the distance within the dash pattern where a dash begins.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rectangle = new Rectangle { Width = 150, Height = 60, StrokeColor = Color.White, StrokeThickness = 2 };\nrectangle.StrokeDashArray = new double[] { 3, 3 };\nrectangle.StrokeDashOffset = 1.5;\nChart.AddControl(rectangle);","python":"rectangle = Rectangle()\nrectangle.Width = 150\nrectangle.Height = 60\nrectangle.StrokeColor = Color.White\nrectangle.StrokeThickness = 2\nrectangle.StrokeDashArray = [3.0, 3.0]\nrectangle.StrokeDashOffset = 1.5\napi.Chart.AddControl(rectangle)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashOffset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeDashOffset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeEndLineCap","kind":"property","name":"StrokeEndLineCap","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public PenLineCap StrokeEndLineCap {get; set;}","python":"shape.StrokeEndLineCap: PenLineCap","summary":"Gets or sets the shape at the end of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 10, Y1 = 10, X2 = 200, Y2 = 10, StrokeColor = Color.White, StrokeThickness = 6, StrokeEndLineCap = PenLineCap.Triangle };\nChart.AddControl(line);","python":"line = Line()\nline.X1 = 10\nline.Y1 = 10\nline.X2 = 200\nline.Y2 = 10\nline.StrokeColor = Color.White\nline.StrokeThickness = 6\nline.StrokeEndLineCap = PenLineCap.Triangle\napi.Chart.AddControl(line)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeEndLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeEndLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeLineJoin","kind":"property","name":"StrokeLineJoin","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public PenLineJoin StrokeLineJoin {get; set;}","python":"shape.StrokeLineJoin: PenLineJoin","summary":"Gets or sets the shape that joins two lines.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineJoin","pythonType":"PenLineJoin","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polyline = new Polyline { StrokeColor = Color.Orange, StrokeThickness = 8, StrokeLineJoin = PenLineJoin.Round };\npolyline.Points = new[] { new Point(0, 60), new Point(40, 0), new Point(80, 60) };\nChart.AddControl(polyline);","python":"polyline = Polyline()\npolyline.StrokeColor = Color.Orange\npolyline.StrokeThickness = 8\npolyline.StrokeLineJoin = PenLineJoin.Round\npolyline.Points = [Point(0, 60), Point(40, 0), Point(80, 60)]\napi.Chart.AddControl(polyline)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeLineJoin/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeLineJoin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeMiterLimit","kind":"property","name":"StrokeMiterLimit","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public double StrokeMiterLimit {get; set;}","python":"shape.StrokeMiterLimit: float","summary":"Gets or sets a limit on the ratio of the miter length to half the StrokeThickness of a Shape element.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var polyline = new Polyline { StrokeColor = Color.Orange, StrokeThickness = 8, StrokeLineJoin = PenLineJoin.Miter, StrokeMiterLimit = 2 };\npolyline.Points = new[] { new Point(0, 60), new Point(10, 0), new Point(20, 60) };\nChart.AddControl(polyline);","python":"polyline = Polyline()\npolyline.StrokeColor = Color.Orange\npolyline.StrokeThickness = 8\npolyline.StrokeLineJoin = PenLineJoin.Miter\npolyline.StrokeMiterLimit = 2\npolyline.Points = [Point(0, 60), Point(10, 0), Point(20, 60)]\napi.Chart.AddControl(polyline)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeMiterLimit/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeMiterLimit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeStartLineCap","kind":"property","name":"StrokeStartLineCap","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public PenLineCap StrokeStartLineCap {get; set;}","python":"shape.StrokeStartLineCap: PenLineCap","summary":"Gets or sets the shape at the beginning of a line.","remarks":null,"parameters":[],"returns":{"csharpType":"PenLineCap","pythonType":"PenLineCap","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 10, Y1 = 10, X2 = 200, Y2 = 10, StrokeColor = Color.White, StrokeThickness = 6, StrokeStartLineCap = PenLineCap.Round };\nChart.AddControl(line);","python":"line = Line()\nline.X1 = 10\nline.Y1 = 10\nline.X2 = 200\nline.Y2 = 10\nline.StrokeColor = Color.White\nline.StrokeThickness = 6\nline.StrokeStartLineCap = PenLineCap.Round\napi.Chart.AddControl(line)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeStartLineCap/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeStartLineCap/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.Shape.StrokeThickness","kind":"property","name":"StrokeThickness","type":"T:cAlgo.API.Shape","namespace":"cAlgo.API","group":"Shapes","csharp":"public double StrokeThickness {get; set;}","python":"shape.StrokeThickness: float","summary":"Gets or sets the stroke thickness.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var line = new Line { X1 = 0, Y1 = 0, X2 = 200, Y2 = 0, StrokeColor = Color.Yellow, StrokeThickness = 4 };\nChart.AddControl(line);\nPrint(\"Stroke thickness: {0}\", line.StrokeThickness);","python":"line = Line()\nline.X2 = 200\nline.StrokeColor = Color.Yellow\nline.StrokeThickness = 4\napi.Chart.AddControl(line)\napi.Print(f\"Stroke thickness: {line.StrokeThickness}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/StrokeThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.SimpleMovingAverage","kind":"interface","name":"SimpleMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface SimpleMovingAverage","python":"SimpleMovingAverage","summary":"The simple moving average is an average of price within n previous periods.","remarks":"The simple moving average is the unweighted mean of the previous n price data, where n is the period used for the calculation and price data the price data source, e.g. The closing price.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class SimpleMovingAverageExample : Indicator\n{\n    private SimpleMovingAverage _simpleMovingAverage;\n\n    protected override void Initialize()\n    {\n        _simpleMovingAverage = Indicators.SimpleMovingAverage(Source, Periods);\n    }\n\n    public override void Calculate(int index)\n    {\n        var average = _simpleMovingAverage.Result[index];\n\n        double sum = 0;\n\n        for (var period = 0; period < Periods; period++)\n        {\n            sum += Math.Pow(Source[index - period] - average, 2.0);\n        }\n\n        Result[index] = Math.Sqrt(sum / Periods);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Source, api.Periods)\n\n    def calculate(self, index):\n        average = self.simpleMovingAverage.Result[index]\n        sumResult = 0\n\n        for period in range(api.Periods):\n            sumResult += pow(api.Source[index - period] - average, 2.0)\n        api.Result[index] = math.sqrt(sumResult / api.Periods)","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    },\n    {\n      \"Name\": \"Periods\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14,\n      \"MinValue\": 2\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"Color\": \"Orange\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Simple Moving Average indicator\n    public partial class SimpleMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private SimpleMovingAverage _fastSimpleMovingAverage;\n\n        private SimpleMovingAverage _slowSimpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastSimpleMovingAverage = Indicators.SimpleMovingAverage(FastMaSource, FastMaPeriod);\n            _slowSimpleMovingAverage = Indicators.SimpleMovingAverage(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastSimpleMovingAverage.Result.HasCrossedAbove(_slowSimpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastSimpleMovingAverage.Result.HasCrossedBelow(_slowSimpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass SimpleMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastSimpleMovingAverage = api.Indicators.SimpleMovingAverage(api.FastMaSource, api.FastMaPeriod)\n        self.slowSimpleMovingAverage = api.Indicators.SimpleMovingAverage(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastSimpleMovingAverage.Result, self.slowSimpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastSimpleMovingAverage.Result, self.slowSimpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/SimpleMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/SimpleMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SoundType","kind":"enum","name":"SoundType","type":null,"namespace":"cAlgo.API","group":"Notifications","csharp":"public enum SoundType","python":"SoundType","summary":"An enum containing various constants representing different built-in sounds for notifications.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);\nNotifications.PlaySound(result.IsSuccessful ? SoundType.PositiveNotification : SoundType.NegativeNotification);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)\napi.Notifications.PlaySound(SoundType.PositiveNotification if result.IsSuccessful else SoundType.NegativeNotification)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SoundType.PositiveNotification","kind":"enum value","name":"PositiveNotification","type":"T:cAlgo.API.SoundType","namespace":"cAlgo.API","group":"Notifications","csharp":"SoundType.PositiveNotification;","python":"SoundType.PositiveNotification","summary":"Positive Notification sound.","remarks":null,"parameters":[],"returns":{"csharpType":"SoundType","pythonType":"SoundType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SoundType.NegativeNotification","kind":"enum value","name":"NegativeNotification","type":"T:cAlgo.API.SoundType","namespace":"cAlgo.API","group":"Notifications","csharp":"SoundType.NegativeNotification;","python":"SoundType.NegativeNotification","summary":"Negative Notification sound.","remarks":null,"parameters":[],"returns":{"csharpType":"SoundType","pythonType":"SoundType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SoundType.Announcement","kind":"enum value","name":"Announcement","type":"T:cAlgo.API.SoundType","namespace":"cAlgo.API","group":"Notifications","csharp":"SoundType.Announcement;","python":"SoundType.Announcement","summary":"Announcement sound.","remarks":null,"parameters":[],"returns":{"csharpType":"SoundType","pythonType":"SoundType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SoundType.Doorbell","kind":"enum value","name":"Doorbell","type":"T:cAlgo.API.SoundType","namespace":"cAlgo.API","group":"Notifications","csharp":"SoundType.Doorbell;","python":"SoundType.Doorbell","summary":"Door bell sound.","remarks":null,"parameters":[],"returns":{"csharpType":"SoundType","pythonType":"SoundType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SoundType.Confirmation","kind":"enum value","name":"Confirmation","type":"T:cAlgo.API.SoundType","namespace":"cAlgo.API","group":"Notifications","csharp":"SoundType.Confirmation;","python":"SoundType.Confirmation","summary":"Confirmation sound.","remarks":null,"parameters":[],"returns":{"csharpType":"SoundType","pythonType":"SoundType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Notifications/SoundType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StackPanel","kind":"class","name":"StackPanel","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public class StackPanel : Panel","python":"StackPanel","summary":"Arranges the child element into a single line that can be oriented horizontally or vertically.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the StackPanel\n    public partial class StackPanelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Orientation = PanelOrientation\n            };\n\n            for (int i = 0; i < 10; i++)\n            {\n                stackPanel.AddChild(new TextBlock\n                {\n                    Text = \"Text\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                });\n            }\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Orientation = api.PanelOrientation\n\n        for i in range(10):\n            textBlock = TextBlock()\n            textBlock.Text = \"Text\"\n            textBlock.Margin = Thickness(5)\n            textBlock.ForegroundColor = Color.Black\n            textBlock.FontWeight = FontWeight.ExtraBold\n\n            stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"PanelOrientation\",\n      \"DisplayName\": \"Panel Orientation\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.Orientation\",\n      \"DefaultValue\": \"Vertical\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.StackPanel.#ctor","kind":"constructor","name":"StackPanel","type":"T:cAlgo.API.StackPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public StackPanel()","python":"StackPanel()","summary":"Initializes a new instance of the StackPanel class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Margin = 10 };\npanel.AddChild(new TextBlock { Text = \"Balance: \" + Account.Balance });\npanel.AddChild(new TextBlock { Text = \"Equity: \" + Account.Equity });\nChart.AddControl(panel);","python":"panel = StackPanel()\npanel.HorizontalAlignment = HorizontalAlignment.Left\npanel.VerticalAlignment = VerticalAlignment.Top\nbalance = TextBlock()\nbalance.Text = f\"Balance: {api.Account.Balance}\"\nequity = TextBlock()\nequity.Text = f\"Equity: {api.Account.Equity}\"\npanel.AddChild(balance)\npanel.AddChild(equity)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.StackPanel.Orientation","kind":"property","name":"Orientation","type":"T:cAlgo.API.StackPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public Orientation Orientation {get; set;}","python":"stackPanel.Orientation: Orientation","summary":"Gets or sets the StackPanel orientation.","remarks":null,"parameters":[],"returns":{"csharpType":"Orientation","pythonType":"Orientation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { Orientation = Orientation.Horizontal, VerticalAlignment = VerticalAlignment.Bottom };\npanel.AddChild(new Button { Text = \"Buy\", Margin = 2 });\npanel.AddChild(new Button { Text = \"Sell\", Margin = 2 });\nChart.AddControl(panel);","python":"panel = StackPanel()\npanel.Orientation = Orientation.Horizontal\npanel.VerticalAlignment = VerticalAlignment.Bottom\nfor text in [\"Buy\", \"Sell\"]:\n    button = Button()\n    button.Text = text\n    panel.AddChild(button)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/Orientation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/StackPanel/Orientation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.Indicators.StandardDeviation","kind":"interface","name":"StandardDeviation","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface StandardDeviation","python":"StandardDeviation","summary":"Standard Deviation measures the market volatility with a commonly used statisctical function.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private StandardDeviation _standardDeviation;\nprotected override void Initialize()\n{\n    _standardDeviation = Indicators.StandardDeviation(Bars.ClosePrices, 14, MovingAverageType.Simple);\n}\npublic override void Calculate(int index)\n{\n    double result = _standardDeviation.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        self.standardDeviation = api.Indicators.StandardDeviation(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        result = self.standardDeviation.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing System;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Standard Deviation indicator\n    public partial class StandardDeviationSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private StandardDeviation _standardDeviation;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _standardDeviation = Indicators.StandardDeviation(Bars.ClosePrices, 20, MovingAverageType.Simple);\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteOrder(TradeType.Buy);\n            }\n            else if (Bars.ClosePrices.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteOrder(TradeType.Sell);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n\n        private void ExecuteOrder(TradeType tradeType)\n        {\n            var standardDeviationInPips = _standardDeviation.Result.Last(1) * (Symbol.TickSize / Symbol.PipSize * Math.Pow(10, Symbol.Digits));\n\n            var stopLossInPips = standardDeviationInPips * 2;\n            var takeProfitInPips = stopLossInPips * 2;\n\n            ExecuteMarketOrder(tradeType, SymbolName, _volumeInUnits, Label, stopLossInPips, takeProfitInPips);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass StandardDeviationSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.standardDeviation = api.Indicators.StandardDeviation(api.Bars.ClosePrices, 20, MovingAverageType.Simple)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(api.Bars.ClosePrices, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            self.execute_order(TradeType.Buy)\n        elif Functions.HasCrossedBelow(api.Bars.ClosePrices, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            self.execute_order(TradeType.Sell)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)\n\n    def execute_order(self, tradeType):\n        standardDeviationInPips = self.standardDeviation.Result.Last(1) * (api.Symbol.TickSize / api.Symbol.PipSize * pow(10, api.Symbol.Digits))\n        stopLossInPips = standardDeviationInPips * 2\n        takeProfitInPips = stopLossInPips * 2\n        api.ExecuteMarketOrder(tradeType, api.SymbolName, self.volumeInUnits, api.Label, stopLossInPips, takeProfitInPips)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardDeviation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardDeviation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.StandardDeviation.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.StandardDeviation","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"standardDeviation.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Standard Deviation indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private StandardDeviation _standardDeviation;\nprotected override void Initialize()\n{\n    _standardDeviation = Indicators.StandardDeviation(Bars.ClosePrices, 14, MovingAverageType.Simple);\n}\npublic override void Calculate(int index)\n{\n    double result = _standardDeviation.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        self.standardDeviation = api.Indicators.StandardDeviation(api.Bars.ClosePrices, 14, MovingAverageType.Simple)\n\n    def calculate(self, index):\n        result = self.standardDeviation.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardDeviation/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardDeviation/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StandardIndicator","kind":"interface","name":"StandardIndicator","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public interface StandardIndicator","python":"StandardIndicator","summary":"Base type for standard indicators.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);\nPrint(\"RSI on {0} {1}: {2}\", rsi.Symbol.Name, rsi.TimeFrame, rsi.Result.LastValue);","python":"rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)\napi.Print(f\"RSI on {rsi.Symbol.Name} {rsi.TimeFrame}: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.StandardIndicator.AddToChart","kind":"method","name":"AddToChart","type":"T:cAlgo.API.StandardIndicator","namespace":"cAlgo.API","group":"General","csharp":"ChartIndicator AddToChart()","python":"standardIndicator.AddToChart() -> ChartIndicator","summary":"Adds current indicator to chart if not added yet.","remarks":"If Indicator with same parameter values already added then it will return existing indicator instance.","parameters":[],"returns":{"csharpType":"ChartIndicator","pythonType":"ChartIndicator","summary":"Chart Indicator","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);\nvar chartIndicator = sma.AddToChart();\nif (chartIndicator != null)\n    Print(\"Added {0} to the chart\", chartIndicator.Name);","python":"sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)\nchartIndicator = sma.AddToChart()\nif chartIndicator is not None:\n    api.Print(f\"Added {chartIndicator.Name} to the chart\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/AddToChart/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/AddToChart/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.StandardIndicator.Bars","kind":"property","name":"Bars","type":"T:cAlgo.API.StandardIndicator","namespace":"cAlgo.API","group":"General","csharp":"Bars Bars {get;}","python":"standardIndicator.Bars: Bars","summary":"Gets indicator Bars.","remarks":null,"parameters":[],"returns":{"csharpType":"Bars","pythonType":"Bars","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var atr = Indicators.AverageTrueRange(14, MovingAverageType.Simple);\nPrint(\"ATR is calculated on {0} bars, last bar open time {1}\", atr.Bars.Count, atr.Bars.LastBar.OpenTime);","python":"atr = api.Indicators.AverageTrueRange(14, MovingAverageType.Simple)\napi.Print(f\"ATR is calculated on {atr.Bars.Count} bars, last bar open time {atr.Bars.LastBar.OpenTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Bars/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Bars/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.StandardIndicator.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.StandardIndicator","namespace":"cAlgo.API","group":"General","csharp":"Symbol Symbol {get;}","python":"standardIndicator.Symbol: Symbol","summary":"Gets indicator Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var gbpBars = MarketData.GetBars(TimeFrame, \"GBPUSD\");\nvar rsi = Indicators.RelativeStrengthIndex(gbpBars.ClosePrices, 14);\nPrint(\"RSI symbol: {0}, value: {1}\", rsi.Symbol.Name, rsi.Result.LastValue);","python":"gbpBars = api.MarketData.GetBars(api.TimeFrame, \"GBPUSD\")\nrsi = api.Indicators.RelativeStrengthIndex(gbpBars.ClosePrices, 14)\napi.Print(f\"RSI symbol: {rsi.Symbol.Name}, value: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.StandardIndicator.TimeFrame","kind":"property","name":"TimeFrame","type":"T:cAlgo.API.StandardIndicator","namespace":"cAlgo.API","group":"General","csharp":"TimeFrame TimeFrame {get;}","python":"standardIndicator.TimeFrame: TimeFrame","summary":"Gets indicator TimeFrame.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar rsi = Indicators.RelativeStrengthIndex(dailyBars.ClosePrices, 14);\nPrint(\"RSI time frame: {0}, value: {1}\", rsi.TimeFrame, rsi.Result.LastValue);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\nrsi = api.Indicators.RelativeStrengthIndex(dailyBars.ClosePrices, 14)\napi.Print(f\"RSI time frame: {rsi.TimeFrame}, value: {rsi.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StandardSeriesType","kind":"enum","name":"StandardSeriesType","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public enum StandardSeriesType","python":"StandardSeriesType","summary":"An enumeration of the standard data series types of a bar.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.9","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo;\n\npublic partial class Test : Indicator\n{\n    protected override void Initialize()\n    {\n        var openPrices = Bars.GetSeries(StandardSeriesType.Open);\n        Print($\"Last Open Price is: {openPrices.LastValue}\");\n    }\n\n    public override void Calculate(int index)\n    {\n    }\n}","python":"class Test():\n    def initialize(self):\n        openPrices = api.Bars.GetSeries(StandardSeriesType.Open)\n        api.Print(f\"Last Open Price is: {openPrices.LastValue}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Open","kind":"enum value","name":"Open","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Open;","python":"StandardSeriesType.Open","summary":"Bar Open price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.High","kind":"enum value","name":"High","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.High;","python":"StandardSeriesType.High","summary":"Bar High price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Low","kind":"enum value","name":"Low","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Low;","python":"StandardSeriesType.Low","summary":"Bar Low price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Close","kind":"enum value","name":"Close","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Close;","python":"StandardSeriesType.Close","summary":"Bar close price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.TickVolume","kind":"enum value","name":"TickVolume","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.TickVolume;","python":"StandardSeriesType.TickVolume","summary":"Bar tick volume.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Median","kind":"enum value","name":"Median","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Median;","python":"StandardSeriesType.Median","summary":"Bar median price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Typical","kind":"enum value","name":"Typical","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Typical;","python":"StandardSeriesType.Typical","summary":"Bar typical price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Weighted","kind":"enum value","name":"Weighted","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Weighted;","python":"StandardSeriesType.Weighted","summary":"Bar weighted price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StandardSeriesType.Average","kind":"enum value","name":"Average","type":"T:cAlgo.API.StandardSeriesType","namespace":"cAlgo.API","group":"Indicators","csharp":"StandardSeriesType.Average;","python":"StandardSeriesType.Average","summary":"Bar average price.","remarks":null,"parameters":[],"returns":{"csharpType":"StandardSeriesType","pythonType":"StandardSeriesType","summary":"","nullable":false},"exceptions":[],"since":"5.9","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StandardSeriesType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StochasticCalculationType","kind":"enum","name":"StochasticCalculationType","type":null,"namespace":"cAlgo.API","group":"Indicators","csharp":"public enum StochasticCalculationType","python":"StochasticCalculationType","summary":"An enumeration of the different Stochastic Oscillator indicator calculation types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lowHigh = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh);\nvar closeClose = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose);\nPrint(\"%K low/high: {0}, %K close/close: {1}\", lowHigh.PercentK.LastValue, closeClose.PercentK.LastValue);","python":"lowHigh = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh)\ncloseClose = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose)\napi.Print(f\"%K low/high: {lowHigh.PercentK.LastValue}, %K close/close: {closeClose.PercentK.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StochasticCalculationType.LowHigh","kind":"enum value","name":"LowHigh","type":"T:cAlgo.API.StochasticCalculationType","namespace":"cAlgo.API","group":"Indicators","csharp":"StochasticCalculationType.LowHigh;","python":"StochasticCalculationType.LowHigh","summary":"Uses lowest low and highest high (default).","remarks":null,"parameters":[],"returns":{"csharpType":"StochasticCalculationType","pythonType":"StochasticCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StochasticCalculationType.CloseClose","kind":"enum value","name":"CloseClose","type":"T:cAlgo.API.StochasticCalculationType","namespace":"cAlgo.API","group":"Indicators","csharp":"StochasticCalculationType.CloseClose;","python":"StochasticCalculationType.CloseClose","summary":"Uses lowest close and highest close.","remarks":null,"parameters":[],"returns":{"csharpType":"StochasticCalculationType","pythonType":"StochasticCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.StochasticOscillator","kind":"interface","name":"StochasticOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface StochasticOscillator","python":"StochasticOscillator","summary":"The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.","remarks":"Calculates the range between the high and low price during a given period of time. The current price is then expressed as a percentage of this range with 0% indicating the bottom of the range and 100% indicating the top of the range over this time period. Based on the theory that prices tend to close near the boundaries of the recent range.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private StochasticOscillator _stochastic;\nprotected override void Initialize()\n{\n    // Initialize the Stochastic Oscillator indicator\n     _stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        # Initialize the Stochastic Oscillator indicator\n        self.stochasticOscillator = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Stochastic Oscillator indicator\n    public partial class StochasticOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private StochasticOscillator _stochasticOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _stochasticOscillator = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\n        }\n\n        protected override void OnBar()\n        {\n            if (_stochasticOscillator.PercentK.HasCrossedAbove(_stochasticOscillator.PercentD, 0) && _stochasticOscillator.PercentK.Last(1) <= 20)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_stochasticOscillator.PercentK.HasCrossedBelow(_stochasticOscillator.PercentD, 0) && _stochasticOscillator.PercentK.Last(1) >= 80)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass StochasticOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.stochasticOscillator = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.stochasticOscillator.PercentK, self.stochasticOscillator.PercentD, 0) and self.stochasticOscillator.PercentK.Last(1) <= 20:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.stochasticOscillator.PercentK, self.stochasticOscillator.PercentD, 0) and self.stochasticOscillator.PercentK.Last(1) >= 80:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.StochasticOscillator.PercentD","kind":"property","name":"PercentD","type":"T:cAlgo.API.Indicators.StochasticOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries PercentD {get;}","python":"stochasticOscillator.PercentD: IndicatorDataSeries","summary":"%D is 3 Period Exponential Moving Average of %K.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\nPrint(\"%D: {0}\", stochastic.PercentD.Last(1));","python":"stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)\napi.Print(f\"%D: {stochastic.PercentD.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/PercentD/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/PercentD/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.StochasticOscillator.PercentK","kind":"property","name":"PercentK","type":"T:cAlgo.API.Indicators.StochasticOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries PercentK {get;}","python":"stochasticOscillator.PercentK: IndicatorDataSeries","summary":"Calculation of %K is 100 multiplied by the ratio of the closing price minus the lowest price over the last N periods over the highest price over the last N minus the lowest price over the last N periods.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);\nif (stochastic.PercentK.Last(1) > stochastic.PercentD.Last(1) && stochastic.PercentK.Last(1) < 20)\n    Print(\"%K is above %D in the oversold zone: {0}\", stochastic.PercentK.Last(1));","python":"stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)\nif stochastic.PercentK.Last(1) > stochastic.PercentD.Last(1) and stochastic.PercentK.Last(1) < 20:\n    api.Print(f\"%K is above %D in the oversold zone: {stochastic.PercentK.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/PercentK/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/PercentK/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.StochasticOscillator.PersentsD","kind":"property","name":"PersentsD","type":"T:cAlgo.API.Indicators.StochasticOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries PersentsD {get;}","python":"stochasticOscillator.PersentsD: IndicatorDataSeries","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use PercentD property instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.StochasticOscillator.PersentsK","kind":"property","name":"PersentsK","type":"T:cAlgo.API.Indicators.StochasticOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries PersentsK {get;}","python":"stochasticOscillator.PersentsK: IndicatorDataSeries","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use PercentK property instead.","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/StochasticOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StopLossBreakEven","kind":"record","name":"StopLossBreakEven","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public class StopLossBreakEven","python":"StopLossBreakEven","summary":"Represents a break-even rule that moves the stop loss to the entry price (optionally offset by a number of pips) once the trade has moved a configured trigger distance in favor of the position.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var breakEven = new StopLossBreakEven(15, 2);\nvar takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));\nvar result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\", new RelativeStopLossProtection(20), takeProfits, breakEven);\nPrint(\"Stop loss moves to entry + {0} pips after {1} pips: {2}\", breakEven.Offset, breakEven.TriggerDistance, result.IsSuccessful);","python":"breakEven = StopLossBreakEven(15, 2)\ntakeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))\nresult = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", RelativeStopLossProtection(20), takeProfits, breakEven)\napi.Print(f\"Stop loss moves to entry + {breakEven.Offset} pips after {breakEven.TriggerDistance} pips: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.StopLossBreakEven.#ctor(System.Double,System.Double)","kind":"constructor","name":"StopLossBreakEven","type":"T:cAlgo.API.StopLossBreakEven","namespace":"cAlgo.API","group":"Trading","csharp":"public StopLossBreakEven(double triggerDistance, double offset)","python":"StopLossBreakEven(triggerDistance: float, offset: float)","summary":"Initializes a new instance of the StopLossBreakEven record.","remarks":null,"parameters":[{"name":"triggerDistance","csharpType":"double","pythonType":"float","summary":"The distance in pips that activates the break-even rule. Must be greater than 10 pips."},{"name":"offset","csharpType":"double","pythonType":"float","summary":"The offset in pips applied to the entry price when the stop loss is moved."}],"returns":null,"exceptions":[{"type":"ArgumentException","summary":"Thrown when triggerDistance is less than or equal to 10 pips."}],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null)\n{\n    var result = position.ModifyStopLossBreakEven(new StopLossBreakEven(20, 1));\n    Print(\"Break-even rule set: {0}\", result.IsSuccessful);\n}","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None:\n    result = position.ModifyStopLossBreakEven(StopLossBreakEven(20, 1))\n    api.Print(f\"Break-even rule set: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.StopLossBreakEven.#ctor(cAlgo.API.StopLossBreakEven)","kind":"constructor","name":"StopLossBreakEven","type":"T:cAlgo.API.StopLossBreakEven","namespace":"cAlgo.API","group":"Trading","csharp":"public StopLossBreakEven(StopLossBreakEven original)","python":"StopLossBreakEven(original: StopLossBreakEven)","summary":"","remarks":null,"parameters":[{"name":"original","csharpType":"StopLossBreakEven","pythonType":"StopLossBreakEven","summary":""}],"returns":null,"exceptions":[],"since":"5.8","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.StopLossBreakEven.Offset","kind":"property","name":"Offset","type":"T:cAlgo.API.StopLossBreakEven","namespace":"cAlgo.API","group":"Trading","csharp":"public double Offset {get;}","python":"stopLossBreakEven.Offset: float","summary":"The offset in pips applied to the entry price when the stop loss is moved.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.StopLossBreakEven != null)\n    Print(\"Stop loss moves to entry + {0} pips\", position.StopLossBreakEven.Offset);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.StopLossBreakEven is not None:\n    api.Print(f\"Stop loss moves to entry + {position.StopLossBreakEven.Offset} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Offset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Offset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.StopLossBreakEven.TriggerDistance","kind":"property","name":"TriggerDistance","type":"T:cAlgo.API.StopLossBreakEven","namespace":"cAlgo.API","group":"Trading","csharp":"public double TriggerDistance {get;}","python":"stopLossBreakEven.TriggerDistance: float","summary":"The distance in pips that activates the break-even rule.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.8","deprecated":null,"examples":[{"csharp":"var position = Positions.Find(\"myLabel\");\nif (position != null && position.StopLossBreakEven != null)\n    Print(\"Break-even activates after {0} pips\", position.StopLossBreakEven.TriggerDistance);","python":"position = api.Positions.Find(\"myLabel\")\nif position is not None and position.StopLossBreakEven is not None:\n    api.Print(f\"Break-even activates after {position.StopLossBreakEven.TriggerDistance} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/TriggerDistance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/TriggerDistance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StopTriggerMethod","kind":"enum","name":"StopTriggerMethod","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public enum StopTriggerMethod","python":"StopTriggerMethod","summary":"The trigger side for the Stop Orders.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // This sample shows how to use StopTriggerMethod of orders to control their execution price\n    public partial class StopTriggerMethodSample : Robot\n    {\n        protected override void OnStart()\n        {\n            // Market order whose stop loss uses the selected trigger method\n            ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, \"StopTriggerMethod Test\", 10, 10, string.Empty, false, StopTriggerMethod);\n\n            // Stop order whose entry and stop loss both use the selected trigger method\n            var target = Symbol.Bid + 100 * Symbol.PipSize;\n            PlaceStopOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, target, \"StopTriggerMethod Test\", 10, 10, ProtectionType.Relative, null, string.Empty, false, StopTriggerMethod, StopTriggerMethod);\n\n            foreach (var position in Positions)\n                Print(\"Position {0} stop loss trigger method: {1}\", position.Id, position.StopLossTriggerMethod);\n        }\n    }\n}","python":"def on_start(self):\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, \"StopTriggerMethod Test\", 10, 10, \"\", False, api.StopTriggerMethod)\n\n    target = api.Symbol.Bid + 100 * api.Symbol.PipSize\n    api.PlaceStopOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, target, \"StopTriggerMethod Test\", 10, 10, ProtectionType.Relative, None, \"\", False, api.StopTriggerMethod, api.StopTriggerMethod)\n\n    for position in api.Positions:\n        api.Print(f\"Position {position.Id} stop loss trigger method: {position.StopLossTriggerMethod}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"StopTriggerMethod\",\n      \"DisplayName\": \"Stop Trigger Method\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.StopTriggerMethod\",\n      \"DefaultValue\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StopTriggerMethod.Trade","kind":"enum value","name":"Trade","type":"T:cAlgo.API.StopTriggerMethod","namespace":"cAlgo.API","group":"Trading","csharp":"StopTriggerMethod.Trade;","python":"StopTriggerMethod.Trade","summary":"Trade method uses default trigger behavior for Stop orders. Buy order and Stop Loss for Sell position will be triggered when Ask >= order price. Sell order and Stop Loss for Buy position will be triggered when Bid <= order price.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StopTriggerMethod.Opposite","kind":"enum value","name":"Opposite","type":"T:cAlgo.API.StopTriggerMethod","namespace":"cAlgo.API","group":"Trading","csharp":"StopTriggerMethod.Opposite;","python":"StopTriggerMethod.Opposite","summary":"Opposite method uses opposite price for order triggering. Buy order and Stop Loss for Sell position will be triggered when Bid >= order price. Sell order and Stop Loss for Buy position will be triggered when Ask <= order price.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StopTriggerMethod.DoubleTrade","kind":"enum value","name":"DoubleTrade","type":"T:cAlgo.API.StopTriggerMethod","namespace":"cAlgo.API","group":"Trading","csharp":"StopTriggerMethod.DoubleTrade;","python":"StopTriggerMethod.DoubleTrade","summary":"Uses default prices for order triggering, but waits for additional confirmation - two consecutive prices should meet criteria to trigger order. Buy order and Stop Loss for Sell position will be triggered when two consecutive Ask prices >= order price. Sell order and Stop Loss for Buy position will be triggered when two consecutive Bid prices <= order price.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StopTriggerMethod.DoubleOpposite","kind":"enum value","name":"DoubleOpposite","type":"T:cAlgo.API.StopTriggerMethod","namespace":"cAlgo.API","group":"Trading","csharp":"StopTriggerMethod.DoubleOpposite;","python":"StopTriggerMethod.DoubleOpposite","summary":"Uses opposite prices for order triggering, and waits for additional confirmation - two consecutive prices should meet criteria to trigger order. Buy order and Stop Loss for Sell position will be triggered when two consecutive Bid prices >= order price. Sell order and Stop Loss for Buy position will be triggered when two consecutive Ask prices <= order price.","remarks":null,"parameters":[],"returns":{"csharpType":"StopTriggerMethod","pythonType":"StopTriggerMethod","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/StopTriggerMethod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Stretch","kind":"enum","name":"Stretch","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum Stretch","python":"Stretch","summary":"Describes how content is resized to fill its allocated space.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use shapes stretch property\n    public partial class StretchSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var rectangle = new Rectangle\n            {\n                Stretch = Stretch,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Height = 100,\n                Width = 200,\n                FillColor = Color.Blue,\n                StrokeColor = Color.Red,\n                Opacity = 0.7,\n            };\n\n            Chart.AddControl(rectangle);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        rectangle = Rectangle()\n        rectangle.Stretch = api.Stretch\n        rectangle.HorizontalAlignment = HorizontalAlignment.Center\n        rectangle.VerticalAlignment = VerticalAlignment.Center\n        rectangle.Height = 100\n        rectangle.Width = 200\n        rectangle.FillColor = Color.Blue\n        rectangle.StrokeColor = Color.Red\n        rectangle.Opacity = 0.7\n\n        api.Chart.AddControl(rectangle)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Stretch\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.Stretch\",\n      \"DefaultValue\": \"Uniform\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Stretch.None","kind":"enum value","name":"None","type":"T:cAlgo.API.Stretch","namespace":"cAlgo.API","group":"Controls","csharp":"Stretch.None;","python":"Stretch.None","summary":"The content preserves its original size.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Stretch.Fill","kind":"enum value","name":"Fill","type":"T:cAlgo.API.Stretch","namespace":"cAlgo.API","group":"Controls","csharp":"Stretch.Fill;","python":"Stretch.Fill","summary":"The content is resized to fill the destination dimensions. The aspect ratio is not preserved.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Stretch.Uniform","kind":"enum value","name":"Uniform","type":"T:cAlgo.API.Stretch","namespace":"cAlgo.API","group":"Controls","csharp":"Stretch.Uniform;","python":"Stretch.Uniform","summary":"The content is resized to fit in the destination dimensions while it preserves its native aspect ratio.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Stretch.UniformToFill","kind":"enum value","name":"UniformToFill","type":"T:cAlgo.API.Stretch","namespace":"cAlgo.API","group":"Controls","csharp":"Stretch.UniformToFill;","python":"Stretch.UniformToFill","summary":"The content is resized to fill the destination dimensions while it preserves its native aspect ratio. If the aspect ratio of the destination rectangle differs from the source, the source content is clipped to fit in the destination dimensions.","remarks":null,"parameters":[],"returns":{"csharpType":"Stretch","pythonType":"Stretch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Stretch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.StretchDirection","kind":"enum","name":"StretchDirection","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum StretchDirection","python":"StretchDirection","summary":"Describes how scaling applies to content and restricts scaling to named axis types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the StretchDirection\n    public partial class StretchDirectionSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var image = new Image\n            {\n                Source = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><circle cx='32' cy='32' r='30' fill='#2F4BFF'/></svg>\"),\n                Width = 200,\n                Height = 200,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                StretchDirection = StretchDirection\n            };\n\n            Chart.AddControl(image);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    SVG = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\"\n\n    def initialize(self):\n        image = Image()\n        image.HorizontalAlignment = HorizontalAlignment.Center\n        image.VerticalAlignment = VerticalAlignment.Center\n        image.StretchDirection = api.StretchDirection\n        image.Source = SvgIcon(self.SVG)\n\n        api.Chart.AddControl(image)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"StretchDirection\",\n      \"DisplayName\": \"Stretch Direction\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.StretchDirection\",\n      \"DefaultValue\": \"UpOnly\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StretchDirection.UpOnly","kind":"enum value","name":"UpOnly","type":"T:cAlgo.API.StretchDirection","namespace":"cAlgo.API","group":"Controls","csharp":"StretchDirection.UpOnly;","python":"StretchDirection.UpOnly","summary":"The content scales upward only when it is smaller than the parent. If the content is larger, no scaling downward is performed.","remarks":null,"parameters":[],"returns":{"csharpType":"StretchDirection","pythonType":"StretchDirection","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StretchDirection.DownOnly","kind":"enum value","name":"DownOnly","type":"T:cAlgo.API.StretchDirection","namespace":"cAlgo.API","group":"Controls","csharp":"StretchDirection.DownOnly;","python":"StretchDirection.DownOnly","summary":"The content scales downward only when it is larger than the parent. If the content is smaller, no scaling upward is performed.","remarks":null,"parameters":[],"returns":{"csharpType":"StretchDirection","pythonType":"StretchDirection","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.StretchDirection.Both","kind":"enum value","name":"Both","type":"T:cAlgo.API.StretchDirection","namespace":"cAlgo.API","group":"Controls","csharp":"StretchDirection.Both;","python":"StretchDirection.Both","summary":"The content stretches to fit the parent according to the Stretch mode.","remarks":null,"parameters":[],"returns":{"csharpType":"StretchDirection","pythonType":"StretchDirection","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/StretchDirection/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Style","kind":"class","name":"Style","type":null,"namespace":"cAlgo.API","group":"Styles","csharp":"public class Style","python":"Style","summary":"Represents the style of a chart control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use control style to change a group of controls style instead of setting each control properties separatly\n    public partial class StyleSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var style = new Style();\n\n            style.Set(ControlProperty.Margin, 5);\n            style.Set(ControlProperty.ForegroundColor, Color.Blue);\n            style.Set(ControlProperty.FontSize, 14);\n            style.Set(ControlProperty.Width, 100);\n\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Orientation = Orientation.Vertical\n            };\n\n            for (var i = 0; i < 10; i++)\n            {\n                stackPanel.AddChild(new TextBlock\n                {\n                    Text = \"Text Block #\" + i,\n                    Style = style\n                });\n            }\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        style = Style()\n        style.Set(ControlProperty.Margin, 5)\n        style.Set(ControlProperty.ForegroundColor, Color.Blue)\n        style.Set(ControlProperty.FontSize, 14)\n        style.Set(ControlProperty.Width, 100)\n\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Orientation = Orientation.Vertical\n\n        for i in range(10):\n            textBlock = TextBlock()\n            textBlock.Text = f\"Text Block #{i}\"\n            textBlock.Style = style\n            stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.#ctor","kind":"constructor","name":"Style","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public Style()","python":"Style()","summary":"Initializes a new instance of Style class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.FontSize, 14);\nstyle.Set(ControlProperty.Margin, 5);\nvar panel = new StackPanel();\npanel.AddChild(new TextBlock { Text = \"Balance\", Style = style });\npanel.AddChild(new TextBlock { Text = \"Equity\", Style = style });\nChart.AddControl(panel);","python":"style = Style()\nstyle.Set(ControlProperty.FontSize, 14)\nstyle.Set(ControlProperty.Margin, 5)\npanel = StackPanel()\nfor text in [\"Balance\", \"Equity\"]:\n    textBlock = TextBlock()\n    textBlock.Text = text\n    textBlock.Style = style\n    panel.AddChild(textBlock)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.#ctor(cAlgo.API.Style)","kind":"constructor","name":"Style","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public Style(Style parentStyle)","python":"Style(parentStyle: Style)","summary":"Represents the parent style to be inherited by a desired style.","remarks":null,"parameters":[{"name":"parentStyle","csharpType":"Style","pythonType":"Style","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var baseStyle = new Style();\nbaseStyle.Set(ControlProperty.FontSize, 12);\nvar warningStyle = new Style(baseStyle);\nwarningStyle.Set(ControlProperty.ForegroundColor, Color.Red);\nChart.AddControl(new TextBlock { Text = \"Margin level is low\", Style = warningStyle });","python":"baseStyle = Style()\nbaseStyle.Set(ControlProperty.FontSize, 12)\nwarningStyle = Style(baseStyle)\nwarningStyle.Set(ControlProperty.ForegroundColor, Color.Red)\ntextBlock = TextBlock()\ntextBlock.Text = \"Margin level is low\"\ntextBlock.Style = warningStyle\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.Get(cAlgo.API.ControlProperty)","kind":"method","name":"Get","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public object Get(ControlProperty property)","python":"style.Get(property: ControlProperty) -> object","summary":"Gets the chart object style for the specified ControlProperty.","remarks":null,"parameters":[{"name":"property","csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"The control property"}],"returns":{"csharpType":"object","pythonType":"object","summary":"The style value for the passed control property","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.FontSize, 14);\nvar fontSize = style.Get(ControlProperty.FontSize);\nPrint(\"Font size: {0}\", fontSize);","python":"style = Style()\nstyle.Set(ControlProperty.FontSize, 14)\nfontSize = style.Get(ControlProperty.FontSize)\napi.Print(f\"Font size: {fontSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.Get(cAlgo.API.ControlProperty,cAlgo.API.ControlState)","kind":"method","name":"Get","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public object Get(ControlProperty property, ControlState state)","python":"style.Get(property: ControlProperty, state: ControlState) -> object","summary":"Gets the chart control style for the specified ControlProperty and ControlState.","remarks":null,"parameters":[{"name":"property","csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"The control property"},{"name":"state","csharpType":"ControlState","pythonType":"ControlState","summary":"Control state"}],"returns":{"csharpType":"object","pythonType":"object","summary":"The style value for the passed control property","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover);\nvar hoverColor = style.Get(ControlProperty.BackgroundColor, ControlState.Hover);\nPrint(\"Hover background: {0}\", hoverColor);","python":"style = Style()\nstyle.Set(ControlProperty.BackgroundColor, Color.Green, ControlState.Hover)\nhoverColor = style.Get(ControlProperty.BackgroundColor, ControlState.Hover)\napi.Print(f\"Hover background: {hoverColor}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Get/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Get/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.Set(cAlgo.API.ControlProperty,System.Object,cAlgo.API.ControlState)","kind":"method","name":"Set","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public void Set(ControlProperty property, object value, ControlState state)","python":"style.Set(property: ControlProperty, value: object, state: ControlState) -> None","summary":"Provides data for the chart control Style for the specified ControlProperty and the ControlState.","remarks":null,"parameters":[{"name":"property","csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"The control property"},{"name":"value","csharpType":"object","pythonType":"object","summary":"The property value"},{"name":"state","csharpType":"ControlState","pythonType":"ControlState","summary":"Control state"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme);\nstyle.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme);\nstyle.Set(ControlProperty.BackgroundColor, Color.Gray, ControlState.Disabled);\nChart.AddControl(new Button { Text = \"Buy\", Style = style });","python":"style = Style()\nstyle.Set(ControlProperty.BackgroundColor, Color.DarkGreen, ControlState.DarkTheme)\nstyle.Set(ControlProperty.BackgroundColor, Color.LightGreen, ControlState.LightTheme)\nstyle.Set(ControlProperty.BackgroundColor, Color.Gray, ControlState.Disabled)\nbutton = Button()\nbutton.Text = \"Buy\"\nbutton.Style = style\napi.Chart.AddControl(button)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Set/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Set/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Style.Set(cAlgo.API.ControlProperty,System.Object)","kind":"method","name":"Set","type":"T:cAlgo.API.Style","namespace":"cAlgo.API","group":"Styles","csharp":"public void Set(ControlProperty property, object value)","python":"style.Set(property: ControlProperty, value: object) -> None","summary":"Sets the chart control Style for the specified ControlProperty.","remarks":null,"parameters":[{"name":"property","csharpType":"ControlProperty","pythonType":"ControlProperty","summary":"The control property"},{"name":"value","csharpType":"object","pythonType":"object","summary":"The property value"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var style = new Style();\nstyle.Set(ControlProperty.ForegroundColor, Color.Gold);\nstyle.Set(ControlProperty.FontWeight, FontWeight.Bold);\nChart.AddControl(new TextBlock { Text = \"Daily target reached\", Style = style });","python":"style = Style()\nstyle.Set(ControlProperty.ForegroundColor, Color.Gold)\nstyle.Set(ControlProperty.FontWeight, FontWeight.Bold)\ntextBlock = TextBlock()\ntextBlock.Text = \"Daily target reached\"\ntextBlock.Style = style\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Set/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Styles/Style/Set/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.Supertrend","kind":"interface","name":"Supertrend","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Supertrend","python":"Supertrend","summary":"Supertrend is one of the most popular trend trading indicators","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var supertrend = Indicators.Supertrend(10, 3);\nvar isUpTrend = !double.IsNaN(supertrend.UpTrend.Last(1));\nPrint(\"Supertrend direction: {0}\", isUpTrend ? \"up\" : \"down\");","python":"import math\n\nsupertrend = api.Indicators.Supertrend(10, 3)\nisUpTrend = not math.isnan(supertrend.UpTrend.Last(1))\napi.Print(f\"Supertrend direction: {'up' if isUpTrend else 'down'}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Supertrend indicator\n    public partial class SupertrendSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private Supertrend _supertrend;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _supertrend = Indicators.Supertrend(10, 3);\n        }\n\n        protected override void OnBar()\n        {\n            if (_supertrend.UpTrend.Last(1) < Bars.LowPrices.Last(1) && _supertrend.DownTrend.Last(2) > Bars.HighPrices.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_supertrend.DownTrend.Last(1) > Bars.HighPrices.Last(1) && _supertrend.UpTrend.Last(2) < Bars.LowPrices.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass SupertrendSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.supertrend = api.Indicators.Supertrend(10, 3)\n\n    def on_bar_closed(self):\n        if self.supertrend.UpTrend.Last(0) < api.Bars.LowPrices.Last(0) and self.supertrend.DownTrend.Last(1) > api.Bars.HighPrices.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.supertrend.DownTrend.Last(0) > api.Bars.HighPrices.Last(0) and self.supertrend.UpTrend.Last(1) < api.Bars.LowPrices.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Supertrend.DownTrend","kind":"property","name":"DownTrend","type":"T:cAlgo.API.Indicators.Supertrend","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries DownTrend {get; set;}","python":"supertrend.DownTrend: IndicatorDataSeries","summary":"Gets the Supertrend Down trend data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var supertrend = Indicators.Supertrend(10, 3);\nif (!double.IsNaN(supertrend.DownTrend.Last(1)))\n    Print(\"Down trend, Supertrend resistance at {0}\", supertrend.DownTrend.Last(1));","python":"import math\n\nsupertrend = api.Indicators.Supertrend(10, 3)\nif not math.isnan(supertrend.DownTrend.Last(1)):\n    api.Print(f\"Down trend, Supertrend resistance at {supertrend.DownTrend.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/DownTrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/DownTrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Supertrend.UpTrend","kind":"property","name":"UpTrend","type":"T:cAlgo.API.Indicators.Supertrend","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries UpTrend {get; set;}","python":"supertrend.UpTrend: IndicatorDataSeries","summary":"Gets the Supertrend Up trend data series","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var supertrend = Indicators.Supertrend(10, 3);\nif (!double.IsNaN(supertrend.UpTrend.Last(1)))\n    Print(\"Up trend, Supertrend support at {0}\", supertrend.UpTrend.Last(1));","python":"import math\n\nsupertrend = api.Indicators.Supertrend(10, 3)\nif not math.isnan(supertrend.UpTrend.Last(1)):\n    api.Print(f\"Up trend, Supertrend support at {supertrend.UpTrend.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/UpTrend/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Supertrend/UpTrend/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SvgIcon","kind":"class","name":"SvgIcon","type":null,"namespace":"cAlgo.API","group":"General","csharp":"public class SvgIcon","python":"SvgIcon","summary":"Represents a SVG format vector icon.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    private const string Svg = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\";\n\n    protected override void OnStart()\n    {\n        var svgIcon = new SvgIcon(Svg);\n\n        var image = new Image\n        {\n            Source = svgIcon,\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center\n        };\n\n        Chart.AddControl(image);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    Svg = \"<svg width='800px' height='800px' viewBox='0 0 1024 1024' class='icon'  version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M512 960c-92.8 0-160-200-160-448S419.2 64 512 64s160 200 160 448-67.2 448-160 448z m0-32c65.6 0 128-185.6 128-416S577.6 96 512 96s-128 185.6-128 416 62.4 416 128 416z' fill='#050D42' /><path d='M124.8 736c-48-80 92.8-238.4 307.2-363.2S852.8 208 899.2 288 806.4 526.4 592 651.2 171.2 816 124.8 736z m27.2-16c33.6 57.6 225.6 17.6 424-97.6S905.6 361.6 872 304 646.4 286.4 448 401.6 118.4 662.4 152 720z' fill='#050D42' /><path d='M899.2 736c-46.4 80-254.4 38.4-467.2-84.8S76.8 368 124.8 288s254.4-38.4 467.2 84.8S947.2 656 899.2 736z m-27.2-16c33.6-57.6-97.6-203.2-296-318.4S184 246.4 152 304 249.6 507.2 448 622.4s392 155.2 424 97.6z' fill='#050D42' /><path d='M512 592c-44.8 0-80-35.2-80-80s35.2-80 80-80 80 35.2 80 80-35.2 80-80 80zM272 312c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48zM416 880c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z m448-432c-27.2 0-48-20.8-48-48s20.8-48 48-48 48 20.8 48 48-20.8 48-48 48z' fill='#2F4BFF' /></svg>\"\n    def on_start(self):\n        svgIcon =  SvgIcon(self.Svg)\n\n        image = Image()\n        image.Source = svgIcon\n        image.HorizontalAlignment = HorizontalAlignment.Center\n        image.VerticalAlignment = VerticalAlignment.Center\n\n        api.Chart.AddControl(image)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/SvgIcon/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/SvgIcon/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Accepted without validation, but icons are never displayed in the CLI."},{"name":"Cloud","support":"Partial","behaviour":"Accepted without validation, but icons are never displayed in the cloud."}]}
{"id":"M:cAlgo.API.SvgIcon.#ctor(System.String)","kind":"constructor","name":"SvgIcon","type":"T:cAlgo.API.SvgIcon","namespace":"cAlgo.API","group":"General","csharp":"public SvgIcon(string svgXml)","python":"SvgIcon(svgXml: str)","summary":"Creates an SVG icon from raw SVG XML string.","remarks":null,"parameters":[{"name":"svgXml","csharpType":"string","pythonType":"str","summary":"SVG XML"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var icon = new SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M2 14 L8 2 L14 14 Z' fill='#27AE60'/></svg>\");\nvar image = new Image { Source = icon, Width = 32, Height = 32 };\nChart.AddControl(image);","python":"icon = SvgIcon(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M2 14 L8 2 L14 14 Z' fill='#27AE60'/></svg>\")\nimage = Image()\nimage.Source = icon\nimage.Width = 32\nimage.Height = 32\napi.Chart.AddControl(image)"}],"url":"https://help.ctrader.com/ctrader-algo/references/General/SvgIcon/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/General/SvgIcon/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"The SVG is not validated: invalid or oversized SVG is accepted instead of throwing InvalidOperationException as on desktop."},{"name":"Cloud","support":"Partial","behaviour":"The SVG is not validated: invalid or oversized SVG is accepted instead of throwing InvalidOperationException as on desktop."}]}
{"id":"T:cAlgo.API.Indicators.SwingIndex","kind":"interface","name":"SwingIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface SwingIndex","python":"SwingIndex","summary":"Developed by Welles Wilder, the Swing Index compares current Open, high, Low and Close prices to find of current and previous periods to find \"real\" price.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Indicators\n{\n    public partial class Test:Indicator\n    {\n        private SwingIndex _swingIndex;\n\n        protected override void Initialize()\n        {\n            _swingIndex = Indicators.SwingIndex(LimitMoveValue);\n        }\n\n        public override void Calculate(int index)\n        {\n            //Print the current value of SwingIndex to the log\n            Print(\"The current value of SwingIndex is {0}\", _swingIndex.Result[index]);\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        self.swingIndex = api.Indicators.SwingIndex(api.LimitMoveValue)\n\n    def calculate(self, index):\n        # Print the current value of SwingIndex to the log\n        api.Print(f\"The current value of SwingIndex is {self.swingIndex.Result[index]}\")","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"LimitMoveValue\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 12\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Swing Index indicator\n    public partial class SwingIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private SwingIndex _swingIndex;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _swingIndex = Indicators.SwingIndex(12);\n        }\n\n        protected override void OnBar()\n        {\n            if (_swingIndex.Result.Last(1) > 0 && _swingIndex.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_swingIndex.Result.Last(1) < 0 && _swingIndex.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass SwingIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.swingIndex = api.Indicators.SwingIndex(12)\n\n    def on_bar_closed(self):\n        if self.swingIndex.Result.Last(0) > 0 and self.swingIndex.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.swingIndex.Result.Last(0) < 0 and self.swingIndex.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/SwingIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/SwingIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.SwingIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.SwingIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"swingIndex.Result: IndicatorDataSeries","summary":"Gets the Result Series of the Swing Index indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var swingIndex = Indicators.SwingIndex(12);\nPrint(\"The value of SwingIndex for the last closed bar is {0}\", swingIndex.Result.Last(1));","python":"swingIndex = api.Indicators.SwingIndex(12)\napi.Print(f\"The value of SwingIndex for the last closed bar is {swingIndex.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/SwingIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/SwingIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.Symbol","kind":"interface","name":"Symbol","type":null,"namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"public interface Symbol","python":"Symbol","summary":"Represents a currency pair.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"double bid = Symbol.Bid;\ndouble ask = Symbol.Ask;\nstring name = Symbol.Name;\nint digits = Symbol.Digits;\ndouble pipSize = Symbol.PipSize;\ndouble pointSize = Symbol.TickSize;\ndouble spread = Symbol.Spread;\nPrint(\"{0} bid: {1}, ask: {2}, spread: {3} pips\", name, bid, ask, spread / pipSize);","python":"bid = api.Symbol.Bid\nask = api.Symbol.Ask\nname = api.Symbol.Name\ndigits = api.Symbol.Digits\npipSize = api.Symbol.PipSize\npointSize = api.Symbol.TickSize\nspread = api.Symbol.Spread\napi.Print(f\"{name} bid: {bid}, ask: {ask}, spread: {spread / pipSize} pips\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to get a symbol data\n    public partial class SymbolSample : Indicator\n    {\n        private TextBlock _spreadTextBlock;\n        private TextBlock _bidTextBlock;\n        private TextBlock _askTextBlock;\n        private TextBlock _unrealizedGrossProfitTextBlock;\n        private TextBlock _unrealizedNetProfitTextBlock;\n        private TextBlock _timeTillOpenTextBlock;\n        private TextBlock _timeTillCloseTextBlock;\n        private TextBlock _isOpenedTextBlock;\n        private Symbol _symbol;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(44, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 1);\n            style.Set(ControlProperty.Margin, 2);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n            style.Set(ControlProperty.FontSize, 8);\n\n            _symbol = UseCurrentSymbol ? Symbol : Symbols.GetSymbol(OtherSymbolName);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Symbol Info\",\n                Style = style,\n                HorizontalAlignment = HorizontalAlignment.Center\n            }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Name\",\n                Style = style\n            }, 1, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Name,\n                Style = style\n            }, 1, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"ID\",\n                Style = style\n            }, 2, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Id.ToString(),\n                Style = style\n            }, 2, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Digits\",\n                Style = style\n            }, 3, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Digits.ToString(),\n                Style = style\n            }, 3, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Description\",\n                Style = style\n            }, 4, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Description,\n                Style = style\n            }, 4, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Lot Size\",\n                Style = style\n            }, 5, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.LotSize.ToString(),\n                Style = style\n            }, 5, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Pip Size\",\n                Style = style\n            }, 6, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.PipSize.ToString(),\n                Style = style\n            }, 6, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Pip Value\",\n                Style = style\n            }, 7, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.PipValue.ToString(),\n                Style = style\n            }, 7, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Tick Size\",\n                Style = style\n            }, 8, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.TickSize.ToString(),\n                Style = style\n            }, 8, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Tick Value\",\n                Style = style\n            }, 9, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.TickValue.ToString(),\n                Style = style\n            }, 9, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Volume In Units Max\",\n                Style = style\n            }, 10, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.VolumeInUnitsMax.ToString(),\n                Style = style\n            }, 10, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Volume In Units Min\",\n                Style = style\n            }, 11, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.VolumeInUnitsMin.ToString(),\n                Style = style\n            }, 11, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Volume In Units Step\",\n                Style = style\n            }, 12, 0);\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.VolumeInUnitsStep.ToString(),\n                Style = style\n            }, 12, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Ask\",\n                Style = style\n            }, 13, 0);\n\n            _askTextBlock = new TextBlock\n            {\n                Text = _symbol.Ask.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_askTextBlock, 13, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Bid\",\n                Style = style\n            }, 14, 0);\n\n            _bidTextBlock = new TextBlock\n            {\n                Text = _symbol.Bid.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_bidTextBlock, 14, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Spread\",\n                Style = style\n            }, 15, 0);\n\n            _spreadTextBlock = new TextBlock\n            {\n                Text = _symbol.Spread.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_spreadTextBlock, 15, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Unrealized Gross Profit\",\n                Style = style\n            }, 16, 0);\n\n            _unrealizedGrossProfitTextBlock = new TextBlock\n            {\n                Text = _symbol.UnrealizedGrossProfit.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_unrealizedGrossProfitTextBlock, 16, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Unrealized Net Profit\",\n                Style = style\n            }, 17, 0);\n\n            _unrealizedNetProfitTextBlock = new TextBlock\n            {\n                Text = _symbol.UnrealizedNetProfit.ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_unrealizedNetProfitTextBlock, 17, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Time Till Open\",\n                Style = style\n            }, 18, 0);\n\n            _timeTillOpenTextBlock = new TextBlock\n            {\n                Text = _symbol.MarketHours.TimeTillOpen().ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_timeTillOpenTextBlock, 18, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Time Till Close\",\n                Style = style\n            }, 19, 0);\n\n            _timeTillCloseTextBlock = new TextBlock\n            {\n                Text = _symbol.MarketHours.TimeTillClose().ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_timeTillCloseTextBlock, 19, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Is Opened\",\n                Style = style\n            }, 20, 0);\n\n            _isOpenedTextBlock = new TextBlock\n            {\n                Text = _symbol.MarketHours.IsOpened().ToString(),\n                Style = style\n            };\n\n            grid.AddChild(_isOpenedTextBlock, 20, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Trading Sessions #\",\n                Style = style\n            }, 21, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MarketHours.Sessions.Count.ToString(),\n                Style = style\n            }, 21, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Trading Session Week Days\",\n                Style = style\n            }, 22, 0);\n\n            var weekDays = string.Empty;\n\n            for (var iSession = 0; iSession < _symbol.MarketHours.Sessions.Count; iSession++)\n            {\n                var currentSessionWeekDays = string.Format(\"{0}({1})-{2}({3})\", _symbol.MarketHours.Sessions[iSession].StartDay, _symbol.MarketHours.Sessions[iSession].StartTime, _symbol.MarketHours.Sessions[iSession].EndDay, _symbol.MarketHours.Sessions[iSession].EndTime);\n\n                weekDays = iSession == 0 ? currentSessionWeekDays : string.Format(\"{0}, {1}\", weekDays, currentSessionWeekDays);\n            }\n\n            grid.AddChild(new TextBlock\n            {\n                Text = weekDays,\n                Style = style\n            }, 22, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Leverage Tier\",\n                Style = style\n            }, 23, 0);\n\n            var leverageTiers = string.Empty;\n\n            for (var iLeverageTier = 0; iLeverageTier < _symbol.DynamicLeverage.Count; iLeverageTier++)\n            {\n                var currentLeverageTiers = string.Format(\"Volume up to {0} is {1}\", _symbol.DynamicLeverage[iLeverageTier].Volume, _symbol.DynamicLeverage[iLeverageTier].Leverage);\n\n                leverageTiers = iLeverageTier == 0 ? currentLeverageTiers : string.Format(\"{0}, {1}\", leverageTiers, currentLeverageTiers);\n            }\n\n            grid.AddChild(new TextBlock\n            {\n                Text = leverageTiers,\n                Style = style\n            }, 23, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.BaseAsset),\n                Style = style\n            }, 24, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.BaseAsset.Name,\n                Style = style\n            }, 24, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.QuoteAsset),\n                Style = style\n            }, 25, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.QuoteAsset.Name,\n                Style = style\n            }, 25, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.PnLConversionFeeRate),\n                Style = style\n            }, 26, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.PnLConversionFeeRate.ToString(),\n                Style = style\n            }, 26, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.Commission),\n                Style = style\n            }, 27, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Commission.ToString(),\n                Style = style\n            }, 27, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.CommissionType),\n                Style = style\n            }, 28, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.CommissionType.ToString(),\n                Style = style\n            }, 28, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinCommission),\n                Style = style\n            }, 29, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinCommission.ToString(),\n                Style = style\n            }, 29, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinCommissionAsset),\n                Style = style\n            }, 30, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinCommissionAsset.Name,\n                Style = style\n            }, 30, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinCommissionType),\n                Style = style\n            }, 31, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinCommissionType.ToString(),\n                Style = style\n            }, 31, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.AdministrativeCharge3DaysRollover),\n                Style = style\n            }, 32, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.AdministrativeCharge3DaysRollover.ToString(),\n                Style = style\n            }, 32, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.AdministrativeCharge),\n                Style = style\n            }, 33, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.AdministrativeCharge.ToString(),\n                Style = style\n            }, 33, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.GracePeriod),\n                Style = style\n            }, 34, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.GracePeriod.ToString(),\n                Style = style\n            }, 34, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.SwapLong),\n                Style = style\n            }, 35, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.SwapLong.ToString(),\n                Style = style\n            }, 35, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.SwapShort),\n                Style = style\n            }, 36, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.SwapShort.ToString(),\n                Style = style\n            }, 36, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.Swap3DaysRollover),\n                Style = style\n            }, 37, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.Swap3DaysRollover.ToString(),\n                Style = style\n            }, 37, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.SwapCalculationType),\n                Style = style\n            }, 38, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.SwapCalculationType.ToString(),\n                Style = style\n            }, 38, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.IsTradingEnabled),\n                Style = style\n            }, 39, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.IsTradingEnabled.ToString(),\n                Style = style\n            }, 39, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.TradingMode),\n                Style = style\n            }, 40, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.TradingMode.ToString(),\n                Style = style\n            }, 40, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinDistanceType),\n                Style = style\n            }, 41, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinDistanceType.ToString(),\n                Style = style\n            }, 41, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinTakeProfitDistance),\n                Style = style\n            }, 42, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinTakeProfitDistance.ToString(),\n                Style = style\n            }, 42, 1);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = nameof(_symbol.MinStopLossDistance),\n                Style = style\n            }, 43, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = _symbol.MinStopLossDistance.ToString(),\n                Style = style\n            }, 43, 1);\n\n            Chart.AddControl(grid);\n\n            _symbol.Tick += Symbol_Tick;\n\n            Timer.Start(TimeSpan.FromSeconds(1));\n        }\n\n        private void Symbol_Tick(SymbolTickEventArgs obj)\n        {\n            _askTextBlock.Text = obj.Symbol.Ask.ToString();\n            _bidTextBlock.Text = obj.Symbol.Bid.ToString();\n            _spreadTextBlock.Text = obj.Symbol.Spread.ToString();\n            _unrealizedGrossProfitTextBlock.Text = obj.Symbol.UnrealizedGrossProfit.ToString();\n            _unrealizedNetProfitTextBlock.Text = obj.Symbol.UnrealizedNetProfit.ToString();\n        }\n\n        protected override void OnTimer()\n        {\n            _timeTillOpenTextBlock.Text = _symbol.MarketHours.TimeTillOpen().ToString();\n            _timeTillCloseTextBlock.Text = _symbol.MarketHours.TimeTillClose().ToString();\n            _isOpenedTextBlock.Text = _symbol.MarketHours.IsOpened().ToString();\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass SymbolSample():\n    def initialize(self):\n        grid = Grid(24, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 1)\n        self.style.Set(ControlProperty.Margin, Thickness(2))\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n        self.style.Set(ControlProperty.FontSize, 8)\n\n        self.symbol = api.Symbol if api.UseCurrentSymbol else api.Symbols.GetSymbol(api.OtherSymbolName)\n\n        grid.AddChild(self.get_text_block(\"Symbol Info\", HorizontalAlignment.Center), 0, 0, 1, 2)\n        grid.AddChild(self.get_text_block(\"Name\"), 1, 0)\n        grid.AddChild(self.get_text_block(self.symbol.Name), 1, 1)\n        grid.AddChild(self.get_text_block(\"ID\"), 2, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.Id)), 2, 1)\n        grid.AddChild(self.get_text_block(\"Digits\"), 3, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.Digits)), 3, 1)\n        grid.AddChild(self.get_text_block(\"Description\"), 4, 0)\n        grid.AddChild(self.get_text_block(self.symbol.Description), 4, 1)\n        grid.AddChild(self.get_text_block(\"Lot Size\"), 5, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.LotSize)), 5, 1)\n        grid.AddChild(self.get_text_block(\"Pip Size\"), 6, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.PipSize)), 6, 1)\n        grid.AddChild(self.get_text_block(\"Pip Value\"), 7, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.PipValue)), 7, 1)\n        grid.AddChild(self.get_text_block(\"Tick Size\"), 8, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.TickSize)), 8, 1)\n        grid.AddChild(self.get_text_block(\"Tick Value\"), 9, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.TickValue)), 9, 1)\n        grid.AddChild(self.get_text_block(\"Volume In Units Max\"), 10, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.VolumeInUnitsMax)), 10, 1)\n        grid.AddChild(self.get_text_block(\"Volume In Units Min\"), 11, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.VolumeInUnitsMin)), 11, 1)\n        grid.AddChild(self.get_text_block(\"Volume In Units Step\"), 12, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.VolumeInUnitsStep)), 12, 1)\n        grid.AddChild(self.get_text_block(\"Ask\"), 13, 0)\n\n        self.askTextBlock = self.get_text_block(str(self.symbol.Ask))\n\n        grid.AddChild(self.askTextBlock, 13, 1)\n\n        grid.AddChild(self.get_text_block(\"Bid\"), 14, 0)\n\n        self.bidTextBlock = self.get_text_block(str(self.symbol.Bid))\n\n        grid.AddChild(self.bidTextBlock, 14, 1)\n\n        grid.AddChild(self.get_text_block(\"Spread\"), 15, 0)\n\n        self.spreadTextBlock = self.get_text_block(str(self.symbol.Spread))\n\n        grid.AddChild(self.spreadTextBlock, 15, 1)\n\n        grid.AddChild(self.get_text_block(\"Unrealized Gross Profit\"), 16, 0)\n\n        self.unrealizedGrossProfitTextBlock = self.get_text_block(str(self.symbol.UnrealizedGrossProfit))\n\n        grid.AddChild(self.unrealizedGrossProfitTextBlock, 16, 1)\n\n        grid.AddChild(self.get_text_block(\"Unrealized Net Profit\"), 17, 0)\n\n        self.unrealizedNetProfitTextBlock = self.get_text_block(str(self.symbol.UnrealizedNetProfit))\n\n        grid.AddChild(self.unrealizedNetProfitTextBlock, 17, 1)\n\n        grid.AddChild(self.get_text_block(\"Time Till Open\"), 18, 0)\n\n        self.timeTillOpenTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillOpen()))\n\n        grid.AddChild(self.timeTillOpenTextBlock, 18, 1)\n\n        grid.AddChild(self.get_text_block(\"Time Till Close\"), 19, 0)\n\n        self.timeTillCloseTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillClose()))\n\n        grid.AddChild(self.timeTillCloseTextBlock, 19, 1)\n\n        grid.AddChild(self.get_text_block(\"Is Opened\"), 20, 0)\n\n        self.isOpenedTextBlock = self.get_text_block(str(self.symbol.MarketHours.IsOpened()))\n\n        grid.AddChild(self.isOpenedTextBlock, 20, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Sessions #\"), 21, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.MarketHours.Sessions.Count)), 21, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Session Week Days\"), 22, 0)\n\n        weekDays = \"\"\n\n        for iSession in range(self.symbol.MarketHours.Sessions.Count):\n            currentSessionWeekDays = f\"{self.symbol.MarketHours.Sessions[iSession].StartDay}({self.symbol.MarketHours.Sessions[iSession].StartTime})-{self.symbol.MarketHours.Sessions[iSession].EndDay}({self.symbol.MarketHours.Sessions[iSession].EndTime})\"\n            weekDays = currentSessionWeekDays if iSession == 0 else f\"{weekDays}, {currentSessionWeekDays}\"\n\n        grid.AddChild(self.get_text_block(weekDays), 22, 1)\n\n        grid.AddChild(self.get_text_block(\"Leverage Tier\"), 23, 0)\n\n        leverageTiers = \"\"\n\n        for iLeveragTier in range(self.symbol.DynamicLeverage.Count):\n            currentLeverageTiers = f\"Volume up to {self.symbol.DynamicLeverage[iLeveragTier].Volume} is {self.symbol.DynamicLeverage[iLeveragTier].Leverage}\"\n            leverageTiers = currentLeverageTiers if iLeveragTier == 0 else f\"{leverageTiers}, {currentLeverageTiers}\"\n\n        grid.AddChild(self.get_text_block(leverageTiers), 23, 1)\n\n        api.Chart.AddControl(grid)\n\n        self.symbol.Tick += self.on_symbol_tick\n\n        api.Timer.Start(1)\n\n    def on_symbol_tick(self, args):\n        self.askTextBlock.Text = str(args.Symbol.Ask)\n        self.bidTextBlock.Text = str(args.Symbol.Bid)\n        self.spreadTextBlock.Text = str(args.Symbol.Spread)\n        self.unrealizedGrossProfitTextBlock.Text = str(args.Symbol.UnrealizedGrossProfit)\n        self.unrealizedNetProfitTextBlock.Text = str(args.Symbol.UnrealizedNetProfit)\n\n    def on_timer(self):\n        self.timeTillOpenTextBlock.Text = str(self.symbol.MarketHours.TimeTillOpen())\n        self.timeTillCloseTextBlock.Text = str(self.symbol.MarketHours.TimeTillClose())\n        self.isOpenedTextBlock.Text = str(self.symbol.MarketHours.IsOpened())\n\n    def get_text_block(self, text, horizontalAlignment = None):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        if horizontalAlignment is not None:\n            textBlock.HorizontalAlignment = horizontalAlignment\n        return textBlock","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"UseCurrentSymbol\",\n      \"DisplayName\": \"Use Current Symbol\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    },\n    {\n      \"Name\": \"OtherSymbolName\",\n      \"DisplayName\": \"Other Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"GBPUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.AmountRisked(System.Double,System.Double)","kind":"method","name":"AmountRisked","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double AmountRisked(double volume, double stopLossInPips)","python":"api.Symbol.AmountRisked(volume: float, stopLossInPips: float) -> float","summary":"Calculates the amount to be risked based on the specified stop loss and trading volume. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to be traded"},{"name":"stopLossInPips","csharpType":"double","pythonType":"float","summary":"The stop loss in pips."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var stopLossInPips = 50;\n        var tradeVolume = Symbol.VolumeInUnitsMin;\n        var amountRisked = Symbol.AmountRisked(tradeVolume, stopLossInPips);\n\n        Print($\"If you trade {tradeVolume} with a StopLoss of {stopLossInPips} pips you will risk losing {amountRisked} {Account.Asset.Name}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        stopLossInPips = 50\n        tradeVolume = api.Symbol.VolumeInUnitsMin\n        amountRisked = api.Symbol.AmountRisked(tradeVolume, stopLossInPips)\n        print(f\"If you trade {tradeVolume} with a StopLoss of {stopLossInPips} pips you will risk losing {amountRisked} {api.Account.Asset.Name}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AmountRisked/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AmountRisked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.GetEstimatedMargin(cAlgo.API.TradeType,System.Double)","kind":"method","name":"GetEstimatedMargin","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double GetEstimatedMargin(TradeType tradeType, double volume)","python":"api.Symbol.GetEstimatedMargin(tradeType: TradeType, volume: float) -> float","summary":"Returns the amount of margin you need for x amount of volume.","remarks":null,"parameters":[{"name":"tradeType","csharpType":"TradeType","pythonType":"TradeType","summary":"Order trade type"},{"name":"volume","csharpType":"double","pythonType":"float","summary":"Amount of volume"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Amount of Margin","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.QuantityToVolumeInUnits(1);\nvar margin = Symbol.GetEstimatedMargin(TradeType.Buy, volume);\nif (margin < Account.FreeMargin)\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, volume);\nelse\n    Print(\"Not enough free margin, required: {0}\", margin);","python":"volume = api.Symbol.QuantityToVolumeInUnits(1)\nmargin = api.Symbol.GetEstimatedMargin(TradeType.Buy, volume)\nif margin < api.Account.FreeMargin:\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, volume)\nelse:\n    api.Print(f\"Not enough free margin, required: {margin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/GetEstimatedMargin/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/GetEstimatedMargin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.NormalizeVolumeInUnits(System.Double,cAlgo.API.RoundingMode)","kind":"method","name":"NormalizeVolumeInUnits","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double NormalizeVolumeInUnits(double volume, RoundingMode roundingMode)","python":"api.Symbol.NormalizeVolumeInUnits(volume: float, roundingMode: RoundingMode) -> float","summary":"Round the volume to the amount suitable for a trade.","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"Amount to normalize"},{"name":"roundingMode","csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"Rounding method"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Normalized volume","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Down);\nPrint(\"Normalized volume: {0}\", volume);","python":"volume = api.Symbol.NormalizeVolumeInUnits(12345.67, RoundingMode.Down)\napi.Print(f\"Normalized volume: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/NormalizeVolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/NormalizeVolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.PipsForFixedRisk(System.Double,System.Double)","kind":"method","name":"PipsForFixedRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PipsForFixedRisk(double amount, double volume)","python":"api.Symbol.PipsForFixedRisk(amount: float, volume: float) -> float","summary":"Calculates the number of pips to be risked based on the specified stop loss and trading volume. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"amount","csharpType":"double","pythonType":"float","summary":"The amount to be risked."},{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to be traded."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeInUnitsMin;\n        var amountRisked = 100;\n\n        var stopLossInPips = Symbol.PipsForFixedRisk(amountRisked, tradeVolume);\n\n        Print($\"If you trade {tradeVolume} with a risk of losing {amountRisked} {Account.Asset.Name} you should use {stopLossInPips} Pips as your StopLoss\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeInUnitsMin\n        amountRisked = 100\n        stopLossInPips = api.Symbol.PipsForFixedRisk(amountRisked, tradeVolume)\n        print(f\"If you trade {tradeVolume} with a risk of losing {amountRisked} {api.Account.Asset.Name} you should use {stopLossInPips} Pips as your StopLoss\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipsForFixedRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipsForFixedRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.PipsForProportionalRisk(cAlgo.API.ProportionalAmountType,System.Double,System.Double)","kind":"method","name":"PipsForProportionalRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PipsForProportionalRisk(ProportionalAmountType type, double percentage, double volume)","python":"api.Symbol.PipsForProportionalRisk(type: ProportionalAmountType, percentage: float, volume: float) -> float","summary":"Calculates the stop loss (in pips) for the proportional amount to be risked based on the specified volume. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"type","csharpType":"ProportionalAmountType","pythonType":"ProportionalAmountType","summary":"The type of the amount to be risked (either balance or equity)."},{"name":"percentage","csharpType":"double","pythonType":"float","summary":"The percentage of equity or balance to be risked."},{"name":"volume","csharpType":"double","pythonType":"float","summary":"The volume to be traded."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated stop loss in pips.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeInUnitsMin;\n        var riskPercentage = 1;\n\n        var stopLossInPips = Symbol.PipsForProportionalRisk(ProportionalAmountType.Equity, riskPercentage, tradeVolume);\n\n        Print($\"If you trade {tradeVolume} with a risk of losing {riskPercentage}% of your account equity you should use {stopLossInPips} Pips as your StopLoss\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeInUnitsMin\n        riskPercentage = 1\n        stopLossInPips = api.Symbol.PipsForProportionalRisk(ProportionalAmountType.Equity, riskPercentage, tradeVolume)\n        print(f\"If you trade {tradeVolume} with a risk of losing {riskPercentage}% of your account equity you should use {stopLossInPips} Pips as your StopLoss\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipsForProportionalRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipsForProportionalRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.QuantityToVolumeInUnits(System.Double)","kind":"method","name":"QuantityToVolumeInUnits","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double QuantityToVolumeInUnits(double quantity)","python":"api.Symbol.QuantityToVolumeInUnits(quantity: float) -> float","summary":"Convert Quantity (in lots) to Volume in units of base currency.","remarks":null,"parameters":[{"name":"quantity","csharpType":"double","pythonType":"float","summary":"Quantity (lots)"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Volume in units of base currency","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.QuantityToVolumeInUnits(0.01);\nExecuteMarketOrder(TradeType.Buy, SymbolName, volume, \"myLabel\");","python":"volume = api.Symbol.QuantityToVolumeInUnits(0.01)\napi.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, volume, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/QuantityToVolumeInUnits/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/QuantityToVolumeInUnits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeForFixedRisk(System.Double,System.Double)","kind":"method","name":"VolumeForFixedRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeForFixedRisk(double amount, double stopLossInPips)","python":"api.Symbol.VolumeForFixedRisk(amount: float, stopLossInPips: float) -> float","summary":"Calculates the volume to be risked (in X units of the account deposit currency) based on the specified stop loss. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"amount","csharpType":"double","pythonType":"float","summary":"The amount you want to risk in your account deposit currency."},{"name":"stopLossInPips","csharpType":"double","pythonType":"float","summary":"The stop loss in pips."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeForFixedRisk(1000, 20);\n\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, tradeVolume);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeForFixedRisk(1000, 20)\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, tradeVolume)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForFixedRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForFixedRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeForFixedRisk(System.Double,System.Double,cAlgo.API.RoundingMode)","kind":"method","name":"VolumeForFixedRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeForFixedRisk(double amount, double stopLossInPips, RoundingMode roundingMode)","python":"api.Symbol.VolumeForFixedRisk(amount: float, stopLossInPips: float, roundingMode: RoundingMode) -> float","summary":"Calculates the volume to be risked (in X units of the account deposit currency) based on the specified stop loss. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"amount","csharpType":"double","pythonType":"float","summary":"The amount you want to risk in your account deposit currency."},{"name":"stopLossInPips","csharpType":"double","pythonType":"float","summary":"The stop loss in pips."},{"name":"roundingMode","csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"The rounding method"}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeForFixedRisk(1000, 20, RoundingMode.ToNearest);\n\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, tradeVolume);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeForFixedRisk(1000, 20, RoundingMode.ToNearest)\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, tradeVolume)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForFixedRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForFixedRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeForProportionalRisk(cAlgo.API.ProportionalAmountType,System.Double,System.Double)","kind":"method","name":"VolumeForProportionalRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeForProportionalRisk(ProportionalAmountType type, double percentage, double stopLossInPips)","python":"api.Symbol.VolumeForProportionalRisk(type: ProportionalAmountType, percentage: float, stopLossInPips: float) -> float","summary":"Calculates the volume to be risked (in X% of either the account equity or balance) based on the specified stop loss. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"type","csharpType":"ProportionalAmountType","pythonType":"ProportionalAmountType","summary":"The type of the amount to be risked (either balance or equity)."},{"name":"percentage","csharpType":"double","pythonType":"float","summary":"The percentage of equity or balance to be risked."},{"name":"stopLossInPips","csharpType":"double","pythonType":"float","summary":"The stop loss in pips."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeForProportionalRisk(ProportionalAmountType.Equity, 1, 20);\n\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, tradeVolume);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeForProportionalRisk(ProportionalAmountType.Equity, 1, 20)\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, tradeVolume)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForProportionalRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForProportionalRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeForProportionalRisk(cAlgo.API.ProportionalAmountType,System.Double,System.Double,cAlgo.API.RoundingMode)","kind":"method","name":"VolumeForProportionalRisk","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeForProportionalRisk(ProportionalAmountType type, double percentage, double stopLossInPips, RoundingMode roundingMode)","python":"api.Symbol.VolumeForProportionalRisk(type: ProportionalAmountType, percentage: float, stopLossInPips: float, roundingMode: RoundingMode) -> float","summary":"Calculates the volume to be risked (in X% of either the account equity or balance) based on the specified stop loss. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.","remarks":null,"parameters":[{"name":"type","csharpType":"ProportionalAmountType","pythonType":"ProportionalAmountType","summary":"The type of the amount to be risked (either balance or equity)."},{"name":"percentage","csharpType":"double","pythonType":"float","summary":"The percentage of equity or balance to be risked."},{"name":"stopLossInPips","csharpType":"double","pythonType":"float","summary":"The stop loss in pips."},{"name":"roundingMode","csharpType":"RoundingMode","pythonType":"RoundingMode","summary":"The rounding method."}],"returns":{"csharpType":"double","pythonType":"float","summary":"The calculated volume in units","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tradeVolume = Symbol.VolumeForProportionalRisk(ProportionalAmountType.Equity, 1, 20, RoundingMode.ToNearest);\n\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, tradeVolume);\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        tradeVolume = api.Symbol.VolumeForProportionalRisk(ProportionalAmountType.Equity, 1, 20, RoundingMode.ToNearest)\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, tradeVolume)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForProportionalRisk/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeForProportionalRisk/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeInUnitsToQuantity(System.Double)","kind":"method","name":"VolumeInUnitsToQuantity","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeInUnitsToQuantity(double volume)","python":"api.Symbol.VolumeInUnitsToQuantity(volume: float) -> float","summary":"Convert Volume in units of base currency to Quantity (in lots).","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":"The symbol volume units to convert to Quantity (in lots)"}],"returns":{"csharpType":"double","pythonType":"float","summary":"Quantity (Lots)","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lots = Symbol.VolumeInUnitsToQuantity(10000);\nPrint(\"10000 units of {0} is {1} lots\", SymbolName, lots);","python":"lots = api.Symbol.VolumeInUnitsToQuantity(10000)\napi.Print(f\"10000 units of {api.SymbolName} is {lots} lots\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsToQuantity/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsToQuantity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.AdministrativeCharge","kind":"property","name":"AdministrativeCharge","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double AdministrativeCharge {get;}","python":"api.Symbol.AdministrativeCharge: float","summary":"Gets symbol administrative charge. Administrative fee will be charged instead of SWAP if account is marked as SWAP free. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Administrative charge: {0}, grace period: {1} days\", Symbol.AdministrativeCharge, Symbol.GracePeriod);","python":"api.Print(f\"Administrative charge: {api.Symbol.AdministrativeCharge}, grace period: {api.Symbol.GracePeriod} days\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AdministrativeCharge/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AdministrativeCharge/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.AdministrativeCharge3DaysRollover","kind":"property","name":"AdministrativeCharge3DaysRollover","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"DayOfWeek? AdministrativeCharge3DaysRollover {get;}","python":"api.Symbol.AdministrativeCharge3DaysRollover: DayOfWeek | None","summary":"Gets the Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek?","pythonType":"DayOfWeek | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.AdministrativeCharge3DaysRollover.HasValue)\n    Print(\"Administrative charge is tripled on {0}\", Symbol.AdministrativeCharge3DaysRollover.Value);","python":"if api.Symbol.AdministrativeCharge3DaysRollover is not None:\n    api.Print(f\"Administrative charge is tripled on {api.Symbol.AdministrativeCharge3DaysRollover}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AdministrativeCharge3DaysRollover/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/AdministrativeCharge3DaysRollover/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Ask {get;}","python":"api.Symbol.Ask: float","summary":"Gets the current ask price for this symbol.","remarks":"The seller's price for the symbol.","parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"Ask Price: {0}\", Symbol.Ask);\n}","python":"def on_tick(self):\n    print(f\"Ask Price: {api.Symbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.BaseAsset","kind":"property","name":"BaseAsset","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"Asset BaseAsset {get;}","python":"api.Symbol.BaseAsset: Asset","summary":"Gets the symbol base asset.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Base asset: {0}, digits: {1}\", Symbol.BaseAsset.Name, Symbol.BaseAsset.Digits);","python":"api.Print(f\"Base asset: {api.Symbol.BaseAsset.Name}, digits: {api.Symbol.BaseAsset.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/BaseAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/BaseAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Bid {get;}","python":"api.Symbol.Bid: float","summary":"Gets the current bid price for this symbol.","remarks":"The buyer's price for the symbol.","parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"Bid Price: {0}\", Symbol.Bid);\n}","python":"def on_tick(self):\n    print(f\"Bid Price: {api.Symbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Commission","kind":"property","name":"Commission","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Commission {get;}","python":"api.Symbol.Commission: float","summary":"Gets the amount of base commission for the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Commission: {0} ({1})\", Symbol.Commission, Symbol.CommissionType);","python":"api.Print(f\"Commission: {api.Symbol.Commission} ({api.Symbol.CommissionType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Commission/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Commission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.CommissionType","kind":"property","name":"CommissionType","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolCommissionType CommissionType {get;}","python":"api.Symbol.CommissionType: SymbolCommissionType","summary":"Gets the symbol base commission calculation type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.CommissionType == SymbolCommissionType.UsdPerOneLot)\n    Print(\"Commission is {0} USD per lot\", Symbol.Commission);\nelse\n    Print(\"Commission type: {0}, value: {1}\", Symbol.CommissionType, Symbol.Commission);","python":"if api.Symbol.CommissionType == SymbolCommissionType.UsdPerOneLot:\n    api.Print(f\"Commission is {api.Symbol.Commission} USD per lot\")\nelse:\n    api.Print(f\"Commission type: {api.Symbol.CommissionType}, value: {api.Symbol.Commission}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/CommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/CommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Digits","kind":"property","name":"Digits","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"int Digits {get;}","python":"api.Symbol.Digits: int","summary":"Gets the number of digits for the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The number of Digits the current symbol  has is: {0}\", Symbol.Digits);\n}","python":"def on_tick(self):\n    print(f\"The number of Digits the current symbol  has is: {api.Symbol.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Digits/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Digits/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.DynamicLeverage","kind":"property","name":"DynamicLeverage","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"IReadonlyList<LeverageTier> DynamicLeverage {get;}","python":"api.Symbol.DynamicLeverage: IReadonlyList[LeverageTier]","summary":"Gets the dynamic leverage tiers for the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<LeverageTier>","pythonType":"IReadonlyList[LeverageTier]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbolLeverage = Symbol.DynamicLeverage[0].Leverage;\nvar realLeverage = Math.Min(symbolLeverage, Account.PreciseLeverage);","python":"symbolLeverage = api.Symbol.DynamicLeverage[0].Leverage\nrealLeverage = min(symbolLeverage, api.Account.PreciseLeverage)"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/DynamicLeverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/DynamicLeverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.FuturesSettings","kind":"property","name":"FuturesSettings","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"FuturesSettings FuturesSettings {get;}","python":"api.Symbol.FuturesSettings: FuturesSettings","summary":"Gets the future contract settings if symbol represents a future contract otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"FuturesSettings","pythonType":"FuturesSettings","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var futuresSettings = Symbol.FuturesSettings;\nif (futuresSettings != null)\n    Print(\"Last trade time: {0}, expiration time: {1}\", futuresSettings.LastTradeTime, futuresSettings.ExpirationTime);\nelse\n    Print(\"{0} is not a futures contract\", SymbolName);","python":"futuresSettings = api.Symbol.FuturesSettings\nif futuresSettings is not None:\n    api.Print(f\"Last trade time: {futuresSettings.LastTradeTime}, expiration time: {futuresSettings.ExpirationTime}\")\nelse:\n    api.Print(f\"{api.SymbolName} is not a futures contract\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/FuturesSettings/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/FuturesSettings/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.GracePeriod","kind":"property","name":"GracePeriod","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"int GracePeriod {get;}","python":"api.Symbol.GracePeriod: int","summary":"Gets symbol grace period. This is the number of days free of Administrative fee from the time of opening a position. Only applicable for SWAP free trading accounts.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Days free of administrative fee: {0}\", Symbol.GracePeriod);","python":"api.Print(f\"Days free of administrative fee: {api.Symbol.GracePeriod}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/GracePeriod/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/GracePeriod/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.IsCustom","kind":"property","name":"IsCustom","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"bool IsCustom {get;}","python":"api.Symbol.IsCustom: bool","summary":"Gets whether current symbol is a custom symbol or not.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"if (Symbol.IsCustom)\n    Print(\"{0} is a custom symbol\", SymbolName);","python":"if api.Symbol.IsCustom:\n    api.Print(f\"{api.SymbolName} is a custom symbol\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/IsCustom/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/IsCustom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.IsTradingEnabled","kind":"property","name":"IsTradingEnabled","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"bool IsTradingEnabled {get;}","python":"api.Symbol.IsTradingEnabled: bool","summary":"Gets If trading is enabled or not for the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (!Symbol.IsTradingEnabled)\n    Print(\"Trading is disabled for {0}\", SymbolName);","python":"if not api.Symbol.IsTradingEnabled:\n    api.Print(f\"Trading is disabled for {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/IsTradingEnabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/IsTradingEnabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.LotSize","kind":"property","name":"LotSize","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long LotSize {get;}","python":"api.Symbol.LotSize: int","summary":"Gets the size of 1 lot in units of the base currency.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"1 lot of {0} is {1} units\", SymbolName, Symbol.LotSize);","python":"api.Print(f\"1 lot of {api.SymbolName} is {api.Symbol.LotSize} units\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/LotSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/LotSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MarketHours","kind":"property","name":"MarketHours","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"MarketHours MarketHours {get;}","python":"api.Symbol.MarketHours: MarketHours","summary":"Gets access to the symbol's trading sessions schedule.","remarks":null,"parameters":[],"returns":{"csharpType":"MarketHours","pythonType":"MarketHours","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var marketHours = Symbol.MarketHours;\nPrint(\"Is opened: {0}, time till close: {1}\", marketHours.IsOpened(), marketHours.TimeTillClose());","python":"marketHours = api.Symbol.MarketHours\napi.Print(f\"Is opened: {marketHours.IsOpened()}, time till close: {marketHours.TimeTillClose()}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MarketHours/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MarketHours/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinCommission","kind":"property","name":"MinCommission","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double MinCommission {get;}","python":"api.Symbol.MinCommission: float","summary":"Gets the minimum amount of commission for the symbol. This is the amount of commission that will be paid by trader for any trade. Check MinCommissionType for interpretation of MinCommission value.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Minimum commission: {0} ({1})\", Symbol.MinCommission, Symbol.MinCommissionType);","python":"api.Print(f\"Minimum commission: {api.Symbol.MinCommission} ({api.Symbol.MinCommissionType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommission/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinCommissionAsset","kind":"property","name":"MinCommissionAsset","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"Asset MinCommissionAsset {get;}","python":"api.Symbol.MinCommissionAsset: Asset","summary":"Gets the symbol minimum commission asset. If MinCommissionType is set to Asset then you can use this property to get that asset. The MinCommission value will be converted from MinCommissionAsset to account deposit asset at the moment of trade.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.MinCommissionType == SymbolMinCommissionType.Asset)\n    Print(\"Minimum commission: {0} {1}\", Symbol.MinCommission, Symbol.MinCommissionAsset.Name);","python":"if api.Symbol.MinCommissionType == SymbolMinCommissionType.Asset:\n    api.Print(f\"Minimum commission: {api.Symbol.MinCommission} {api.Symbol.MinCommissionAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommissionAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommissionAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinCommissionType","kind":"property","name":"MinCommissionType","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolMinCommissionType MinCommissionType {get;}","python":"api.Symbol.MinCommissionType: SymbolMinCommissionType","summary":"Gets the symbol minimum commission type. Use this property to interpret MinCommission value.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinCommissionType","pythonType":"SymbolMinCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var minCommissionAssetName = Symbol.MinCommissionType == SymbolMinCommissionType.Asset ? Symbol.MinCommissionAsset.Name : Symbol.QuoteAsset.Name;\nPrint(\"Minimum commission: {0} {1}\", Symbol.MinCommission, minCommissionAssetName);","python":"minCommissionAssetName = api.Symbol.MinCommissionAsset.Name if api.Symbol.MinCommissionType == SymbolMinCommissionType.Asset else api.Symbol.QuoteAsset.Name\napi.Print(f\"Minimum commission: {api.Symbol.MinCommission} {minCommissionAssetName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinDistanceType","kind":"property","name":"MinDistanceType","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolMinDistanceType MinDistanceType {get;}","python":"api.Symbol.MinDistanceType: SymbolMinDistanceType","summary":"Gets the symbol minimum distances type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinDistanceType","pythonType":"SymbolMinDistanceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Minimum stop loss distance: {0} ({1})\", Symbol.MinStopLossDistance, Symbol.MinDistanceType);","python":"api.Print(f\"Minimum stop loss distance: {api.Symbol.MinStopLossDistance} ({api.Symbol.MinDistanceType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinDistanceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinDistanceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinStopLossDistance","kind":"property","name":"MinStopLossDistance","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double MinStopLossDistance {get;}","python":"api.Symbol.MinStopLossDistance: float","summary":"Gets symbol minimum stop loss distance. Use MinDistanceType for interpretation.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stopLossPips = 2.0;\nif (Symbol.MinDistanceType == SymbolMinDistanceType.Pips && stopLossPips < Symbol.MinStopLossDistance)\n    stopLossPips = Symbol.MinStopLossDistance;\nPrint(\"Stop loss pips: {0}\", stopLossPips);","python":"stopLossPips = 2.0\nif api.Symbol.MinDistanceType == SymbolMinDistanceType.Pips and stopLossPips < api.Symbol.MinStopLossDistance:\n    stopLossPips = api.Symbol.MinStopLossDistance\napi.Print(f\"Stop loss pips: {stopLossPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinStopLossDistance/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinStopLossDistance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.MinTakeProfitDistance","kind":"property","name":"MinTakeProfitDistance","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double MinTakeProfitDistance {get;}","python":"api.Symbol.MinTakeProfitDistance: float","summary":"Gets symbol minimum take profit distance. Use MinDistanceType for interpretation.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var takeProfitPips = 5.0;\nif (Symbol.MinDistanceType == SymbolMinDistanceType.Pips && takeProfitPips < Symbol.MinTakeProfitDistance)\n    takeProfitPips = Symbol.MinTakeProfitDistance;\nPrint(\"Take profit pips: {0}\", takeProfitPips);","python":"takeProfitPips = 5.0\nif api.Symbol.MinDistanceType == SymbolMinDistanceType.Pips and takeProfitPips < api.Symbol.MinTakeProfitDistance:\n    takeProfitPips = api.Symbol.MinTakeProfitDistance\napi.Print(f\"Take profit pips: {takeProfitPips}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinTakeProfitDistance/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/MinTakeProfitDistance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.PipSize","kind":"property","name":"PipSize","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PipSize {get;}","python":"api.Symbol.PipSize: float","summary":"Gets the pip size for current symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The current symbol has pip size of: {0}\", Symbol.PipSize);\n}","python":"def on_tick(self):\n    print(f\"The current symbol has pip size of: {api.Symbol.PipSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.PipValue","kind":"property","name":"PipValue","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PipValue {get;}","python":"api.Symbol.PipValue: float","summary":"Gets the monetary value of one pip. This is the monetary value of one pip of the symbol when you started your cBot or initialized your indicator. Its not updated in real time and it remains constant.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var riskAmount = Account.Balance * 0.01;\nvar stopLossPips = 20;\nvar volume = Symbol.NormalizeVolumeInUnits(riskAmount / (stopLossPips * Symbol.PipValue), RoundingMode.Down);\nPrint(\"Volume risking 1% with a {0} pips stop loss: {1}\", stopLossPips, volume);","python":"riskAmount = api.Account.Balance * 0.01\nstopLossPips = 20\nvolume = api.Symbol.NormalizeVolumeInUnits(riskAmount / (stopLossPips * api.Symbol.PipValue), RoundingMode.Down)\napi.Print(f\"Volume risking 1% with a {stopLossPips} pips stop loss: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.PnLConversionFeeRate","kind":"property","name":"PnLConversionFeeRate","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PnLConversionFeeRate {get;}","python":"api.Symbol.PnLConversionFeeRate: float","summary":"Gets the symbol profit and loss conversion fee rate.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"PnL conversion fee rate: {0}\", Symbol.PnLConversionFeeRate);","python":"api.Print(f\"PnL conversion fee rate: {api.Symbol.PnLConversionFeeRate}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PnLConversionFeeRate/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PnLConversionFeeRate/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.QuoteAsset","kind":"property","name":"QuoteAsset","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"Asset QuoteAsset {get;}","python":"api.Symbol.QuoteAsset: Asset","summary":"Gets the symbol quote asset.","remarks":null,"parameters":[],"returns":{"csharpType":"Asset","pythonType":"Asset","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Quote asset: {0}\", Symbol.QuoteAsset.Name);","python":"api.Print(f\"Quote asset: {api.Symbol.QuoteAsset.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/QuoteAsset/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/QuoteAsset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Sentiment","kind":"property","name":"Sentiment","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolSentiment Sentiment {get;}","python":"api.Symbol.Sentiment: SymbolSentiment","summary":"Gets symbol sentiment.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSentiment","pythonType":"SymbolSentiment","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        Print($\"Symbol {SymbolName} traders sentiment Buy Percentage: {Symbol.Sentiment.BuyPercentage} and Sell Percentage: {Symbol.Sentiment.SellPercentage}\");\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        print(f\"Symbol {api.SymbolName} traders sentiment Buy Percentage: {api.Symbol.Sentiment.BuyPercentage} and Sell Percentage: {api.Symbol.Sentiment.SellPercentage}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Sentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Sentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"No sentiment source in the cloud host; reading the returned values blocks up to 1 minute, then fails with a timeout."}]}
{"id":"P:cAlgo.API.Internals.Symbol.Spread","kind":"property","name":"Spread","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double Spread {get;}","python":"api.Symbol.Spread: float","summary":"Gets the current spread of this symbol.","remarks":"The difference between the Ask and the Bid price for the symbol. (see Symbol.Ask and Symbol.Bid)","parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The Spread of the symbol is: {0}\", Symbol.Spread);\n}","python":"def on_tick(self):\n    print(f\"The Spread of the symbol is: {api.Symbol.Spread}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Spread/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Spread/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Swap3DaysRollover","kind":"property","name":"Swap3DaysRollover","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"DayOfWeek? Swap3DaysRollover {get;}","python":"api.Symbol.Swap3DaysRollover: DayOfWeek | None","summary":"Gets the Day of the week when Symbol SWAP charge amount will be tripled.","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek?","pythonType":"DayOfWeek | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.Swap3DaysRollover.HasValue)\n    Print(\"Triple swap is charged on {0}\", Symbol.Swap3DaysRollover.Value);","python":"if api.Symbol.Swap3DaysRollover is not None:\n    api.Print(f\"Triple swap is charged on {api.Symbol.Swap3DaysRollover}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Swap3DaysRollover/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Swap3DaysRollover/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.SwapCalculationType","kind":"property","name":"SwapCalculationType","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolSwapCalculationType SwapCalculationType {get;}","python":"api.Symbol.SwapCalculationType: SymbolSwapCalculationType","summary":"Gets the symbol SWAP calculation type.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSwapCalculationType","pythonType":"SymbolSwapCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.SwapCalculationType == SymbolSwapCalculationType.Pips)\n    Print(\"Swap long: {0} pips, swap short: {1} pips\", Symbol.SwapLong, Symbol.SwapShort);","python":"if api.Symbol.SwapCalculationType == SymbolSwapCalculationType.Pips:\n    api.Print(f\"Swap long: {api.Symbol.SwapLong} pips, swap short: {api.Symbol.SwapShort} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.SwapLong","kind":"property","name":"SwapLong","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double SwapLong {get;}","python":"api.Symbol.SwapLong: float","summary":"Gets the SWAP charge for long positions of the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Swap long: {0} ({1})\", Symbol.SwapLong, Symbol.SwapCalculationType);","python":"api.Print(f\"Swap long: {api.Symbol.SwapLong} ({api.Symbol.SwapCalculationType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapLong/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapLong/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.SwapShort","kind":"property","name":"SwapShort","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double SwapShort {get;}","python":"api.Symbol.SwapShort: float","summary":"Gets the SWAP charge for short positions of the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var cheaperSide = Symbol.SwapLong > Symbol.SwapShort ? TradeType.Buy : TradeType.Sell;\nPrint(\"Swap short: {0}, side with the better swap: {1}\", Symbol.SwapShort, cheaperSide);","python":"cheaperSide = TradeType.Buy if api.Symbol.SwapLong > api.Symbol.SwapShort else TradeType.Sell\napi.Print(f\"Swap short: {api.Symbol.SwapShort}, side with the better swap: {cheaperSide}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapShort/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/SwapShort/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.TickSize","kind":"property","name":"TickSize","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double TickSize {get;}","python":"api.Symbol.TickSize: float","summary":"Gets the tick size for the current symbol.","remarks":"If the symbol is a 5 digit symbol, the tick size is 0.00001.","parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnTick()\n{\n    Print(\"The current symbol has TickSize: {0}\", Symbol.TickSize);\n}","python":"def on_tick(self):\n    print(f\"The current symbol has TickSize: {api.Symbol.TickSize}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TickSize/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TickSize/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.TickValue","kind":"property","name":"TickValue","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double TickValue {get;}","python":"api.Symbol.TickValue: float","summary":"Gets the monetary value of one tick. This is the monetary value of one tick of the symbol when you started your cBot or initialized your indicator. Its not updated in real time and it remains constant.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var riskAmount = Account.Balance * 0.01;\nvar stopLossTicks = 200;\nvar volume = Symbol.NormalizeVolumeInUnits(riskAmount / (stopLossTicks * Symbol.TickValue), RoundingMode.Down);\nPrint(\"Volume risking 1% with a {0} ticks stop loss: {1}\", stopLossTicks, volume);","python":"riskAmount = api.Account.Balance * 0.01\nstopLossTicks = 200\nvolume = api.Symbol.NormalizeVolumeInUnits(riskAmount / (stopLossTicks * api.Symbol.TickValue), RoundingMode.Down)\napi.Print(f\"Volume risking 1% with a {stopLossTicks} ticks stop loss: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TickValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TickValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.TradingMode","kind":"property","name":"TradingMode","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"SymbolTradingMode TradingMode {get;}","python":"api.Symbol.TradingMode: SymbolTradingMode","summary":"Gets symbol trading mode.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolTradingMode","pythonType":"SymbolTradingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.TradingMode == SymbolTradingMode.CloseOnly)\n    Print(\"Only closing positions is allowed for {0}\", SymbolName);","python":"if api.Symbol.TradingMode == SymbolTradingMode.CloseOnly:\n    api.Print(f\"Only closing positions is allowed for {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/TradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.UnrealizedGrossProfit","kind":"property","name":"UnrealizedGrossProfit","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double UnrealizedGrossProfit {get;}","python":"api.Symbol.UnrealizedGrossProfit: float","summary":"Gets the sum of the unrealized Gross profits of the positions of this Symbol","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Unrealized gross profit of {0} positions: {1}\", SymbolName, Symbol.UnrealizedGrossProfit);","python":"api.Print(f\"Unrealized gross profit of {api.SymbolName} positions: {api.Symbol.UnrealizedGrossProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/UnrealizedGrossProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/UnrealizedGrossProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.UnrealizedNetProfit","kind":"property","name":"UnrealizedNetProfit","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double UnrealizedNetProfit {get;}","python":"api.Symbol.UnrealizedNetProfit: float","summary":"Gets the sum of the unrealized Net profits of the positions of this Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Unrealized net profit of {0} positions: {1}\", SymbolName, Symbol.UnrealizedNetProfit);","python":"api.Print(f\"Unrealized net profit of {api.SymbolName} positions: {api.Symbol.UnrealizedNetProfit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/UnrealizedNetProfit/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/UnrealizedNetProfit/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeInUnitsMax","kind":"property","name":"VolumeInUnitsMax","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeInUnitsMax {get;}","python":"api.Symbol.VolumeInUnitsMax: float","summary":"Gets the maximum tradable amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.NormalizeVolumeInUnits(Symbol.QuantityToVolumeInUnits(10), RoundingMode.Down);\nif (volume <= Symbol.VolumeInUnitsMax)\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, volume);\nelse\n    Print(\"Volume {0} exceeds the maximum {1}\", volume, Symbol.VolumeInUnitsMax);","python":"volume = api.Symbol.NormalizeVolumeInUnits(api.Symbol.QuantityToVolumeInUnits(10), RoundingMode.Down)\nif volume <= api.Symbol.VolumeInUnitsMax:\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, volume)\nelse:\n    api.Print(f\"Volume {volume} exceeds the maximum {api.Symbol.VolumeInUnitsMax}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsMax/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsMax/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeInUnitsMin","kind":"property","name":"VolumeInUnitsMin","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeInUnitsMin {get;}","python":"api.Symbol.VolumeInUnitsMin: float","summary":"Gets the minimum tradable amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.QuantityToVolumeInUnits(0.001);\nif (volume < Symbol.VolumeInUnitsMin)\n    Print(\"The minimum volume is {0}\", Symbol.VolumeInUnitsMin);","python":"volume = api.Symbol.QuantityToVolumeInUnits(0.001)\nif volume < api.Symbol.VolumeInUnitsMin:\n    api.Print(f\"The minimum volume is {api.Symbol.VolumeInUnitsMin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsMin/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsMin/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeInUnitsStep","kind":"property","name":"VolumeInUnitsStep","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeInUnitsStep {get;}","python":"api.Symbol.VolumeInUnitsStep: float","summary":"Gets the minimum trade amount increment.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volume = Symbol.VolumeInUnitsMin;\nif (volume + Symbol.VolumeInUnitsStep <= Symbol.VolumeInUnitsMax)\n    volume += Symbol.VolumeInUnitsStep;\nPrint(\"Next tradable volume: {0}\", volume);","python":"volume = api.Symbol.VolumeInUnitsMin\nif volume + api.Symbol.VolumeInUnitsStep <= api.Symbol.VolumeInUnitsMax:\n    volume += api.Symbol.VolumeInUnitsStep\napi.Print(f\"Next tradable volume: {volume}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsStep/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/VolumeInUnitsStep/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Internals.Symbol.Tick","kind":"event","name":"Tick","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"event Action<SymbolTickEventArgs> Tick;","python":"api.Symbol.Tick += handler  # handler(obj: SymbolTickEventArgs)","summary":"Occurs on each incoming symbol ticks","remarks":null,"parameters":[],"returns":{"csharpType":"Action<SymbolTickEventArgs>","pythonType":"Callable[[SymbolTickEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var gbpUsd = Symbols.GetSymbol(\"GBPUSD\");\n    gbpUsd.Tick += OnGbpUsdTick;\n}\n\nprivate void OnGbpUsdTick(SymbolTickEventArgs args)\n{\n    Print(\"{0} bid: {1}, ask: {2}\", args.SymbolName, args.Bid, args.Ask);\n}","python":"def on_start(self):\n    gbpUsd = api.Symbols.GetSymbol(\"GBPUSD\")\n    gbpUsd.Tick += self.on_gbp_usd_tick\n\ndef on_gbp_usd_tick(self, args):\n    api.Print(f\"{args.SymbolName} bid: {args.Bid}, ask: {args.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Tick/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/Tick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.NormalizeVolume(System.Double,cAlgo.API.RoundingMode)","kind":"method","name":"NormalizeVolume","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long NormalizeVolume(double volume, RoundingMode roundingMode)","python":"api.Symbol.NormalizeVolume(volume: float, roundingMode: RoundingMode) -> int","summary":"","remarks":null,"parameters":[{"name":"volume","csharpType":"double","pythonType":"float","summary":""},{"name":"roundingMode","csharpType":"RoundingMode","pythonType":"RoundingMode","summary":""}],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use NormalizeVolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.QuantityToVolume(System.Double)","kind":"method","name":"QuantityToVolume","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long QuantityToVolume(double quantity)","python":"api.Symbol.QuantityToVolume(quantity: float) -> int","summary":"","remarks":null,"parameters":[{"name":"quantity","csharpType":"double","pythonType":"float","summary":""}],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use QuantityToVolumeInUnits instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Internals.Symbol.VolumeToQuantity(System.Int64)","kind":"method","name":"VolumeToQuantity","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double VolumeToQuantity(long volume)","python":"api.Symbol.VolumeToQuantity(volume: int) -> float","summary":"","remarks":null,"parameters":[{"name":"volume","csharpType":"long","pythonType":"int","summary":""}],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnitsToQuantity instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Code","kind":"property","name":"Code","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"string Code {get;}","python":"api.Symbol.Code: str","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use Symbol.Name instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.PointSize","kind":"property","name":"PointSize","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PointSize {get;}","python":"api.Symbol.PointSize: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use TickSize instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeMin","kind":"property","name":"VolumeMin","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long VolumeMin {get;}","python":"api.Symbol.VolumeMin: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnitsMin instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeMax","kind":"property","name":"VolumeMax","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long VolumeMax {get;}","python":"api.Symbol.VolumeMax: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnitsMax instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.VolumeStep","kind":"property","name":"VolumeStep","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"long VolumeStep {get;}","python":"api.Symbol.VolumeStep: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use VolumeInUnitsStep instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.Leverage","kind":"property","name":"Leverage","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"int Leverage {get;}","python":"api.Symbol.Leverage: int","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use DynamicLeverage  instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.Symbol.PreciseLeverage","kind":"property","name":"PreciseLeverage","type":"T:cAlgo.API.Internals.Symbol","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"double PreciseLeverage {get;}","python":"api.Symbol.PreciseLeverage: float","summary":"","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use DynamicLeverage  instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolAddedEventArgs","kind":"class","name":"SymbolAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class SymbolAddedEventArgs","python":"SymbolAddedEventArgs","summary":"Provides data for the symbols added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Added += OnSymbolsAdded;\n}\n\nprivate void OnSymbolsAdded(SymbolAddedEventArgs args)\n{\n    Print(\"Symbol added: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Added += self.on_symbols_added\n\ndef on_symbols_added(self, args):\n    api.Print(f\"Symbol added: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolAddedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.SymbolAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"symbolAddedEventArgs.SymbolName: str","summary":"Gets added symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Added += OnSymbolsAdded;\n}\n\nprivate void OnSymbolsAdded(SymbolAddedEventArgs args)\n{\n    var symbol = Symbols.GetSymbol(args.SymbolName);\n    if (symbol != null)\n        Print(\"{0} added: {1}\", symbol.Name, symbol.Description);\n}","python":"def on_start(self):\n    api.Symbols.Added += self.on_symbols_added\n\ndef on_symbols_added(self, args):\n    symbol = api.Symbols.GetSymbol(args.SymbolName)\n    if symbol is not None:\n        api.Print(f\"{symbol.Name} added: {symbol.Description}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolAddedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolAddedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolCommissionType","kind":"enum","name":"SymbolCommissionType","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum SymbolCommissionType","python":"SymbolCommissionType","summary":"Defines symbol commission types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.CommissionType == SymbolCommissionType.PercentageOfTradingVolume)\n    Print(\"Commission is {0}% of the trading volume\", Symbol.Commission);\nelse\n    Print(\"Commission: {0} ({1})\", Symbol.Commission, Symbol.CommissionType);","python":"if api.Symbol.CommissionType == SymbolCommissionType.PercentageOfTradingVolume:\n    api.Print(f\"Commission is {api.Symbol.Commission}% of the trading volume\")\nelse:\n    api.Print(f\"Commission: {api.Symbol.Commission} ({api.Symbol.CommissionType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolCommissionType.UsdPerMillionUsdVolume","kind":"enum value","name":"UsdPerMillionUsdVolume","type":"T:cAlgo.API.SymbolCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolCommissionType.UsdPerMillionUsdVolume;","python":"SymbolCommissionType.UsdPerMillionUsdVolume","summary":"Commission is in USD per millions USD volume.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolCommissionType.UsdPerOneLot","kind":"enum value","name":"UsdPerOneLot","type":"T:cAlgo.API.SymbolCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolCommissionType.UsdPerOneLot;","python":"SymbolCommissionType.UsdPerOneLot","summary":"Commission is in USD per one symbol lot.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolCommissionType.PercentageOfTradingVolume","kind":"enum value","name":"PercentageOfTradingVolume","type":"T:cAlgo.API.SymbolCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolCommissionType.PercentageOfTradingVolume;","python":"SymbolCommissionType.PercentageOfTradingVolume","summary":"Commission is in Percentage of trading volume.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolCommissionType.QuoteCurrencyPerOneLot","kind":"enum value","name":"QuoteCurrencyPerOneLot","type":"T:cAlgo.API.SymbolCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolCommissionType.QuoteCurrencyPerOneLot;","python":"SymbolCommissionType.QuoteCurrencyPerOneLot","summary":"Commission is in symbol quote asset / currency per one lot.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolCommissionType","pythonType":"SymbolCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolMinCommissionType","kind":"enum","name":"SymbolMinCommissionType","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum SymbolMinCommissionType","python":"SymbolMinCommissionType","summary":"Defines symbol minimum commission types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var assetName = Symbol.MinCommissionType == SymbolMinCommissionType.QuoteAsset ? Symbol.QuoteAsset.Name : Symbol.MinCommissionAsset.Name;\nPrint(\"Minimum commission: {0} {1}\", Symbol.MinCommission, assetName);","python":"assetName = api.Symbol.QuoteAsset.Name if api.Symbol.MinCommissionType == SymbolMinCommissionType.QuoteAsset else api.Symbol.MinCommissionAsset.Name\napi.Print(f\"Minimum commission: {api.Symbol.MinCommission} {assetName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolMinCommissionType.Asset","kind":"enum value","name":"Asset","type":"T:cAlgo.API.SymbolMinCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolMinCommissionType.Asset;","python":"SymbolMinCommissionType.Asset","summary":"Symbol minimum commission type is in symbol MinCommissionAsset.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinCommissionType","pythonType":"SymbolMinCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolMinCommissionType.QuoteAsset","kind":"enum value","name":"QuoteAsset","type":"T:cAlgo.API.SymbolMinCommissionType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolMinCommissionType.QuoteAsset;","python":"SymbolMinCommissionType.QuoteAsset","summary":"Symbol minimum commission type is in Symbol Quote Asset","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinCommissionType","pythonType":"SymbolMinCommissionType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinCommissionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolMinDistanceType","kind":"enum","name":"SymbolMinDistanceType","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum SymbolMinDistanceType","python":"SymbolMinDistanceType","summary":"Defines symbol minimum distance types.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var unit = Symbol.MinDistanceType == SymbolMinDistanceType.Pips ? \"pips\" : \"%\";\nPrint(\"Minimum stop loss distance: {0} {1}\", Symbol.MinStopLossDistance, unit);","python":"unit = \"pips\" if api.Symbol.MinDistanceType == SymbolMinDistanceType.Pips else \"%\"\napi.Print(f\"Minimum stop loss distance: {api.Symbol.MinStopLossDistance} {unit}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolMinDistanceType.Pips","kind":"enum value","name":"Pips","type":"T:cAlgo.API.SymbolMinDistanceType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolMinDistanceType.Pips;","python":"SymbolMinDistanceType.Pips","summary":"Symbol minimum distances are in Pips.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinDistanceType","pythonType":"SymbolMinDistanceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolMinDistanceType.Percentage","kind":"enum value","name":"Percentage","type":"T:cAlgo.API.SymbolMinDistanceType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolMinDistanceType.Percentage;","python":"SymbolMinDistanceType.Percentage","summary":"Symbol minimum distances are in percentage difference.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolMinDistanceType","pythonType":"SymbolMinDistanceType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolMinDistanceType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolRemovedEventArgs","kind":"class","name":"SymbolRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class SymbolRemovedEventArgs","python":"SymbolRemovedEventArgs","summary":"Provides data for the symbols removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Removed += OnSymbolsRemoved;\n}\n\nprivate void OnSymbolsRemoved(SymbolRemovedEventArgs args)\n{\n    Print(\"Symbol removed: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Removed += self.on_symbols_removed\n\ndef on_symbols_removed(self, args):\n    api.Print(f\"Symbol removed: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolRemovedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.SymbolRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"symbolRemovedEventArgs.SymbolName: str","summary":"Gets removed symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Removed += OnSymbolsRemoved;\n}\n\nprivate void OnSymbolsRemoved(SymbolRemovedEventArgs args)\n{\n    if (args.SymbolName == SymbolName)\n        Stop();\n}","python":"def on_start(self):\n    api.Symbols.Removed += self.on_symbols_removed\n\ndef on_symbols_removed(self, args):\n    if args.SymbolName == api.SymbolName:\n        api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolRemovedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolRemovedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolSentiment","kind":"interface","name":"SymbolSentiment","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public interface SymbolSentiment","python":"SymbolSentiment","summary":"Represents a symbol sentiment.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        Print($\"Symbol {SymbolName} traders sentiment Buy Percentage: {Symbol.Sentiment.BuyPercentage} and Sell Percentage: {Symbol.Sentiment.SellPercentage}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        self.print_symbol_sentiment()\n\n        api.Symbol.Sentiment.Updated += lambda _: self.print_symbol_sentiment()\n\n    def print_symbol_sentiment(self):\n        print(f\"Symbol {api.SymbolName} traders sentiment Buy Percentage: {api.Symbol.Sentiment.BuyPercentage} and Sell Percentage: {api.Symbol.Sentiment.SellPercentage}\")","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error."}]}
{"id":"P:cAlgo.API.SymbolSentiment.BuyPercentage","kind":"property","name":"BuyPercentage","type":"T:cAlgo.API.SymbolSentiment","namespace":"cAlgo.API","group":"Symbols","csharp":"double BuyPercentage {get;}","python":"symbolSentiment.BuyPercentage: float","summary":"Gets buy percentage if available otherwise 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"if (Symbol.Sentiment.BuyPercentage > 70)\n    Print(\"{0}% of traders are buying {1}\", Symbol.Sentiment.BuyPercentage, SymbolName);","python":"if api.Symbol.Sentiment.BuyPercentage > 70:\n    api.Print(f\"{api.Symbol.Sentiment.BuyPercentage}% of traders are buying {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/BuyPercentage/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/BuyPercentage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error."}]}
{"id":"P:cAlgo.API.SymbolSentiment.SellPercentage","kind":"property","name":"SellPercentage","type":"T:cAlgo.API.SymbolSentiment","namespace":"cAlgo.API","group":"Symbols","csharp":"double SellPercentage {get;}","python":"symbolSentiment.SellPercentage: float","summary":"Gets sell percentage if available otherwise 0.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"Print(\"Sell percentage for {0}: {1}%\", SymbolName, Symbol.Sentiment.SellPercentage);","python":"api.Print(f\"Sell percentage for {api.SymbolName}: {api.Symbol.Sentiment.SellPercentage}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/SellPercentage/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/SellPercentage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error."}]}
{"id":"E:cAlgo.API.SymbolSentiment.Updated","kind":"event","name":"Updated","type":"T:cAlgo.API.SymbolSentiment","namespace":"cAlgo.API","group":"Symbols","csharp":"event Action<SymbolSentimentUpdatedEventArgs> Updated;","python":"symbolSentiment.Updated += handler  # handler(obj: SymbolSentimentUpdatedEventArgs)","summary":"Occurs when symbol sentiment data is updated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<SymbolSentimentUpdatedEventArgs>","pythonType":"Callable[[SymbolSentimentUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbol.Sentiment.Updated += OnSentimentUpdated;\n}\n\nprivate void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)\n{\n    Print(\"{0} sentiment, buy: {1}%, sell: {2}%\", args.SymbolName, args.Sentiment.BuyPercentage, args.Sentiment.SellPercentage);\n}","python":"def on_start(self):\n    api.Symbol.Sentiment.Updated += self.on_sentiment_updated\n\ndef on_sentiment_updated(self, args):\n    api.Print(f\"{args.SymbolName} sentiment, buy: {args.Sentiment.BuyPercentage}%, sell: {args.Sentiment.SellPercentage}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/Updated/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/Updated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error."}]}
{"id":"T:cAlgo.API.SymbolSentimentUpdatedEventArgs","kind":"class","name":"SymbolSentimentUpdatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class SymbolSentimentUpdatedEventArgs","python":"SymbolSentimentUpdatedEventArgs","summary":"Provides data for the price alert added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (Symbol.Sentiment != null)\n        Symbol.Sentiment.Updated += OnSentimentUpdated;\n}\n\nprivate void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)\n{\n    Print(\"{0} sentiment | Buy: {1}% | Sell: {2}%\", args.SymbolName, args.Sentiment.BuyPercentage, args.Sentiment.SellPercentage);\n}","python":"def on_start(self):\n    if api.Symbol.Sentiment is not None:\n        api.Symbol.Sentiment.Updated += self.on_sentiment_updated\n\ndef on_sentiment_updated(self, args):\n    api.Print(f\"{args.SymbolName} sentiment | Buy: {args.Sentiment.BuyPercentage}% | Sell: {args.Sentiment.SellPercentage}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (SymbolSentiment.Updated)."}]}
{"id":"P:cAlgo.API.SymbolSentimentUpdatedEventArgs.Sentiment","kind":"property","name":"Sentiment","type":"T:cAlgo.API.SymbolSentimentUpdatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public SymbolSentiment Sentiment {get;}","python":"symbolSentimentUpdatedEventArgs.Sentiment: SymbolSentiment","summary":"Gets sentiment.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSentiment","pythonType":"SymbolSentiment","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (Symbol.Sentiment != null)\n        Symbol.Sentiment.Updated += OnSentimentUpdated;\n}\n\nprivate void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)\n{\n    if (args.Sentiment.BuyPercentage > 70)\n        Print(\"Most traders are buying: {0}%\", args.Sentiment.BuyPercentage);\n}","python":"def on_start(self):\n    if api.Symbol.Sentiment is not None:\n        api.Symbol.Sentiment.Updated += self.on_sentiment_updated\n\ndef on_sentiment_updated(self, args):\n    if args.Sentiment.BuyPercentage > 70:\n        api.Print(f\"Most traders are buying: {args.Sentiment.BuyPercentage}%\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/Sentiment/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/Sentiment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (SymbolSentiment.Updated)."}]}
{"id":"P:cAlgo.API.SymbolSentimentUpdatedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.SymbolSentimentUpdatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"symbolSentimentUpdatedEventArgs.SymbolName: str","summary":"Gets symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    if (Symbol.Sentiment != null)\n        Symbol.Sentiment.Updated += OnSentimentUpdated;\n}\n\nprivate void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)\n{\n    Print(\"Sentiment updated for {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    if api.Symbol.Sentiment is not None:\n        api.Symbol.Sentiment.Updated += self.on_sentiment_updated\n\ndef on_sentiment_updated(self, args):\n    api.Print(f\"Sentiment updated for {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (SymbolSentiment.Updated)."}]}
{"id":"T:cAlgo.API.SymbolSwapCalculationType","kind":"enum","name":"SymbolSwapCalculationType","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum SymbolSwapCalculationType","python":"SymbolSwapCalculationType","summary":"Defines the types of calculation for symbol SWAP Long/Short.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.SwapCalculationType == SymbolSwapCalculationType.Percentage)\n    Print(\"Swap long: {0}%, swap short: {1}%\", Symbol.SwapLong, Symbol.SwapShort);\nelse\n    Print(\"Swap long: {0}, swap short: {1} ({2})\", Symbol.SwapLong, Symbol.SwapShort, Symbol.SwapCalculationType);","python":"if api.Symbol.SwapCalculationType == SymbolSwapCalculationType.Percentage:\n    api.Print(f\"Swap long: {api.Symbol.SwapLong}%, swap short: {api.Symbol.SwapShort}%\")\nelse:\n    api.Print(f\"Swap long: {api.Symbol.SwapLong}, swap short: {api.Symbol.SwapShort} ({api.Symbol.SwapCalculationType})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolSwapCalculationType.Pips","kind":"enum value","name":"Pips","type":"T:cAlgo.API.SymbolSwapCalculationType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolSwapCalculationType.Pips;","python":"SymbolSwapCalculationType.Pips","summary":"Symbol SWAP Long/Short is in Pips.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSwapCalculationType","pythonType":"SymbolSwapCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolSwapCalculationType.Percentage","kind":"enum value","name":"Percentage","type":"T:cAlgo.API.SymbolSwapCalculationType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolSwapCalculationType.Percentage;","python":"SymbolSwapCalculationType.Percentage","summary":"Symbol SWAP Long/Short is in Percent (%).","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSwapCalculationType","pythonType":"SymbolSwapCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolSwapCalculationType.Points","kind":"enum value","name":"Points","type":"T:cAlgo.API.SymbolSwapCalculationType","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolSwapCalculationType.Points;","python":"SymbolSwapCalculationType.Points","summary":"Symbol SWAP Long/Short is in Points.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolSwapCalculationType","pythonType":"SymbolSwapCalculationType","summary":"","nullable":false},"exceptions":[],"since":"5.6","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSwapCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolTickEventArgs","kind":"class","name":"SymbolTickEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class SymbolTickEventArgs","python":"SymbolTickEventArgs","summary":"Provides data for the symbol tick event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the SymbolTickEventArgs\n    public partial class SymbolTickEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Symbol.Tick += OnSymbolTick;\n        }\n\n        private void OnSymbolTick(SymbolTickEventArgs obj)\n        {\n            Print(\"Symbol: {0} | Ask: {1} | Bid: {2}\", obj.SymbolName, obj.Ask, obj.Bid);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Symbol.Tick += self.on_symbol_tick\n\n    def on_symbol_tick(self, args):\n        print(f\"Symbol: {args.SymbolName} | Ask: {args.Ask} | Bid: {args.Bid}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolTickEventArgs.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.SymbolTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double Ask {get;}","python":"symbolTickEventArgs.Ask: float","summary":"Gets the ask price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbol.Tick += OnSymbolTick;\n}\n\nprivate void OnSymbolTick(SymbolTickEventArgs args)\n{\n    var spreadInPips = (args.Ask - args.Bid) / args.Symbol.PipSize;\n    Print(\"Ask: {0}, spread: {1} pips\", args.Ask, spreadInPips);\n}","python":"def on_start(self):\n    api.Symbol.Tick += self.on_symbol_tick\n\ndef on_symbol_tick(self, args):\n    spreadInPips = (args.Ask - args.Bid) / args.Symbol.PipSize\n    api.Print(f\"Ask: {args.Ask}, spread: {spreadInPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolTickEventArgs.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.SymbolTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public double Bid {get;}","python":"symbolTickEventArgs.Bid: float","summary":"Gets the bid price.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbol.Tick += OnSymbolTick;\n}\n\nprivate void OnSymbolTick(SymbolTickEventArgs args)\n{\n    if (args.Bid < Bars.LowPrices.Last(1))\n        Print(\"Bid {0} broke below the previous bar low\", args.Bid);\n}","python":"def on_start(self):\n    api.Symbol.Tick += self.on_symbol_tick\n\ndef on_symbol_tick(self, args):\n    if args.Bid < api.Bars.LowPrices.Last(1):\n        api.Print(f\"Bid {args.Bid} broke below the previous bar low\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolTickEventArgs.Symbol","kind":"property","name":"Symbol","type":"T:cAlgo.API.SymbolTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Symbol Symbol {get;}","python":"symbolTickEventArgs.Symbol: Symbol","summary":"Gets the symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.GetSymbol(\"GBPUSD\").Tick += OnSymbolTick;\n}\n\nprivate void OnSymbolTick(SymbolTickEventArgs args)\n{\n    Print(\"{0} spread: {1}, digits: {2}\", args.Symbol.Name, args.Symbol.Spread, args.Symbol.Digits);\n}","python":"def on_start(self):\n    api.Symbols.GetSymbol(\"GBPUSD\").Tick += self.on_symbol_tick\n\ndef on_symbol_tick(self, args):\n    api.Print(f\"{args.Symbol.Name} spread: {args.Symbol.Spread}, digits: {args.Symbol.Digits}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Symbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/Symbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolTickEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.SymbolTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"symbolTickEventArgs.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.GetSymbol(\"GBPUSD\").Tick += OnSymbolTick;\n    Symbols.GetSymbol(\"USDJPY\").Tick += OnSymbolTick;\n}\n\nprivate void OnSymbolTick(SymbolTickEventArgs args)\n{\n    Print(\"Tick received for {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.GetSymbol(\"GBPUSD\").Tick += self.on_symbol_tick\n    api.Symbols.GetSymbol(\"USDJPY\").Tick += self.on_symbol_tick\n\ndef on_symbol_tick(self, args):\n    api.Print(f\"Tick received for {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolTradingMode","kind":"enum","name":"SymbolTradingMode","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public enum SymbolTradingMode","python":"SymbolTradingMode","summary":"Defines symbol trading modes.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbol.TradingMode == SymbolTradingMode.FullAccess)\n    ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, \"myLabel\");\nelse\n    Print(\"New orders are not allowed, trading mode: {0}\", Symbol.TradingMode);","python":"if api.Symbol.TradingMode == SymbolTradingMode.FullAccess:\n    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, \"myLabel\")\nelse:\n    api.Print(f\"New orders are not allowed, trading mode: {api.Symbol.TradingMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolTradingMode.FullAccess","kind":"enum value","name":"FullAccess","type":"T:cAlgo.API.SymbolTradingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolTradingMode.FullAccess;","python":"SymbolTradingMode.FullAccess","summary":"Full access mode.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolTradingMode","pythonType":"SymbolTradingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolTradingMode.CloseOnly","kind":"enum value","name":"CloseOnly","type":"T:cAlgo.API.SymbolTradingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolTradingMode.CloseOnly;","python":"SymbolTradingMode.CloseOnly","summary":"Close only mode.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolTradingMode","pythonType":"SymbolTradingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolTradingMode.DisabledWithPendingOrderExecution","kind":"enum value","name":"DisabledWithPendingOrderExecution","type":"T:cAlgo.API.SymbolTradingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolTradingMode.DisabledWithPendingOrderExecution;","python":"SymbolTradingMode.DisabledWithPendingOrderExecution","summary":"Trading is disabled but pending order execution is allowed mode.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolTradingMode","pythonType":"SymbolTradingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.SymbolTradingMode.FullyDisabled","kind":"enum value","name":"FullyDisabled","type":"T:cAlgo.API.SymbolTradingMode","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolTradingMode.FullyDisabled;","python":"SymbolTradingMode.FullyDisabled","summary":"Trading is fully disabled mode.","remarks":null,"parameters":[],"returns":{"csharpType":"SymbolTradingMode","pythonType":"SymbolTradingMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolTradingMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.SymbolUpdatedEventArgs","kind":"class","name":"SymbolUpdatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class SymbolUpdatedEventArgs","python":"SymbolUpdatedEventArgs","summary":"Provides data for the symbols updated event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Updated += OnSymbolsUpdated;\n}\n\nprivate void OnSymbolsUpdated(SymbolUpdatedEventArgs args)\n{\n    Print(\"Symbol updated: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Updated += self.on_symbols_updated\n\ndef on_symbols_updated(self, args):\n    api.Print(f\"Symbol updated: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolUpdatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolUpdatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.SymbolUpdatedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.SymbolUpdatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"symbolUpdatedEventArgs.SymbolName: str","summary":"Gets updated symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Updated += OnSymbolsUpdated;\n}\n\nprivate void OnSymbolsUpdated(SymbolUpdatedEventArgs args)\n{\n    var symbol = Symbols.GetSymbol(args.SymbolName);\n    if (symbol != null)\n        Print(\"{0} updated, min volume: {1}, commission: {2}\", symbol.Name, symbol.VolumeInUnitsMin, symbol.Commission);\n}","python":"def on_start(self):\n    api.Symbols.Updated += self.on_symbols_updated\n\ndef on_symbols_updated(self, args):\n    symbol = api.Symbols.GetSymbol(args.SymbolName)\n    if symbol is not None:\n        api.Print(f\"{symbol.Name} updated, min volume: {symbol.VolumeInUnitsMin}, commission: {symbol.Commission}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolUpdatedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolUpdatedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Symbols","kind":"interface","name":"Symbols","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public interface Symbols","python":"Symbols","summary":"Represents the list of all the symbols with the symbol names as string values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Symbols collection to get symbols data\n    public partial class Test : Indicator\n    {\n        protected override void Initialize()\n        {\n            var scrollViewer = new ScrollViewer\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7,\n                HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,\n                VerticalScrollBarVisibility = ScrollBarVisibility.Visible,\n                Height = 300\n            };\n\n            var grid = new Grid(Symbols.Count + 1, 2)\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            scrollViewer.Content = grid;\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Name\",\n                Margin = 5,\n                ForegroundColor = Color.Black,\n                FontWeight = FontWeight.ExtraBold\n            }, 0, 0);\n\n            grid.AddChild(new TextBlock\n            {\n                Text = \"Description\",\n                Margin = 5,\n                ForegroundColor = Color.Black,\n                FontWeight = FontWeight.ExtraBold\n            }, 0, 1);\n\n            for (int iSymbol = 1; iSymbol < Symbols.Count + 1; iSymbol++)\n            {\n                var symbolName = Symbols[iSymbol - 1];\n                var symbol = Symbols.GetSymbol(symbolName);\n\n                if (!symbol.MarketHours.IsOpened()) continue;\n\n                grid.AddChild(new TextBlock\n                {\n                    Text = symbolName,\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iSymbol, 0);\n\n                grid.AddChild(new Button\n                {\n                    Text = symbol.Description,\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                }, iSymbol, 1);\n            }\n\n            Chart.AddControl(scrollViewer);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        scrollViewer = ScrollViewer()\n        scrollViewer.HorizontalAlignment = HorizontalAlignment.Center\n        scrollViewer.VerticalAlignment = VerticalAlignment.Center\n        scrollViewer.BackgroundColor = Color.Gold\n        scrollViewer.Opacity = 0.7\n        scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto\n        scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible\n        scrollViewer.Height = 300\n\n        grid = Grid(api.Symbols.Count, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        scrollViewer.Content = grid\n\n        for iSymbol in range(api.Symbols.Count):\n            symbolName = api.Symbols[iSymbol]\n            symbol = api.Symbols.GetSymbol(symbolName)\n\n            if symbol.MarketHours.IsOpened() == False:\n                continue\n\n            symbolNameTextBlock = TextBlock()\n            symbolNameTextBlock.Text = symbolName\n            symbolNameTextBlock.Margin = Thickness(5)\n            symbolNameTextBlock.ForegroundColor = Color.Black\n            symbolNameTextBlock.FontWeight = FontWeight.ExtraBold\n\n            grid.AddChild(symbolNameTextBlock, iSymbol, 0)\n\n            symbolDescriptionTextBlock = TextBlock()\n            symbolDescriptionTextBlock.Text = symbol.Description\n            symbolDescriptionTextBlock.Margin = Thickness(5)\n            symbolDescriptionTextBlock.ForegroundColor = Color.Black\n            symbolDescriptionTextBlock.FontWeight = FontWeight.ExtraBold\n\n            grid.AddChild(symbolDescriptionTextBlock, iSymbol, 1)\n\n        api.Chart.AddControl(scrollViewer)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Symbols.Exists(System.String)","kind":"method","name":"Exists","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"bool Exists(string symbolName)","python":"api.Symbols.Exists(symbolName: str) -> bool","summary":"Defines if the specific symbol name exists in the list.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Name of the symbol you want to check"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Symbols.Exists(\"XAUUSD\"))\n    Print(\"Gold price: {0}\", Symbols.GetSymbol(\"XAUUSD\").Bid);\nelse\n    Print(\"XAUUSD is not available\");","python":"if api.Symbols.Exists(\"XAUUSD\"):\n    api.Print(f\"Gold price: {api.Symbols.GetSymbol('XAUUSD').Bid}\")\nelse:\n    api.Print(\"XAUUSD is not available\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Exists/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Exists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Symbols.GetSymbol(System.String)","kind":"method","name":"GetSymbol","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"Symbol GetSymbol(string symbolName)","python":"api.Symbols.GetSymbol(symbolName: str) -> Symbol","summary":"Gets the specific symbol.","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":"Name of the symbol you want to get"}],"returns":{"csharpType":"Symbol","pythonType":"Symbol","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var gbpUsd = Symbols.GetSymbol(\"GBPUSD\");\nif (gbpUsd != null)\n    Print(\"GBPUSD bid: {0}, ask: {1}\", gbpUsd.Bid, gbpUsd.Ask);","python":"gbpUsd = api.Symbols.GetSymbol(\"GBPUSD\")\nif gbpUsd is not None:\n    api.Print(f\"GBPUSD bid: {gbpUsd.Bid}, ask: {gbpUsd.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/GetSymbol/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/GetSymbol/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Symbols.GetSymbols(System.String[])","kind":"method","name":"GetSymbols","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"Symbol[] GetSymbols(string[] symbolNames)","python":"api.Symbols.GetSymbols(symbolNames: list[str]) -> list[Symbol]","summary":"Get multiple symbols at once.","remarks":null,"parameters":[{"name":"symbolNames","csharpType":"string[]","pythonType":"list[str]","summary":"Names of the symbols you want to get"}],"returns":{"csharpType":"Symbol[]","pythonType":"list[Symbol]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var majors = Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\");\nforeach (var symbol in majors)\n    Print(\"{0} spread: {1} pips\", symbol.Name, symbol.Spread / symbol.PipSize);","python":"majors = api.Symbols.GetSymbols(\"EURUSD\", \"GBPUSD\", \"USDJPY\")\nfor symbol in majors:\n    api.Print(f\"{symbol.Name} spread: {symbol.Spread / symbol.PipSize} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/GetSymbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/GetSymbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Symbols.Archived","kind":"property","name":"Archived","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"IReadOnlySet<string> Archived {get;}","python":"api.Symbols.Archived: IReadOnlySet[str]","summary":"Gets the set of only archived symbol names.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlySet<string>","pythonType":"IReadOnlySet[str]","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"Print(\"Archived symbols: {0}\", Symbols.Archived.Count);\nforeach (var symbolName in Symbols.Archived)\n    Print(symbolName);","python":"api.Print(f\"Archived symbols: {api.Symbols.Archived.Count}\")\nfor symbolName in api.Symbols.Archived:\n    api.Print(symbolName)"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Archived/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Archived/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Symbols.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"int Count {get;}","python":"api.Symbols.Count: int","summary":"Gets the total number of the symbols in the list.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Number of symbols: {0}\", Symbols.Count);","python":"api.Print(f\"Number of symbols: {api.Symbols.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Symbols.Custom","kind":"property","name":"Custom","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"IReadOnlySet<string> Custom {get;}","python":"api.Symbols.Custom: IReadOnlySet[str]","summary":"Gets the set of only custom symbol names.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlySet<string>","pythonType":"IReadOnlySet[str]","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"if (Symbols.Custom.Contains(SymbolName))\n    Print(\"{0} is a custom symbol\", SymbolName);\nPrint(\"Custom symbols: {0}\", Symbols.Custom.Count);","python":"if api.Symbols.Custom.Contains(api.SymbolName):\n    api.Print(f\"{api.SymbolName} is a custom symbol\")\napi.Print(f\"Custom symbols: {api.Symbols.Custom.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Custom/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Custom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Symbols.Enabled","kind":"property","name":"Enabled","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"IReadOnlySet<string> Enabled {get;}","python":"api.Symbols.Enabled: IReadOnlySet[str]","summary":"Gets the set of only enabled symbol names.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadOnlySet<string>","pythonType":"IReadOnlySet[str]","summary":"","nullable":false},"exceptions":[],"since":"5.7","deprecated":null,"examples":[{"csharp":"Print(\"Enabled symbols: {0} of {1}\", Symbols.Enabled.Count, Symbols.Count);","python":"api.Print(f\"Enabled symbols: {api.Symbols.Enabled.Count} of {api.Symbols.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Enabled/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Enabled/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Symbols.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"string Item {get;}","python":"api.Symbols[index: int] -> str","summary":"Gets the desired symbol.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"for (var i = 0; i < Math.Min(5, Symbols.Count); i++)\n    Print(\"Symbol {0}: {1}\", i, Symbols[i]);","python":"for i in range(min(5, api.Symbols.Count)):\n    api.Print(f\"Symbol {i}: {api.Symbols[i]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Symbols.Added","kind":"event","name":"Added","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"event Action<SymbolAddedEventArgs> Added;","python":"api.Symbols.Added += handler  # handler(obj: SymbolAddedEventArgs)","summary":"Occurs when a symbol is added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<SymbolAddedEventArgs>","pythonType":"Callable[[SymbolAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Added += OnSymbolAdded;\n}\n\nprivate void OnSymbolAdded(SymbolAddedEventArgs args)\n{\n    Print(\"Symbol added: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Added += self.on_symbol_added\n\ndef on_symbol_added(self, args):\n    api.Print(f\"Symbol added: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Symbols.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"event Action<SymbolRemovedEventArgs> Removed;","python":"api.Symbols.Removed += handler  # handler(obj: SymbolRemovedEventArgs)","summary":"Occurs when a symbol is removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<SymbolRemovedEventArgs>","pythonType":"Callable[[SymbolRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Removed += OnSymbolRemoved;\n}\n\nprivate void OnSymbolRemoved(SymbolRemovedEventArgs args)\n{\n    Print(\"Symbol removed: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Removed += self.on_symbol_removed\n\ndef on_symbol_removed(self, args):\n    api.Print(f\"Symbol removed: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Symbols.Updated","kind":"event","name":"Updated","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"event Action<SymbolUpdatedEventArgs> Updated;","python":"api.Symbols.Updated += handler  # handler(obj: SymbolUpdatedEventArgs)","summary":"Occurs when a symbol is updated.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<SymbolUpdatedEventArgs>","pythonType":"Callable[[SymbolUpdatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Symbols.Updated += OnSymbolUpdated;\n}\n\nprivate void OnSymbolUpdated(SymbolUpdatedEventArgs args)\n{\n    Print(\"Symbol updated: {0}\", args.SymbolName);\n}","python":"def on_start(self):\n    api.Symbols.Updated += self.on_symbol_updated\n\ndef on_symbol_updated(self, args):\n    api.Print(f\"Symbol updated: {args.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Updated/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/Updated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Symbols.GetSymbolInfo(System.String)","kind":"method","name":"GetSymbolInfo","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolInfo GetSymbolInfo(string symbolName)","python":"api.Symbols.GetSymbolInfo(symbolName: str) -> SymbolInfo","summary":"","remarks":null,"parameters":[{"name":"symbolName","csharpType":"string","pythonType":"str","summary":""}],"returns":{"csharpType":"SymbolInfo","pythonType":"SymbolInfo","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use 'GetSymbol' instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Symbols.GetSymbolInfos(System.String[])","kind":"method","name":"GetSymbolInfos","type":"T:cAlgo.API.Symbols","namespace":"cAlgo.API","group":"Symbols","csharp":"SymbolInfo[] GetSymbolInfos(string[] symbolNames)","python":"api.Symbols.GetSymbolInfos(symbolNames: list[str]) -> list[SymbolInfo]","summary":"","remarks":null,"parameters":[{"name":"symbolNames","csharpType":"string[]","pythonType":"list[str]","summary":""}],"returns":{"csharpType":"SymbolInfo[]","pythonType":"list[SymbolInfo]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":"Use 'GetSymbols' instead","examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TabControl","kind":"class","name":"TabControl","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class TabControl : Control","python":"TabControl","summary":"Represents the Tab control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class TestExample : Robot\n{\n    protected override void OnStart()\n    {\n        var tabControl = new TabControl\n        {\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center,\n        };\n\n        var firstTab = new TabItem\n        {\n            Header = new TextBlock {Text = \"First Tab\"},\n            Content = new TextBlock {Text = \"First Tab Content\"}\n        };\n\n        var secondTab = new TabItem\n        {\n            Header = new TextBlock {Text = \"Second Tab\"},\n            Content = new TextBlock {Text = \"Second Tab Content\"}\n        };\n\n        tabControl.AddTab(firstTab);\n        tabControl.AddTab(secondTab);\n\n        Chart.AddControl(tabControl);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def get_text_block(self, text):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        return textBlock\n\n    def initialize(self):\n        tabControl = TabControl()\n        tabControl.HorizontalAlignment = HorizontalAlignment.Center\n        tabControl.VerticalAlignment = VerticalAlignment.Center\n\n        firstTab = TabItem()\n        firstTab.Header = self.get_text_block(\"First Tab\")\n        firstTab.Content = self.get_text_block(\"First Tab Content\")\n\n        secondTab = TabItem()\n        secondTab.Header = self.get_text_block(\"Second Tab\")\n        secondTab.Content = self.get_text_block(\"Second Tab Content\")\n\n        tabControl.AddTab(firstTab)\n        tabControl.AddTab(secondTab)\n\n        api.Chart.AddControl(tabControl)","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TabControl.#ctor","kind":"constructor","name":"TabControl","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public TabControl()","python":"TabControl()","summary":"Initializes a new instance of the TabControl class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl { Width = 300, Height = 200 };\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Positions\" }, Content = new TextBlock { Text = \"Open positions: \" + Positions.Count } });\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Orders\" }, Content = new TextBlock { Text = \"Pending orders: \" + PendingOrders.Count } });\nChart.AddControl(tabControl);","python":"tabControl = TabControl()\ntabControl.Width = 300\ntabControl.Height = 200\nfor title, text in [(\"Positions\", f\"Open positions: {api.Positions.Count}\"), (\"Orders\", f\"Pending orders: {api.PendingOrders.Count}\")]:\n    header = TextBlock()\n    header.Text = title\n    content = TextBlock()\n    content.Text = text\n    tab = TabItem()\n    tab.Header = header\n    tab.Content = content\n    tabControl.AddTab(tab)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TabControl.AddTab(cAlgo.API.TabItem)","kind":"method","name":"AddTab","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public void AddTab(TabItem tab)","python":"tabControl.AddTab(tab: TabItem) -> None","summary":"Adds a new tab.","remarks":null,"parameters":[{"name":"tab","csharpType":"TabItem","pythonType":"TabItem","summary":"Tab"}],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl { Width = 250, Height = 120 };\nvar tab = new TabItem { Header = new TextBlock { Text = SymbolName }, Content = new TextBlock { Text = \"Bid: \" + Symbol.Bid } };\ntabControl.AddTab(tab);\nChart.AddControl(tabControl);","python":"tabControl = TabControl()\nheader = TextBlock()\nheader.Text = api.SymbolName\ncontent = TextBlock()\ncontent.Text = f\"Bid: {api.Symbol.Bid}\"\ntab = TabItem()\ntab.Header = header\ntab.Content = content\ntabControl.AddTab(tab)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/AddTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/AddTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TabControl.RemoveTab(cAlgo.API.TabItem)","kind":"method","name":"RemoveTab","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public bool RemoveTab(TabItem tab)","python":"tabControl.RemoveTab(tab: TabItem) -> bool","summary":"Removes an existing tab.","remarks":null,"parameters":[{"name":"tab","csharpType":"TabItem","pythonType":"TabItem","summary":"Tab"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl();\nvar debugTab = new TabItem { Header = new TextBlock { Text = \"Debug\" } };\ntabControl.AddTab(debugTab);\nChart.AddControl(tabControl);\nvar isRemoved = tabControl.RemoveTab(debugTab);\nPrint(\"Debug tab removed: {0}\", isRemoved);","python":"tabControl = TabControl()\nheader = TextBlock()\nheader.Text = \"Debug\"\ndebugTab = TabItem()\ndebugTab.Header = header\ntabControl.AddTab(debugTab)\napi.Chart.AddControl(tabControl)\nisRemoved = tabControl.RemoveTab(debugTab)\napi.Print(f\"Debug tab removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/RemoveTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/RemoveTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TabControl.SelectedTab","kind":"property","name":"SelectedTab","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public TabItem SelectedTab {get; set;}","python":"tabControl.SelectedTab: TabItem","summary":"Gets or sets the SelectedTab.","remarks":null,"parameters":[],"returns":{"csharpType":"TabItem","pythonType":"TabItem","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl();\nvar settingsTab = new TabItem { Header = new TextBlock { Text = \"Settings\" }, Content = new TextBlock { Text = \"Risk: 1%\" } };\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Trade\" } });\ntabControl.AddTab(settingsTab);\ntabControl.SelectedTab = settingsTab;\nChart.AddControl(tabControl);","python":"tabControl = TabControl()\nheader = TextBlock()\nheader.Text = \"Settings\"\nsettingsTab = TabItem()\nsettingsTab.Header = header\ntabControl.AddTab(settingsTab)\ntabControl.SelectedTab = settingsTab\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/SelectedTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/SelectedTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TabControl.TabStripPlacement","kind":"property","name":"TabStripPlacement","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public Dock TabStripPlacement {get; set;}","python":"tabControl.TabStripPlacement: Dock","summary":"Gets or sets the TabStripPlacement (Default: Top).","remarks":null,"parameters":[],"returns":{"csharpType":"Dock","pythonType":"Dock","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl { TabStripPlacement = Dock.Left, Width = 300, Height = 150 };\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Summary\" }, Content = new TextBlock { Text = \"Balance: \" + Account.Balance } });\nChart.AddControl(tabControl);","python":"tabControl = TabControl()\ntabControl.TabStripPlacement = Dock.Left\ntabControl.Width = 300\ntabControl.Height = 150\nheader = TextBlock()\nheader.Text = \"Summary\"\ntab = TabItem()\ntab.Header = header\ntabControl.AddTab(tab)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/TabStripPlacement/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/TabStripPlacement/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TabControl.Tabs","kind":"property","name":"Tabs","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public IReadonlyList<TabItem> Tabs {get;}","python":"tabControl.Tabs: IReadonlyList[TabItem]","summary":"Get tabs.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<TabItem>","pythonType":"IReadonlyList[TabItem]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl();\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Trade\" } });\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"History\" } });\nChart.AddControl(tabControl);\nPrint(\"Tab count: {0}\", tabControl.Tabs.Count);","python":"tabControl = TabControl()\nfor title in [\"Trade\", \"History\"]:\n    header = TextBlock()\n    header.Text = title\n    tab = TabItem()\n    tab.Header = header\n    tabControl.AddTab(tab)\napi.Chart.AddControl(tabControl)\napi.Print(f\"Tab count: {tabControl.Tabs.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/Tabs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/Tabs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.TabControl.SelectedTabChanged","kind":"event","name":"SelectedTabChanged","type":"T:cAlgo.API.TabControl","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<TabControlSelectedTabChangedEventArgs> SelectedTabChanged;","python":"tabControl.SelectedTabChanged += handler  # handler(obj: TabControlSelectedTabChangedEventArgs)","summary":"Occurs when the selected tab is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TabControlSelectedTabChangedEventArgs>","pythonType":"Callable[[TabControlSelectedTabChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabControl = new TabControl();\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Trade\" } });\ntabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"History\" } });\ntabControl.SelectedTabChanged += args => Print(\"Selected tab index: {0}\", args.TabControl.Tabs.ToList().IndexOf(args.SelectedTab));\nChart.AddControl(tabControl);","python":"def on_start(self):\n    tabControl = TabControl()\n    for title in [\"Trade\", \"History\"]:\n        header = TextBlock()\n        header.Text = title\n        tab = TabItem()\n        tab.Header = header\n        tabControl.AddTab(tab)\n    tabControl.SelectedTabChanged += self.on_selected_tab_changed\n    api.Chart.AddControl(tabControl)\n\ndef on_selected_tab_changed(self, args):\n    api.Print(f\"Selected tab header: {args.SelectedTab.Header.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/SelectedTabChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabControl/SelectedTabChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.TabControlSelectedTabChangedEventArgs","kind":"class","name":"TabControlSelectedTabChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TabControlSelectedTabChangedEventArgs","python":"TabControlSelectedTabChangedEventArgs","summary":"Provides data for the TabControl SelectedTabChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tabControl = new TabControl();\n    tabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Positions\" }, Content = new TextBlock { Text = \"Open positions\" } });\n    tabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Orders\" }, Content = new TextBlock { Text = \"Pending orders\" } });\n    tabControl.SelectedTabChanged += OnSelectedTabChanged;\n    Chart.AddControl(tabControl);\n}\n\nprivate void OnSelectedTabChanged(TabControlSelectedTabChangedEventArgs args)\n{\n    var header = args.SelectedTab?.Header as TextBlock;\n    Print(\"Selected tab: {0} of {1}\", header?.Text, args.TabControl.Tabs.Count);\n}","python":"def on_start(self):\n    tabControl = TabControl()\n    for title in [\"Positions\", \"Orders\"]:\n        header = TextBlock()\n        header.Text = title\n        tab = TabItem()\n        tab.Header = header\n        tabControl.AddTab(tab)\n    tabControl.SelectedTabChanged += self.on_selected_tab_changed\n    api.Chart.AddControl(tabControl)\n\ndef on_selected_tab_changed(self, args):\n    api.Print(f\"Selected tab: {args.SelectedTab.Header.Text} of {args.TabControl.Tabs.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (TabControl.SelectedTabChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (TabControl.SelectedTabChanged)."}]}
{"id":"P:cAlgo.API.TabControlSelectedTabChangedEventArgs.SelectedTab","kind":"property","name":"SelectedTab","type":"T:cAlgo.API.TabControlSelectedTabChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TabItem SelectedTab {get;}","python":"tabControlSelectedTabChangedEventArgs.SelectedTab: TabItem","summary":"Gets selected tab item.","remarks":null,"parameters":[],"returns":{"csharpType":"TabItem","pythonType":"TabItem","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"private TabItem _ordersTab;\n\nprotected override void OnStart()\n{\n    var tabControl = new TabControl();\n    _ordersTab = new TabItem { Header = new TextBlock { Text = \"Orders\" } };\n    tabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Positions\" } });\n    tabControl.AddTab(_ordersTab);\n    tabControl.SelectedTabChanged += OnSelectedTabChanged;\n    Chart.AddControl(tabControl);\n}\n\nprivate void OnSelectedTabChanged(TabControlSelectedTabChangedEventArgs args)\n{\n    if (args.SelectedTab == _ordersTab)\n        Print(\"Orders tab selected, pending orders: {0}\", PendingOrders.Count);\n}","python":"def on_start(self):\n    tabControl = TabControl()\n    positionsHeader = TextBlock()\n    positionsHeader.Text = \"Positions\"\n    positionsTab = TabItem()\n    positionsTab.Header = positionsHeader\n    ordersHeader = TextBlock()\n    ordersHeader.Text = \"Orders\"\n    self.ordersTab = TabItem()\n    self.ordersTab.Header = ordersHeader\n    tabControl.AddTab(positionsTab)\n    tabControl.AddTab(self.ordersTab)\n    tabControl.SelectedTabChanged += self.on_selected_tab_changed\n    api.Chart.AddControl(tabControl)\n\ndef on_selected_tab_changed(self, args):\n    if args.SelectedTab == self.ordersTab:\n        api.Print(f\"Orders tab selected, pending orders: {api.PendingOrders.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/SelectedTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/SelectedTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (TabControl.SelectedTabChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (TabControl.SelectedTabChanged)."}]}
{"id":"P:cAlgo.API.TabControlSelectedTabChangedEventArgs.TabControl","kind":"property","name":"TabControl","type":"T:cAlgo.API.TabControlSelectedTabChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TabControl TabControl {get;}","python":"tabControlSelectedTabChangedEventArgs.TabControl: TabControl","summary":"Gets tab control.","remarks":null,"parameters":[],"returns":{"csharpType":"TabControl","pythonType":"TabControl","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tabControl = new TabControl { TabStripPlacement = Dock.Left };\n    tabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Positions\" } });\n    tabControl.AddTab(new TabItem { Header = new TextBlock { Text = \"Orders\" } });\n    tabControl.SelectedTabChanged += OnSelectedTabChanged;\n    Chart.AddControl(tabControl);\n}\n\nprivate void OnSelectedTabChanged(TabControlSelectedTabChangedEventArgs args)\n{\n    Print(\"Tab control has {0} tabs, strip placement: {1}\", args.TabControl.Tabs.Count, args.TabControl.TabStripPlacement);\n}","python":"def on_start(self):\n    tabControl = TabControl()\n    tabControl.TabStripPlacement = Dock.Left\n    for title in [\"Positions\", \"Orders\"]:\n        header = TextBlock()\n        header.Text = title\n        tab = TabItem()\n        tab.Header = header\n        tabControl.AddTab(tab)\n    tabControl.SelectedTabChanged += self.on_selected_tab_changed\n    api.Chart.AddControl(tabControl)\n\ndef on_selected_tab_changed(self, args):\n    api.Print(f\"Tab control has {args.TabControl.Tabs.Count} tabs, strip placement: {args.TabControl.TabStripPlacement}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/TabControl/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TabControlSelectedTabChangedEventArgs/TabControl/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (TabControl.SelectedTabChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (TabControl.SelectedTabChanged)."}]}
{"id":"T:cAlgo.API.TabItem","kind":"class","name":"TabItem","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class TabItem : Control","python":"TabItem","summary":"Represents the Tab item.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabItem = new TabItem\n{\n    Header = new TextBlock { Text = \"Account\" },\n    Content = new TextBlock { Text = \"Equity: \" + Account.Equity }\n};\nvar tabControl = new TabControl();\ntabControl.AddTab(tabItem);\nChart.AddControl(tabControl);","python":"header = TextBlock()\nheader.Text = \"Account\"\ncontent = TextBlock()\ncontent.Text = f\"Equity: {api.Account.Equity}\"\ntabItem = TabItem()\ntabItem.Header = header\ntabItem.Content = content\ntabControl = TabControl()\ntabControl.AddTab(tabItem)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TabItem.#ctor","kind":"constructor","name":"TabItem","type":"T:cAlgo.API.TabItem","namespace":"cAlgo.API","group":"Controls","csharp":"public TabItem()","python":"TabItem()","summary":"Initializes a new instance of the TabItem class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var tabItem = new TabItem { Header = new TextBlock { Text = \"Orders\" } };\nvar tabControl = new TabControl();\ntabControl.AddTab(tabItem);\nChart.AddControl(tabControl);","python":"header = TextBlock()\nheader.Text = \"Orders\"\ntabItem = TabItem()\ntabItem.Header = header\ntabControl = TabControl()\ntabControl.AddTab(tabItem)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TabItem.Content","kind":"property","name":"Content","type":"T:cAlgo.API.TabItem","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Content {get; set;}","python":"tabItem.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var content = new StackPanel();\nforeach (var position in Positions)\n    content.AddChild(new TextBlock { Text = position.SymbolName + \": \" + position.NetProfit });\nvar tabItem = new TabItem { Header = new TextBlock { Text = \"Positions\" }, Content = content };\nvar tabControl = new TabControl();\ntabControl.AddTab(tabItem);\nChart.AddControl(tabControl);","python":"content = StackPanel()\nfor position in api.Positions:\n    row = TextBlock()\n    row.Text = f\"{position.SymbolName}: {position.NetProfit}\"\n    content.AddChild(row)\nheader = TextBlock()\nheader.Text = \"Positions\"\ntabItem = TabItem()\ntabItem.Header = header\ntabItem.Content = content\ntabControl = TabControl()\ntabControl.AddTab(tabItem)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TabItem.Header","kind":"property","name":"Header","type":"T:cAlgo.API.TabItem","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Header {get; set;}","python":"tabItem.Header: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var header = new StackPanel { Orientation = Orientation.Horizontal };\nheader.AddChild(new Ellipse { Width = 8, Height = 8, FillColor = Color.LimeGreen, Margin = 3 });\nheader.AddChild(new TextBlock { Text = \"Live\" });\nvar tabItem = new TabItem { Header = header };\nvar tabControl = new TabControl();\ntabControl.AddTab(tabItem);\nChart.AddControl(tabControl);","python":"header = TextBlock()\nheader.Text = \"Live\"\ntabItem = TabItem()\ntabItem.Header = header\ntabControl = TabControl()\ntabControl.AddTab(tabItem)\napi.Chart.AddControl(tabControl)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Header/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Header/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.TextAlignment","kind":"enum","name":"TextAlignment","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum TextAlignment","python":"TextAlignment","summary":"The text alignment regarding the anchor point.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TextAlignment property to align the text\n    public partial class TextAlignmentSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n                Width = 200\n            };\n\n            stackPanel.AddChild(new TextBlock { Text = \"Sample text\", TextAlignment = TextAlignment });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n        stackPanel.Width = 200\n\n        textBlock = TextBlock()\n        textBlock.Text = \"Sample Text\"\n        textBlock.TextAlignment = api.TextAlignment\n\n        stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"TextAlignment\",\n      \"DisplayName\": \"Text Alignment\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.TextAlignment\",\n      \"DefaultValue\": \"Center\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextAlignment.Left","kind":"enum value","name":"Left","type":"T:cAlgo.API.TextAlignment","namespace":"cAlgo.API","group":"Controls","csharp":"TextAlignment.Left;","python":"TextAlignment.Left","summary":"Align the text left.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextAlignment.Right","kind":"enum value","name":"Right","type":"T:cAlgo.API.TextAlignment","namespace":"cAlgo.API","group":"Controls","csharp":"TextAlignment.Right;","python":"TextAlignment.Right","summary":"Align the text right.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextAlignment.Center","kind":"enum value","name":"Center","type":"T:cAlgo.API.TextAlignment","namespace":"cAlgo.API","group":"Controls","csharp":"TextAlignment.Center;","python":"TextAlignment.Center","summary":"Center the text vertically.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextAlignment.Justify","kind":"enum value","name":"Justify","type":"T:cAlgo.API.TextAlignment","namespace":"cAlgo.API","group":"Controls","csharp":"TextAlignment.Justify;","python":"TextAlignment.Justify","summary":"Justify the text.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TextBlock","kind":"class","name":"TextBlock","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class TextBlock : Control","python":"TextBlock","summary":"Represents the Text Block - the control to display a non-interactive text.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to add a text block control on your chart\n    public partial class TextBlockSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n                Width = 200\n            };\n\n            stackPanel.AddChild(new TextBlock { Text = Text, FontWeight = FontWeight.ExtraBold, ForegroundColor = Color.Blue });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n        stackPanel.Width = 200\n\n        textBlock = TextBlock()\n        textBlock.Text = api.Text\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Blue\n\n        stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Text\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample text\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TextBlock.#ctor","kind":"constructor","name":"TextBlock","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public TextBlock()","python":"TextBlock()","summary":"Initializes a new instance of the Text Block class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = SymbolName + \" \" + Symbol.Bid, Margin = 10, ForegroundColor = Color.White };\ntextBlock.HorizontalAlignment = HorizontalAlignment.Left;\ntextBlock.VerticalAlignment = VerticalAlignment.Top;\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = f\"{api.SymbolName} {api.Symbol.Bid}\"\ntextBlock.Margin = Thickness(10)\ntextBlock.ForegroundColor = Color.White\ntextBlock.HorizontalAlignment = HorizontalAlignment.Left\ntextBlock.VerticalAlignment = VerticalAlignment.Top\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.LineHeight","kind":"property","name":"LineHeight","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public double LineHeight {get; set;}","python":"textBlock.LineHeight: float","summary":"Gets or sets the height of the line.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Line 1\\nLine 2\\nLine 3\", LineHeight = 24 };\nChart.AddControl(textBlock);\nPrint(\"Line height: {0}\", textBlock.LineHeight);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Line 1\\nLine 2\\nLine 3\"\ntextBlock.LineHeight = 24\napi.Chart.AddControl(textBlock)\napi.Print(f\"Line height: {textBlock.LineHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/LineHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/LineHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.LineStackingStrategy","kind":"property","name":"LineStackingStrategy","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public LineStackingStrategy LineStackingStrategy {get; set;}","python":"textBlock.LineStackingStrategy: LineStackingStrategy","summary":"Gets or sets the mechanism by which a line box is determined for each line of text within the TextBlock.","remarks":null,"parameters":[],"returns":{"csharpType":"LineStackingStrategy","pythonType":"LineStackingStrategy","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Line 1\\nLine 2\", LineHeight = 20, LineStackingStrategy = LineStackingStrategy.BlockLineHeight };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Line 1\\nLine 2\"\ntextBlock.LineHeight = 20\ntextBlock.LineStackingStrategy = LineStackingStrategy.BlockLineHeight\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/LineStackingStrategy/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/LineStackingStrategy/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.Text","kind":"property","name":"Text","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"textBlock.Text: str","summary":"Gets or sets the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock();\ntextBlock.Text = string.Format(\"Spread: {0:F1} pips\", Symbol.Spread / Symbol.PipSize);\nChart.AddControl(textBlock);\nPrint(textBlock.Text);","python":"textBlock = TextBlock()\ntextBlock.Text = f\"Spread: {api.Symbol.Spread / api.Symbol.PipSize:.1f} pips\"\napi.Chart.AddControl(textBlock)\napi.Print(textBlock.Text)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.TextAlignment","kind":"property","name":"TextAlignment","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public TextAlignment TextAlignment {get; set;}","python":"textBlock.TextAlignment: TextAlignment","summary":"Gets or sets the text alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"Centered title\", Width = 200, TextAlignment = TextAlignment.Center };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"Centered title\"\ntextBlock.Width = 200\ntextBlock.TextAlignment = TextAlignment.Center\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.TextTrimming","kind":"property","name":"TextTrimming","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public TextTrimming TextTrimming {get; set;}","python":"textBlock.TextTrimming: TextTrimming","summary":"Gets or sets the text trimming behavior when the content overflows the content area.","remarks":null,"parameters":[],"returns":{"csharpType":"TextTrimming","pythonType":"TextTrimming","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"A very long position label that does not fit\", Width = 120, TextTrimming = TextTrimming.CharacterEllipsis };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"A very long position label that does not fit\"\ntextBlock.Width = 120\ntextBlock.TextTrimming = TextTrimming.CharacterEllipsis\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextTrimming/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextTrimming/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBlock.TextWrapping","kind":"property","name":"TextWrapping","type":"T:cAlgo.API.TextBlock","namespace":"cAlgo.API","group":"Controls","csharp":"public TextWrapping TextWrapping {get; set;}","python":"textBlock.TextWrapping: TextWrapping","summary":"Gets or sets the way how the TextBlock should wrap the text.","remarks":null,"parameters":[],"returns":{"csharpType":"TextWrapping","pythonType":"TextWrapping","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBlock = new TextBlock { Text = \"This trading note is long and wraps onto several lines\", Width = 150, TextWrapping = TextWrapping.Wrap };\nChart.AddControl(textBlock);","python":"textBlock = TextBlock()\ntextBlock.Text = \"This trading note is long and wraps onto several lines\"\ntextBlock.Width = 150\ntextBlock.TextWrapping = TextWrapping.Wrap\napi.Chart.AddControl(textBlock)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBlock/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.TextBox","kind":"class","name":"TextBox","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class TextBox : Control","python":"TextBox","summary":"Represents the text box class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to add a text box control on your chart\n    public partial class TextBoxSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n            };\n\n            var textBox = new TextBox\n            {\n                Text = \"Enter text here...\",\n                FontWeight = FontWeight.ExtraBold,\n                Margin = 5,\n                ForegroundColor = Color.White,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                Width = 150\n            };\n\n            textBox.TextChanged += TextBox_TextChanged;\n\n            stackPanel.AddChild(textBox);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void TextBox_TextChanged(TextChangedEventArgs obj)\n        {\n            Print(\"Text box text changed to: \", obj.TextBox.Text);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n\n        textBox = TextBox()\n        textBox.Text = \"Enter text here...\"\n        textBox.FontWeight = FontWeight.ExtraBold\n        textBox.Margin = Thickness(5)\n        textBox.ForegroundColor = Color.White\n        textBox.HorizontalAlignment = HorizontalAlignment.Center\n        textBox.Width = 150\n\n        textBox.TextChanged += lambda args: api.Print(f\"Text box text changed to: {args.TextBox.Text}\")\n\n        stackPanel.AddChild(textBox)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.TextBox.#ctor","kind":"constructor","name":"TextBox","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public TextBox()","python":"TextBox()","summary":"Initializes a new instance of the TextBox class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeTextBox = new TextBox { Text = \"0.01\", Width = 80 };\nvolumeTextBox.TextChanged += args => Print(\"Volume input: {0}\", args.TextBox.Text);\nChart.AddControl(volumeTextBox);","python":"volumeTextBox = TextBox()\nvolumeTextBox.Text = \"0.01\"\nvolumeTextBox.Width = 80\nvolumeTextBox.TextChanged += lambda args: api.Print(f\"Volume input: {args.TextBox.Text}\")\napi.Chart.AddControl(volumeTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.AcceptsReturn","kind":"property","name":"AcceptsReturn","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool AcceptsReturn {get; set;}","python":"textBox.AcceptsReturn: bool","summary":"Gets or sets a value that indicates how the text editing control responds when the user presses the ENTER key.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var notesTextBox = new TextBox { AcceptsReturn = true, MinLines = 3, Width = 200 };\nChart.AddControl(notesTextBox);","python":"notesTextBox = TextBox()\nnotesTextBox.AcceptsReturn = True\nnotesTextBox.MinLines = 3\nnotesTextBox.Width = 200\napi.Chart.AddControl(notesTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/AcceptsReturn/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/AcceptsReturn/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.AcceptsTab","kind":"property","name":"AcceptsTab","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool AcceptsTab {get; set;}","python":"textBox.AcceptsTab: bool","summary":"Gets or sets a value that indicates how the text editing control responds when the user presses the TAB key.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var scriptTextBox = new TextBox { AcceptsTab = true, AcceptsReturn = true, MinLines = 5, Width = 250 };\nChart.AddControl(scriptTextBox);","python":"scriptTextBox = TextBox()\nscriptTextBox.AcceptsTab = True\nscriptTextBox.AcceptsReturn = True\nscriptTextBox.MinLines = 5\nscriptTextBox.Width = 250\napi.Chart.AddControl(scriptTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/AcceptsTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/AcceptsTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.BorderColor","kind":"property","name":"BorderColor","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BorderColor {get; set;}","python":"textBox.BorderColor: Color","summary":"Gets or sets the color of the text box border.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"0.01\", BorderColor = Color.SteelBlue, BorderThickness = 1 };\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Text = \"0.01\"\ntextBox.BorderColor = Color.SteelBlue\ntextBox.BorderThickness = Thickness(1)\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/BorderColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/BorderColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.BorderThickness","kind":"property","name":"BorderThickness","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness BorderThickness {get; set;}","python":"textBox.BorderThickness: Thickness","summary":"Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"1.0850\", BorderColor = Color.Gray, BorderThickness = new Thickness(0, 0, 0, 1) };\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Text = \"1.0850\"\ntextBox.BorderColor = Color.Gray\ntextBox.BorderThickness = Thickness(0, 0, 0, 1)\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/BorderThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/BorderThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.CaretColor","kind":"property","name":"CaretColor","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public Color CaretColor {get; set;}","python":"textBox.CaretColor: Color","summary":"Gets or sets the color of the insertion caret.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"EURUSD\", CaretColor = Color.Orange };\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Text = \"EURUSD\"\ntextBox.CaretColor = Color.Orange\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/CaretColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/CaretColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.CharacterCasing","kind":"property","name":"CharacterCasing","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public CharacterCasing CharacterCasing {get; set;}","python":"textBox.CharacterCasing: CharacterCasing","summary":"Gets or sets whether the TextBox control modifies the case of characters as they are typed.","remarks":null,"parameters":[],"returns":{"csharpType":"CharacterCasing","pythonType":"CharacterCasing","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var symbolTextBox = new TextBox { Text = \"eurusd\", CharacterCasing = CharacterCasing.Upper, Width = 100 };\nChart.AddControl(symbolTextBox);","python":"symbolTextBox = TextBox()\nsymbolTextBox.Text = \"eurusd\"\nsymbolTextBox.CharacterCasing = CharacterCasing.Upper\nsymbolTextBox.Width = 100\napi.Chart.AddControl(symbolTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/CharacterCasing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/CharacterCasing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.HorizontalScrollBarVisibility","kind":"property","name":"HorizontalScrollBarVisibility","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public ScrollBarVisibility HorizontalScrollBarVisibility {get; set;}","python":"textBox.HorizontalScrollBarVisibility: ScrollBarVisibility","summary":"Defines the horizontal scroll bar visibility.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Width = 150, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto };\ntextBox.Text = \"A long single line of text that needs horizontal scrolling\";\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Width = 150\ntextBox.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto\ntextBox.Text = \"A long single line of text that needs horizontal scrolling\"\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/HorizontalScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/HorizontalScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.IsReadOnly","kind":"property","name":"IsReadOnly","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsReadOnly {get; set;}","python":"textBox.IsReadOnly: bool","summary":"Gets or sets a value indicating whether the current text box is read-only.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var balanceTextBox = new TextBox { Text = Account.Balance.ToString(\"F2\"), IsReadOnly = true };\nChart.AddControl(balanceTextBox);","python":"balanceTextBox = TextBox()\nbalanceTextBox.Text = f\"{api.Account.Balance:.2f}\"\nbalanceTextBox.IsReadOnly = True\napi.Chart.AddControl(balanceTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/IsReadOnly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/IsReadOnly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.IsReadOnlyCaretVisible","kind":"property","name":"IsReadOnlyCaretVisible","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsReadOnlyCaretVisible {get; set;}","python":"textBox.IsReadOnlyCaretVisible: bool","summary":"Gets or sets a value that indicates whether a read-only text box displays a caret.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"Read only, caret visible\", IsReadOnly = true, IsReadOnlyCaretVisible = true };\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Text = \"Read only, caret visible\"\ntextBox.IsReadOnly = True\ntextBox.IsReadOnlyCaretVisible = True\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/IsReadOnlyCaretVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/IsReadOnlyCaretVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.MaxLength","kind":"property","name":"MaxLength","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public int MaxLength {get; set;}","python":"textBox.MaxLength: int","summary":"Gets or sets the maximum number of characters that can be manually entered into the text box.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var labelTextBox = new TextBox { MaxLength = 20, Width = 150 };\nChart.AddControl(labelTextBox);\nPrint(\"Maximum label length: {0}\", labelTextBox.MaxLength);","python":"labelTextBox = TextBox()\nlabelTextBox.MaxLength = 20\nlabelTextBox.Width = 150\napi.Chart.AddControl(labelTextBox)\napi.Print(f\"Maximum label length: {labelTextBox.MaxLength}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MaxLength/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MaxLength/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.MaxLines","kind":"property","name":"MaxLines","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public int MaxLines {get; set;}","python":"textBox.MaxLines: int","summary":"Gets or sets the maximum number of visible lines.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var logTextBox = new TextBox { AcceptsReturn = true, MaxLines = 4, IsReadOnly = true };\nChart.AddControl(logTextBox);\nPrint(\"Maximum lines: {0}\", logTextBox.MaxLines);","python":"logTextBox = TextBox()\nlogTextBox.AcceptsReturn = True\nlogTextBox.MaxLines = 4\nlogTextBox.IsReadOnly = True\napi.Chart.AddControl(logTextBox)\napi.Print(f\"Maximum lines: {logTextBox.MaxLines}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MaxLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MaxLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.MinLines","kind":"property","name":"MinLines","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public int MinLines {get; set;}","python":"textBox.MinLines: int","summary":"Gets or sets the minimum number of visible lines.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var commentTextBox = new TextBox { AcceptsReturn = true, MinLines = 2, MaxLines = 6 };\nChart.AddControl(commentTextBox);\nPrint(\"Minimum lines: {0}\", commentTextBox.MinLines);","python":"commentTextBox = TextBox()\ncommentTextBox.AcceptsReturn = True\ncommentTextBox.MinLines = 2\ncommentTextBox.MaxLines = 6\napi.Chart.AddControl(commentTextBox)\napi.Print(f\"Minimum lines: {commentTextBox.MinLines}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MinLines/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/MinLines/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.SelectionColor","kind":"property","name":"SelectionColor","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public Color SelectionColor {get; set;}","python":"textBox.SelectionColor: Color","summary":"Gets or sets the text color of the current text selection.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"Select this text\", SelectionColor = Color.Yellow, SelectionOpacity = 0.5 };\nChart.AddControl(textBox);","python":"textBox = TextBox()\ntextBox.Text = \"Select this text\"\ntextBox.SelectionColor = Color.Yellow\ntextBox.SelectionOpacity = 0.5\napi.Chart.AddControl(textBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/SelectionColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/SelectionColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.SelectionOpacity","kind":"property","name":"SelectionOpacity","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public double SelectionOpacity {get; set;}","python":"textBox.SelectionOpacity: float","summary":"Gets or sets the opacity of the selected text.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var textBox = new TextBox { Text = \"Highlighted selection\", SelectionOpacity = 0.8 };\nChart.AddControl(textBox);\nPrint(\"Selection opacity: {0}\", textBox.SelectionOpacity);","python":"textBox = TextBox()\ntextBox.Text = \"Highlighted selection\"\ntextBox.SelectionOpacity = 0.8\napi.Chart.AddControl(textBox)\napi.Print(f\"Selection opacity: {textBox.SelectionOpacity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/SelectionOpacity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/SelectionOpacity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.Text","kind":"property","name":"Text","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"textBox.Text: str","summary":"Gets or sets the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeTextBox = new TextBox { Text = \"0.01\" };\nvar buyButton = new Button { Text = \"Buy\" };\nbuyButton.Click += args =>\n{\n    if (double.TryParse(volumeTextBox.Text, out var lots))\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(lots));\n};\nvar panel = new StackPanel();\npanel.AddChild(volumeTextBox);\npanel.AddChild(buyButton);\nChart.AddControl(panel);","python":"volumeTextBox = TextBox()\nvolumeTextBox.Text = \"0.01\"\nbuyButton = Button()\nbuyButton.Text = \"Buy\"\nbuyButton.Click += lambda args: api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(float(volumeTextBox.Text)))\npanel = StackPanel()\npanel.AddChild(volumeTextBox)\npanel.AddChild(buyButton)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.TextAlignment","kind":"property","name":"TextAlignment","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public TextAlignment TextAlignment {get; set;}","python":"textBox.TextAlignment: TextAlignment","summary":"Gets or sets a value that indicates the horizontal alignment of text content.","remarks":null,"parameters":[],"returns":{"csharpType":"TextAlignment","pythonType":"TextAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var priceTextBox = new TextBox { Text = Symbol.Bid.ToString(), Width = 120, TextAlignment = TextAlignment.Right };\nChart.AddControl(priceTextBox);","python":"priceTextBox = TextBox()\npriceTextBox.Text = str(api.Symbol.Bid)\npriceTextBox.Width = 120\npriceTextBox.TextAlignment = TextAlignment.Right\napi.Chart.AddControl(priceTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.TextWrapping","kind":"property","name":"TextWrapping","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public TextWrapping TextWrapping {get; set;}","python":"textBox.TextWrapping: TextWrapping","summary":"Gets or sets how the text box should wrap text.","remarks":null,"parameters":[],"returns":{"csharpType":"TextWrapping","pythonType":"TextWrapping","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var notesTextBox = new TextBox { Width = 200, MinLines = 3, AcceptsReturn = true, TextWrapping = TextWrapping.Wrap };\nChart.AddControl(notesTextBox);","python":"notesTextBox = TextBox()\nnotesTextBox.Width = 200\nnotesTextBox.MinLines = 3\nnotesTextBox.AcceptsReturn = True\nnotesTextBox.TextWrapping = TextWrapping.Wrap\napi.Chart.AddControl(notesTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.TextBox.VerticalScrollBarVisibility","kind":"property","name":"VerticalScrollBarVisibility","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public ScrollBarVisibility VerticalScrollBarVisibility {get; set;}","python":"textBox.VerticalScrollBarVisibility: ScrollBarVisibility","summary":"Defines the vertical scroll bar visibility.","remarks":null,"parameters":[],"returns":{"csharpType":"ScrollBarVisibility","pythonType":"ScrollBarVisibility","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var logTextBox = new TextBox { Width = 250, Height = 80, AcceptsReturn = true, VerticalScrollBarVisibility = ScrollBarVisibility.Visible };\nChart.AddControl(logTextBox);","python":"logTextBox = TextBox()\nlogTextBox.Width = 250\nlogTextBox.Height = 80\nlogTextBox.AcceptsReturn = True\nlogTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Visible\napi.Chart.AddControl(logTextBox)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/VerticalScrollBarVisibility/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/VerticalScrollBarVisibility/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.TextBox.TextChanged","kind":"event","name":"TextChanged","type":"T:cAlgo.API.TextBox","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<TextChangedEventArgs> TextChanged;","python":"textBox.TextChanged += handler  # handler(obj: TextChangedEventArgs)","summary":"Occurs when the text has changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TextChangedEventArgs>","pythonType":"Callable[[TextChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var stopLossTextBox = new TextBox { Text = \"20\", Width = 80 };\nstopLossTextBox.TextChanged += args =>\n{\n    if (double.TryParse(args.TextBox.Text, out var pips))\n        Print(\"Stop loss set to {0} pips\", pips);\n};\nChart.AddControl(stopLossTextBox);","python":"def on_start(self):\n    stopLossTextBox = TextBox()\n    stopLossTextBox.Text = \"20\"\n    stopLossTextBox.Width = 80\n    stopLossTextBox.TextChanged += self.on_text_changed\n    api.Chart.AddControl(stopLossTextBox)\n\ndef on_text_changed(self, args):\n    api.Print(f\"Stop loss input: {args.TextBox.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextBox/TextChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.TextChangedEventArgs","kind":"class","name":"TextChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TextChangedEventArgs","python":"TextChangedEventArgs","summary":"Provides data for the TextChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TextChangedEventArgs\n    public partial class Test : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n            };\n\n            var textBox = new TextBox\n            {\n                Text = \"Enter text here...\",\n                FontWeight = FontWeight.ExtraBold,\n                Margin = 5,\n                ForegroundColor = Color.White,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                Width = 150\n            };\n\n            textBox.TextChanged += OnTextBoxTextChanged;\n\n            stackPanel.AddChild(textBox);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void OnTextBoxTextChanged(TextChangedEventArgs obj)\n        {\n            Print(\"Text box text changed to: {0}\", obj.TextBox.Text);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n\n        textBox = TextBox()\n        textBox.Text = \"Enter text here...\"\n        textBox.FontWeight = FontWeight.ExtraBold\n        textBox.Margin = Thickness(5)\n        textBox.ForegroundColor = Color.White\n        textBox.HorizontalAlignment = HorizontalAlignment.Center\n        textBox.Width = 150\n\n        textBox.TextChanged += self.on_text_box_changed\n\n        stackPanel.AddChild(textBox)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_text_box_changed(self, args):\n        print(f\"Text box text changed to: {args.TextBox.Text}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TextChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TextChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (TextBox.TextChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (TextBox.TextChanged)."}]}
{"id":"P:cAlgo.API.TextChangedEventArgs.TextBox","kind":"property","name":"TextBox","type":"T:cAlgo.API.TextChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TextBox TextBox {get;}","python":"textChangedEventArgs.TextBox: TextBox","summary":"Gets the texbox.","remarks":null,"parameters":[],"returns":{"csharpType":"TextBox","pythonType":"TextBox","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var volumeTextBox = new TextBox { Text = \"10000\", Width = 100 };\n    volumeTextBox.TextChanged += OnVolumeTextChanged;\n    Chart.AddControl(volumeTextBox);\n}\n\nprivate void OnVolumeTextChanged(TextChangedEventArgs args)\n{\n    var isValid = double.TryParse(args.TextBox.Text, out var volume) && volume > 0;\n    args.TextBox.ForegroundColor = isValid ? Color.White : Color.Red;\n}","python":"def on_start(self):\n    volumeTextBox = TextBox()\n    volumeTextBox.Text = \"10000\"\n    volumeTextBox.Width = 100\n    volumeTextBox.TextChanged += self.on_volume_text_changed\n    api.Chart.AddControl(volumeTextBox)\n\ndef on_volume_text_changed(self, args):\n    try:\n        isValid = float(args.TextBox.Text) > 0\n    except ValueError:\n        isValid = False\n    args.TextBox.ForegroundColor = Color.White if isValid else Color.Red"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TextChangedEventArgs/TextBox/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TextChangedEventArgs/TextBox/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (TextBox.TextChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (TextBox.TextChanged)."}]}
{"id":"T:cAlgo.API.TextTrimming","kind":"enum","name":"TextTrimming","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum TextTrimming","python":"TextTrimming","summary":"Describes how text is trimmed when it overflows the edge of its containing box.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TextTrimming property to manage the text trim\n    public partial class TextTrimmingSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n                Width = 100\n            };\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = Text,\n                FontWeight = FontWeight.ExtraBold,\n                ForegroundColor = Color.Blue,\n                TextTrimming = TextTrimming\n            });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n        stackPanel.Width = 100\n\n        textBlock = TextBlock()\n        textBlock.Text = api.Text\n        textBlock.TextTrimming = api.TextTrimming\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Blue\n\n        stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Text\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"very long texttttttttttttttttttttt\"\n    },\n    {\n      \"Name\": \"TextTrimming\",\n      \"DisplayName\": \"Trimming\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.TextTrimming\",\n      \"DefaultValue\": \"CharacterEllipsis\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextTrimming.None","kind":"enum value","name":"None","type":"T:cAlgo.API.TextTrimming","namespace":"cAlgo.API","group":"Controls","csharp":"TextTrimming.None;","python":"TextTrimming.None","summary":"Text is not trimmed.","remarks":null,"parameters":[],"returns":{"csharpType":"TextTrimming","pythonType":"TextTrimming","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextTrimming.CharacterEllipsis","kind":"enum value","name":"CharacterEllipsis","type":"T:cAlgo.API.TextTrimming","namespace":"cAlgo.API","group":"Controls","csharp":"TextTrimming.CharacterEllipsis;","python":"TextTrimming.CharacterEllipsis","summary":"Text is trimmed at a character boundary. An ellipsis (...) is drawn in place of remaining text.","remarks":null,"parameters":[],"returns":{"csharpType":"TextTrimming","pythonType":"TextTrimming","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextTrimming.WordEllipsis","kind":"enum value","name":"WordEllipsis","type":"T:cAlgo.API.TextTrimming","namespace":"cAlgo.API","group":"Controls","csharp":"TextTrimming.WordEllipsis;","python":"TextTrimming.WordEllipsis","summary":"Text is trimmed at a word boundary. An ellipsis (...) is drawn in place of remaining text.","remarks":null,"parameters":[],"returns":{"csharpType":"TextTrimming","pythonType":"TextTrimming","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextTrimming/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TextWrapping","kind":"enum","name":"TextWrapping","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public enum TextWrapping","python":"TextWrapping","summary":"Specifies whether text wraps when it reaches the edge of the containing box.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TextWrapping property to manage the text wrap\n    public partial class TextWrappingSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Opacity = 0.6,\n                Width = 100\n            };\n\n            stackPanel.AddChild(new TextBlock\n            {\n                Text = Text,\n                FontWeight = FontWeight.ExtraBold,\n                ForegroundColor = Color.Blue,\n                TextWrapping = TextWrapping\n            });\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n        stackPanel.Width = 100\n\n        textBlock = TextBlock()\n        textBlock.Text = api.Text\n        textBlock.TextWrapping = api.TextWrapping\n        textBlock.FontWeight = FontWeight.ExtraBold\n        textBlock.ForegroundColor = Color.Blue\n\n        stackPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"Text\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"very long texttttttttttttttttttttt\"\n    },\n    {\n      \"Name\": \"TextWrapping\",\n      \"DisplayName\": \"Wrapping\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.TextWrapping\",\n      \"DefaultValue\": \"NoWrap\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextWrapping.WrapWithOverflow","kind":"enum value","name":"WrapWithOverflow","type":"T:cAlgo.API.TextWrapping","namespace":"cAlgo.API","group":"Controls","csharp":"TextWrapping.WrapWithOverflow;","python":"TextWrapping.WrapWithOverflow","summary":"Line-breaking occurs if the line overflows beyond the available block width. However, a line may overflow beyond the block width if the line breaking algorithm cannot determine a line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.","remarks":null,"parameters":[],"returns":{"csharpType":"TextWrapping","pythonType":"TextWrapping","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextWrapping.NoWrap","kind":"enum value","name":"NoWrap","type":"T:cAlgo.API.TextWrapping","namespace":"cAlgo.API","group":"Controls","csharp":"TextWrapping.NoWrap;","python":"TextWrapping.NoWrap","summary":"No line wrapping is performed.","remarks":null,"parameters":[],"returns":{"csharpType":"TextWrapping","pythonType":"TextWrapping","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TextWrapping.Wrap","kind":"enum value","name":"Wrap","type":"T:cAlgo.API.TextWrapping","namespace":"cAlgo.API","group":"Controls","csharp":"TextWrapping.Wrap;","python":"TextWrapping.Wrap","summary":"Line-breaking occurs if the line overflows beyond the available block width, even if the standard line breaking algorithm cannot determine any line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.","remarks":null,"parameters":[],"returns":{"csharpType":"TextWrapping","pythonType":"TextWrapping","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/TextWrapping/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Thickness","kind":"struct","name":"Thickness","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public sealed struct Thickness : ValueType","python":"Thickness","summary":"Defines the thickness of the frame around the rectangle.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Thickness for defining a chart control margin\n    public partial class ThicknessSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6\n            };\n\n            var rectangle = new Rectangle\n            {\n                StrokeColor = Color.Blue,\n                FillColor = Color.Red,\n                StrokeThickness = 2,\n                Margin = new Thickness(10, 5, 10, 5),\n                Width = 300,\n                Height = 100,\n            };\n\n            stackPanel.AddChild(rectangle);\n\n            Chart.AddControl(stackPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.Opacity = 0.6\n\n        rectangle = Rectangle()\n        rectangle.StrokeColor = Color.Blue\n        rectangle.FillColor = Color.Red\n        rectangle.StrokeThickness = 2\n        rectangle.Margin = Thickness(10, 5, 10, 5)\n        rectangle.Width = 300\n        rectangle.Height = 100\n\n        stackPanel.AddChild(rectangle)\n\n        api.Chart.AddControl(stackPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Thickness.#ctor(System.Double,System.Double,System.Double,System.Double)","kind":"constructor","name":"Thickness","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness(double left, double top, double right, double bottom)","python":"Thickness(left: float, top: float, right: float, bottom: float)","summary":"Initializes a new instance of the Thickness structure.","remarks":null,"parameters":[{"name":"left","csharpType":"double","pythonType":"float","summary":""},{"name":"top","csharpType":"double","pythonType":"float","summary":""},{"name":"right","csharpType":"double","pythonType":"float","summary":""},{"name":"bottom","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var button = new Button { Text = \"Buy\", Margin = new Thickness(10, 5, 10, 5) };\nChart.AddControl(button);\nPrint(\"Left margin: {0}\", button.Margin.Left);","python":"button = Button()\nbutton.Text = \"Buy\"\nbutton.Margin = Thickness(10, 5, 10, 5)\napi.Chart.AddControl(button)\napi.Print(f\"Left margin: {button.Margin.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Thickness.#ctor(System.Double)","kind":"constructor","name":"Thickness","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness(double uniformLength)","python":"Thickness(uniformLength: float)","summary":"Initializes a new instance of the Thickness structure.","remarks":null,"parameters":[{"name":"uniformLength","csharpType":"double","pythonType":"float","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var border = new Border { BorderThickness = new Thickness(2), BorderColor = Color.Gray, Padding = new Thickness(8) };\nborder.Child = new TextBlock { Text = \"Risk: 1%\" };\nChart.AddControl(border);","python":"border = Border()\nborder.BorderThickness = Thickness(2)\nborder.BorderColor = Color.Gray\nborder.Padding = Thickness(8)\ntextBlock = TextBlock()\ntextBlock.Text = \"Risk: 1%\"\nborder.Child = textBlock\napi.Chart.AddControl(border)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Thickness.Bottom","kind":"property","name":"Bottom","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public double Bottom {get; set;}","python":"thickness.Bottom: float","summary":"Gets or sets the thickness of the bottom side of the retangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var padding = new Thickness(5);\npadding.Bottom = 15;\nChart.AddControl(new Border { Padding = padding, BorderThickness = 1, BorderColor = Color.Gray, Child = new TextBlock { Text = \"PnL\" } });\nPrint(\"Bottom: {0}\", padding.Bottom);","python":"padding = Thickness(5)\npadding.Bottom = 15\nborder = Border()\nborder.Padding = padding\ntextBlock = TextBlock()\ntextBlock.Text = \"PnL\"\nborder.Child = textBlock\napi.Chart.AddControl(border)\napi.Print(f\"Bottom: {padding.Bottom}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Bottom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Bottom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Thickness.Left","kind":"property","name":"Left","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public double Left {get; set;}","python":"thickness.Left: float","summary":"Gets or sets the thickness of the left side of the retangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var margin = new Thickness(5);\nmargin.Left = 20;\nChart.AddControl(new TextBlock { Text = \"EURUSD\", Margin = margin });\nPrint(\"Left: {0}\", margin.Left);","python":"margin = Thickness(5)\nmargin.Left = 20\ntextBlock = TextBlock()\ntextBlock.Text = \"EURUSD\"\ntextBlock.Margin = margin\napi.Chart.AddControl(textBlock)\napi.Print(f\"Left: {margin.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Left/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Left/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Thickness.Right","kind":"property","name":"Right","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public double Right {get; set;}","python":"thickness.Right: float","summary":"Gets or sets the thickness of the right side of the retangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var padding = new Thickness(5);\npadding.Right = 15;\nChart.AddControl(new Border { Padding = padding, BorderThickness = 1, BorderColor = Color.Gray, Child = new TextBlock { Text = \"PnL\" } });\nPrint(\"Right: {0}\", padding.Right);","python":"padding = Thickness(5)\npadding.Right = 15\nborder = Border()\nborder.Padding = padding\ntextBlock = TextBlock()\ntextBlock.Text = \"PnL\"\nborder.Child = textBlock\napi.Chart.AddControl(border)\napi.Print(f\"Right: {padding.Right}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Right/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Right/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Thickness.Top","kind":"property","name":"Top","type":"T:cAlgo.API.Thickness","namespace":"cAlgo.API","group":"Controls","csharp":"public double Top {get; set;}","python":"thickness.Top: float","summary":"Gets or sets the thickness of the top side of the retangle.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var margin = new Thickness(5);\nmargin.Top = 20;\nChart.AddControl(new TextBlock { Text = \"EURUSD\", Margin = margin });\nPrint(\"Top: {0}\", margin.Top);","python":"margin = Thickness(5)\nmargin.Top = 20\ntextBlock = TextBlock()\ntextBlock.Text = \"EURUSD\"\ntextBlock.Margin = margin\napi.Chart.AddControl(textBlock)\napi.Print(f\"Top: {margin.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Thickness/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Tick","kind":"struct","name":"Tick","type":null,"namespace":"cAlgo.API","group":"Ticks","csharp":"public sealed struct Tick : ValueType","python":"Tick","summary":"Represents the Tick object.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tick = MarketData.GetTicks().LastTick;\nPrint(\"Tick at {0}, bid: {1}, ask: {2}, spread: {3} pips\", tick.Time, tick.Bid, tick.Ask, (tick.Ask - tick.Bid) / Symbol.PipSize);","python":"tick = api.MarketData.GetTicks().LastTick\napi.Print(f\"Tick at {tick.Time}, bid: {tick.Bid}, ask: {tick.Ask}, spread: {(tick.Ask - tick.Bid) / api.Symbol.PipSize} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Tick.Ask","kind":"property","name":"Ask","type":"T:cAlgo.API.Tick","namespace":"cAlgo.API","group":"Ticks","csharp":"public double Ask {get;}","python":"tick.Ask: float","summary":"Gets the Ask price of tick.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Last tick ask: {0}\", MarketData.GetTicks().LastTick.Ask);","python":"api.Print(f\"Last tick ask: {api.MarketData.GetTicks().LastTick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Ask/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Ask/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Tick.Bid","kind":"property","name":"Bid","type":"T:cAlgo.API.Tick","namespace":"cAlgo.API","group":"Ticks","csharp":"public double Bid {get;}","python":"tick.Bid: float","summary":"Gets the Bid price of tick.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Last tick bid: {0}\", MarketData.GetTicks().LastTick.Bid);","python":"api.Print(f\"Last tick bid: {api.MarketData.GetTicks().LastTick.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Bid/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Bid/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Tick.Time","kind":"property","name":"Time","type":"T:cAlgo.API.Tick","namespace":"cAlgo.API","group":"Ticks","csharp":"public DateTime Time {get;}","python":"tick.Time: DateTime","summary":"Gets the Tick time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Last tick time: {0}\", MarketData.GetTicks().LastTick.Time);","python":"api.Print(f\"Last tick time: {api.MarketData.GetTicks().LastTick.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Tick/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TickVolume","kind":"interface","name":"TickVolume","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TickVolume","python":"TickVolume","summary":"The Tick Volume indicator shows number of ticks for each bar.","remarks":"Tick Volume is the number of ticks per bar.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Tick Volume indicator\n    public partial class TickVolumeSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TickVolume _tickVolume;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _tickVolume = Indicators.TickVolume();\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.Last(1).Close > Bars.Last(2).Close)\n            {\n                ClosePositions(TradeType.Sell);\n\n                if (_tickVolume.Result.Last(1) > _tickVolume.Result.Last(2))\n                    ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.Last(1).Close < Bars.Last(2).Close)\n            {\n                ClosePositions(TradeType.Buy);\n\n                if (_tickVolume.Result.Last(1) > _tickVolume.Result.Last(2))\n                    ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.tickVolume = api.Indicators.TickVolume()\n\n    def on_bar_closed(self):\n        if api.Bars.Last(1).Close > api.Bars.Last(2).Close:\n            self.close_positions(TradeType.Sell)\n\n            if self.tickVolume.Result.Last(1) > self.tickVolume.Result.Last(2):\n                api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.Last(1).Close < api.Bars.Last(2).Close:\n            self.close_positions(TradeType.Buy)\n\n            if self.tickVolume.Result.Last(1) > self.tickVolume.Result.Last(2):\n                api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TickVolume/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TickVolume/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.TickVolume.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.TickVolume","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"tickVolume.Result: IndicatorDataSeries","summary":"The resulting time series of the calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tickVolume = Indicators.TickVolume();\nPrint(\"Ticks in the last closed bar: {0}\", tickVolume.Result.Last(1));","python":"tickVolume = api.Indicators.TickVolume()\napi.Print(f\"Ticks in the last closed bar: {tickVolume.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TickVolume/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TickVolume/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Ticks","kind":"interface","name":"Ticks","type":null,"namespace":"cAlgo.API","group":"Ticks","csharp":"public interface Ticks","python":"Ticks","summary":"Represents the Ticks interface - the collection of Tick objects.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to get a symbol ticks data and handle its tick events\n    public partial class TickSample : Indicator\n    {\n        private Ticks _ticks;\n\n        protected override void Initialize()\n        {\n            // Getting a symbol ticks data\n            _ticks = MarketData.GetTicks(InputSymbolName);\n            // Subscribing to upcoming ticks\n            _ticks.Tick += Ticks_Tick;\n\n            _ticks.HistoryLoaded += Ticks_HistoryLoaded;\n            // You can also pass a callback method instead of subscribing to HistoryLoaded event\n            //_ticks.LoadMoreHistoryAsync(Ticks_HistoryLoaded);\n            _ticks.LoadMoreHistoryAsync();\n\n            _ticks.Reloaded += Ticks_Reloaded;\n        }\n\n        private void Ticks_Reloaded(TicksHistoryLoadedEventArgs obj)\n        {\n            Print(\"Ticks got reloaded\");\n        }\n\n        private void Ticks_HistoryLoaded(TicksHistoryLoadedEventArgs obj)\n        {\n            Print(\"New ticks loaded: #\", obj.Count);\n        }\n\n        private void Ticks_Tick(TicksTickEventArgs obj)\n        {\n            // Printing Last tick inside Ticks collection\n            Print(obj.Ticks.LastTick);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass TicksSample():\n    def initialize(self):\n        # Getting a symbol ticks data\n        self.ticks = api.MarketData.GetTicks(api.InputSymbolName)\n        # Subscribing to upcoming ticks\n        self.ticks.Tick += self.on_ticks_tick\n\n        self.ticks.HistoryLoaded += self.on_ticks_history_loaded\n        # You can also pass a callback method instead of subscribing to HistoryLoaded event\n        self.ticks.LoadMoreHistoryAsync()\n        self.ticks.Reloaded += self.on_ticks_reloaded\n\n    def on_ticks_tick(self, args):\n        api.Print(str(args.Ticks.LastTick))\n\n    def on_ticks_history_loaded(self, args):\n        api.Print(f\"New ticks loaded: #{args.Count}\")\n\n    def on_ticks_reloaded(self, args):\n        api.Print(\"Ticks got reloaded\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"InputSymbolName\",\n      \"DisplayName\": \"Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"EURUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Ticks.GetServerFirstTime","kind":"method","name":"GetServerFirstTime","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"DateTime GetServerFirstTime()","python":"ticks.GetServerFirstTime() -> DateTime","summary":"Returns the first available server tick time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"DateTime of first server tick time","nullable":false},"exceptions":[],"since":"5.1","deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nPrint(\"First server tick: {0}, first loaded tick: {1}\", ticks.GetServerFirstTime(), ticks[0].Time);","python":"ticks = api.MarketData.GetTicks()\napi.Print(f\"First server tick: {ticks.GetServerFirstTime()}, first loaded tick: {ticks[0].Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/GetServerFirstTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/GetServerFirstTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Ticks.Last(System.Int32)","kind":"method","name":"Last","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"Tick Last(int index)","python":"ticks.Last(index: int) -> Tick","summary":"Gets the tick from the end of the list.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Tick Index"}],"returns":{"csharpType":"Tick","pythonType":"Tick","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nvar previousTick = ticks.Last(1);\nPrint(\"Bid change since the previous tick: {0}\", ticks.LastTick.Bid - previousTick.Bid);","python":"ticks = api.MarketData.GetTicks()\npreviousTick = ticks.Last(1)\napi.Print(f\"Bid change since the previous tick: {ticks.LastTick.Bid - previousTick.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Last/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Last/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Ticks.LoadMoreHistory","kind":"method","name":"LoadMoreHistory","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"int LoadMoreHistory()","python":"ticks.LoadMoreHistory() -> int","summary":"Loads more historical ticks. Method returns the number of loaded ticks that were added to the beginning of the collection.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"Number of loaded bars","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nvar loadedCount = ticks.LoadMoreHistory();\nPrint(\"Loaded {0} more ticks, total: {1}\", loadedCount, ticks.Count);","python":"ticks = api.MarketData.GetTicks()\nloadedCount = ticks.LoadMoreHistory()\napi.Print(f\"Loaded {loadedCount} more ticks, total: {ticks.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistory/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistory/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Ticks.LoadMoreHistoryAsync","kind":"method","name":"LoadMoreHistoryAsync","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"void LoadMoreHistoryAsync()","python":"ticks.LoadMoreHistoryAsync() -> None","summary":"Loads more historical ticks asynchronously.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nticks.HistoryLoaded += args => Print(\"Loaded {0} more ticks\", args.Count);\nticks.LoadMoreHistoryAsync();","python":"ticks = api.MarketData.GetTicks()\nticks.HistoryLoaded += lambda args: api.Print(f\"Loaded {args.Count} more ticks\")\nticks.LoadMoreHistoryAsync()"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistoryAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistoryAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Ticks.LoadMoreHistoryAsync(System.Action{cAlgo.API.TicksHistoryLoadedEventArgs})","kind":"method","name":"LoadMoreHistoryAsync","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"void LoadMoreHistoryAsync(Action<TicksHistoryLoadedEventArgs> callback)","python":"ticks.LoadMoreHistoryAsync(callback: Callable[[TicksHistoryLoadedEventArgs], None]) -> None","summary":"Loads more historical ticks asynchronously.","remarks":null,"parameters":[{"name":"callback","csharpType":"Action<TicksHistoryLoadedEventArgs>","pythonType":"Callable[[TicksHistoryLoadedEventArgs], None]","summary":"The callback that will be called after loading more history"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nticks.LoadMoreHistoryAsync(args => Print(\"Loaded {0} more ticks, total: {1}\", args.Count, args.Ticks.Count));","python":"ticks = api.MarketData.GetTicks()\nticks.LoadMoreHistoryAsync(lambda args: api.Print(f\"Loaded {args.Count} more ticks, total: {args.Ticks.Count}\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistoryAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LoadMoreHistoryAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Ticks.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"int Count {get;}","python":"ticks.Count: int","summary":"Gets the number of objects.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nPrint(\"Loaded ticks: {0}\", ticks.Count);","python":"ticks = api.MarketData.GetTicks()\napi.Print(f\"Loaded ticks: {ticks.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Ticks.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"Tick Item {get;}","python":"ticks[index: int] -> Tick","summary":"Gets the specific tick data.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"Tick","pythonType":"Tick","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks();\nvar firstTick = ticks[0];\nPrint(\"First loaded tick at {0}, bid: {1}\", firstTick.Time, firstTick.Bid);","python":"ticks = api.MarketData.GetTicks()\nfirstTick = ticks[0]\napi.Print(f\"First loaded tick at {firstTick.Time}, bid: {firstTick.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Ticks.LastTick","kind":"property","name":"LastTick","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"Tick LastTick {get;}","python":"ticks.LastTick: Tick","summary":"Gets the last tick in the chart.","remarks":null,"parameters":[],"returns":{"csharpType":"Tick","pythonType":"Tick","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var lastTick = MarketData.GetTicks().LastTick;\nPrint(\"Last tick at {0}, bid: {1}, ask: {2}\", lastTick.Time, lastTick.Bid, lastTick.Ask);","python":"lastTick = api.MarketData.GetTicks().LastTick\napi.Print(f\"Last tick at {lastTick.Time}, bid: {lastTick.Bid}, ask: {lastTick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LastTick/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/LastTick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Ticks.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"string SymbolName {get;}","python":"ticks.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetTicks(\"GBPUSD\");\nPrint(\"Ticks symbol: {0}\", ticks.SymbolName);","python":"ticks = api.MarketData.GetTicks(\"GBPUSD\")\napi.Print(f\"Ticks symbol: {ticks.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Ticks.HistoryLoaded","kind":"event","name":"HistoryLoaded","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"event Action<TicksHistoryLoadedEventArgs> HistoryLoaded;","python":"ticks.HistoryLoaded += handler  # handler(obj: TicksHistoryLoadedEventArgs)","summary":"Occurs when more history is loaded due to chart scroll to the left or due to API call.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TicksHistoryLoadedEventArgs>","pythonType":"Callable[[TicksHistoryLoadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Ticks _ticks;\n\nprotected override void OnStart()\n{\n    _ticks = MarketData.GetTicks();\n    _ticks.HistoryLoaded += OnTicksHistoryLoaded;\n    _ticks.LoadMoreHistoryAsync();\n}\n\nprivate void OnTicksHistoryLoaded(TicksHistoryLoadedEventArgs args)\n{\n    Print(\"{0} older ticks loaded, total: {1}\", args.Count, args.Ticks.Count);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks()\n    self.ticks.HistoryLoaded += self.on_ticks_history_loaded\n    self.ticks.LoadMoreHistoryAsync()\n\ndef on_ticks_history_loaded(self, args):\n    api.Print(f\"{args.Count} older ticks loaded, total: {args.Ticks.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/HistoryLoaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/HistoryLoaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Ticks.Reloaded","kind":"event","name":"Reloaded","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"event Action<TicksHistoryLoadedEventArgs> Reloaded;","python":"ticks.Reloaded += handler  # handler(obj: TicksHistoryLoadedEventArgs)","summary":"Occurs when ticks are refreshed due to reconnect.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TicksHistoryLoadedEventArgs>","pythonType":"Callable[[TicksHistoryLoadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Ticks _ticks;\n\nprotected override void OnStart()\n{\n    _ticks = MarketData.GetTicks();\n    _ticks.Reloaded += OnTicksReloaded;\n}\n\nprivate void OnTicksReloaded(TicksHistoryLoadedEventArgs args)\n{\n    Print(\"Ticks reloaded after reconnect, total: {0}\", args.Ticks.Count);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks()\n    self.ticks.Reloaded += self.on_ticks_reloaded\n\ndef on_ticks_reloaded(self, args):\n    api.Print(f\"Ticks reloaded after reconnect, total: {args.Ticks.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Reloaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Reloaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Ticks.Tick","kind":"event","name":"Tick","type":"T:cAlgo.API.Ticks","namespace":"cAlgo.API","group":"Ticks","csharp":"event Action<TicksTickEventArgs> Tick;","python":"ticks.Tick += handler  # handler(obj: TicksTickEventArgs)","summary":"Occurs when a new tick appears.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TicksTickEventArgs>","pythonType":"Callable[[TicksTickEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Ticks _ticks;\n\nprotected override void OnStart()\n{\n    _ticks = MarketData.GetTicks(\"EURUSD\");\n    _ticks.Tick += OnTicksTick;\n}\n\nprivate void OnTicksTick(TicksTickEventArgs args)\n{\n    var tick = args.Ticks.LastTick;\n    Print(\"EURUSD tick at {0}, bid: {1}, ask: {2}\", tick.Time, tick.Bid, tick.Ask);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks(\"EURUSD\")\n    self.ticks.Tick += self.on_ticks_tick\n\ndef on_ticks_tick(self, args):\n    tick = args.Ticks.LastTick\n    api.Print(f\"EURUSD tick at {tick.Time}, bid: {tick.Bid}, ask: {tick.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Tick/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Ticks/Ticks/Tick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TicksHistoryLoadedEventArgs","kind":"class","name":"TicksHistoryLoadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TicksHistoryLoadedEventArgs","python":"TicksHistoryLoadedEventArgs","summary":"Provides data for the tick history loaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TicksHistoryLoadedEventArgs\n    public partial class Test : Indicator\n    {\n        private Ticks _ticks;\n\n        protected override void Initialize()\n        {\n            // Getting a symbol ticks data\n            _ticks = MarketData.GetTicks(InputSymbolName);\n\n            _ticks.HistoryLoaded += OnTicksHistoryLoaded;\n            // You can also pass a callback method instead of subscribing to HistoryLoaded event\n            //_ticks.LoadMoreHistoryAsync(OnTicksHistoryLoaded);\n            _ticks.LoadMoreHistoryAsync();\n\n            _ticks.Reloaded += OnTicksReloaded;\n        }\n\n        private void OnTicksReloaded(TicksHistoryLoadedEventArgs obj)\n        {\n            Print(\"Ticks got reloaded\");\n        }\n\n        private void OnTicksHistoryLoaded(TicksHistoryLoadedEventArgs obj)\n        {\n            Print(\"New ticks loaded: #{0}\", obj.Count);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action\n\nclass Test():\n    def initialize(self):\n        self.ticks = api.MarketData.GetTicks(api.InputSymbolName)\n        self.ticks.HistoryLoaded += self.on_ticks_history_loaded\n        # You can also pass a callback method instead of subscribing to HistoryLoaded event\n        self.ticks.LoadMoreHistoryAsync(Action[TicksHistoryLoadedEventArgs](self.on_ticks_history_loaded))\n        self.ticks.LoadMoreHistoryAsync()\n        self.ticks.Reloaded += self.on_ticks_reloaded\n\n    def on_ticks_history_loaded(self, args):\n        print(\"New ticks loaded: #\", args.Count)\n\n    def on_ticks_reloaded(self, args):\n        print(\"Ticks got reloaded\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"InputSymbolName\",\n      \"DisplayName\": \"Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"EURUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TicksHistoryLoadedEventArgs.Count","kind":"property","name":"Count","type":"T:cAlgo.API.TicksHistoryLoadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int Count {get;}","python":"ticksHistoryLoadedEventArgs.Count: int","summary":"Gets the number of the ticks.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var ticks = MarketData.GetTicks(\"EURUSD\");\n    ticks.HistoryLoaded += OnTicksHistoryLoaded;\n    ticks.LoadMoreHistoryAsync();\n}\n\nprivate void OnTicksHistoryLoaded(TicksHistoryLoadedEventArgs args)\n{\n    Print(\"Loaded {0} more ticks\", args.Count);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks(\"EURUSD\")\n    self.ticks.HistoryLoaded += self.on_ticks_history_loaded\n    self.ticks.LoadMoreHistoryAsync()\n\ndef on_ticks_history_loaded(self, args):\n    api.Print(f\"Loaded {args.Count} more ticks\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TicksHistoryLoadedEventArgs.Ticks","kind":"property","name":"Ticks","type":"T:cAlgo.API.TicksHistoryLoadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Ticks Ticks {get;}","python":"ticksHistoryLoadedEventArgs.Ticks: Ticks","summary":"Gets the tick data.","remarks":null,"parameters":[],"returns":{"csharpType":"Ticks","pythonType":"Ticks","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var ticks = MarketData.GetTicks(\"EURUSD\");\n    ticks.HistoryLoaded += OnTicksHistoryLoaded;\n    ticks.LoadMoreHistoryAsync();\n}\n\nprivate void OnTicksHistoryLoaded(TicksHistoryLoadedEventArgs args)\n{\n    Print(\"{0} now has {1} ticks, last tick bid: {2}\", args.Ticks.SymbolName, args.Ticks.Count, args.Ticks.LastTick.Bid);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks(\"EURUSD\")\n    self.ticks.HistoryLoaded += self.on_ticks_history_loaded\n    self.ticks.LoadMoreHistoryAsync()\n\ndef on_ticks_history_loaded(self, args):\n    api.Print(f\"{args.Ticks.SymbolName} now has {args.Ticks.Count} ticks, last tick bid: {args.Ticks.LastTick.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Ticks/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksHistoryLoadedEventArgs/Ticks/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TicksTickEventArgs","kind":"class","name":"TicksTickEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TicksTickEventArgs","python":"TicksTickEventArgs","summary":"Provides data for the tick event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use TicksTickEventArgs\n    public partial class TicksTickEventArgsSample : Indicator\n    {\n        private Ticks _ticks;\n\n        protected override void Initialize()\n        {\n            // Getting a symbol ticks data\n            _ticks = MarketData.GetTicks(InputSymbolName);\n            // Subscribing to upcoming ticks\n            _ticks.Tick += OnTicksTick;\n        }\n\n        private void OnTicksTick(TicksTickEventArgs obj)\n        {\n            // Printing Last tick inside Ticks collection\n            Print(obj.Ticks.LastTick);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.ticks = api.MarketData.GetTicks(api.InputSymbolName)\n        # Subscribing to upcoming ticks\n        self.ticks.Tick += self.on_ticks_tick\n\n    def on_ticks_tick(self, args):\n        # Printing Last tick inside Ticks collection\n        print(args.Ticks.LastTick)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"InputSymbolName\",\n      \"DisplayName\": \"Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"EURUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksTickEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksTickEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TicksTickEventArgs.Ticks","kind":"property","name":"Ticks","type":"T:cAlgo.API.TicksTickEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Ticks Ticks {get;}","python":"ticksTickEventArgs.Ticks: Ticks","summary":"Gets the Ticks data.","remarks":null,"parameters":[],"returns":{"csharpType":"Ticks","pythonType":"Ticks","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var ticks = MarketData.GetTicks(\"EURUSD\");\n    ticks.Tick += OnTicksTick;\n}\n\nprivate void OnTicksTick(TicksTickEventArgs args)\n{\n    var lastTick = args.Ticks.LastTick;\n    Print(\"{0} | Bid: {1} | Ask: {2} | Time: {3}\", args.Ticks.SymbolName, lastTick.Bid, lastTick.Ask, lastTick.Time);\n}","python":"def on_start(self):\n    self.ticks = api.MarketData.GetTicks(\"EURUSD\")\n    self.ticks.Tick += self.on_ticks_tick\n\ndef on_ticks_tick(self, args):\n    lastTick = args.Ticks.LastTick\n    api.Print(f\"{args.Ticks.SymbolName} | Bid: {lastTick.Bid} | Ask: {lastTick.Ask} | Time: {lastTick.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksTickEventArgs/Ticks/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksTickEventArgs/Ticks/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TimeFrame","kind":"class","name":"TimeFrame","type":null,"namespace":"cAlgo.API","group":"Period","csharp":"public class TimeFrame","python":"TimeFrame","summary":"Contains supported timeframe values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (TimeFrame  < TimeFrame.Daily)\n    Print(\"Intraday Trading\");","python":"if api.TimeFrame  < TimeFrame.Daily:\n    print(\"Intraday Trading\")"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to get a time frame from user via parameters and the get that time frame bars\n    // Also you can use the pre-defined time frames\n    public partial class Test : Indicator\n    {\n        // Getting time frame via a parameter from user\n\n        protected override void Initialize()\n        {\n            Print(\"Name: \", UserSelectedTimeFrame.Name, \" | Short Name: \", UserSelectedTimeFrame.ShortName);\n\n            // Getting another time frame bars data, using user selected time frame\n            var barsBasedOnUserSelectedTimeFrame = MarketData.GetBars(UserSelectedTimeFrame);\n            // Getting another time frame bars data, using pre-defined TimeFrames\n            var barsBasedOnOtherTimeFrame = MarketData.GetBars(TimeFrame.Day2);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Print(f\"Name: {api.UserSelectedTimeFrame.Name} | Short Name: {api.UserSelectedTimeFrame.ShortName}\")\n        # Getting another time frame bars data, using user selected time frame\n        barsBasedOnUserSelectedTimeFrame = api.MarketData.GetBars(api.UserSelectedTimeFrame)\n        # Getting another time frame bars data, using pre-defined TimeFrames\n        barsBasedOnOtherTimeFrame = api.MarketData.GetBars(TimeFrame.Day2)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"UserSelectedTimeFrame\",\n      \"DisplayName\": \"Time Frame\",\n      \"Type\": \"TimeFrame\",\n      \"DefaultValue\": \"Daily\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.TimeFrame.Parse(System.String)","kind":"method","name":"Parse","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Parse(string value)","python":"TimeFrame.Parse(value: str) -> TimeFrame","summary":"It parses a string and if it matched to a timeframe name it returns that time frame otherwise it throws FormatException","remarks":null,"parameters":[{"name":"value","csharpType":"string","pythonType":"str","summary":"Timeframe name"}],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"TimeFrame","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var timeFrame = TimeFrame.Parse(\"Hour4\");\nvar bars = MarketData.GetBars(timeFrame);\nPrint(\"{0} bars loaded: {1}\", timeFrame.ShortName, bars.Count);","python":"timeFrame = TimeFrame.Parse(\"Hour4\")\nbars = api.MarketData.GetBars(timeFrame)\napi.Print(f\"{timeFrame.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Parse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Parse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.TimeFrame.TryParse(System.String,cAlgo.API.TimeFrame@)","kind":"method","name":"TryParse","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static bool TryParse(string value, TimeFrame& timeFrame)","python":"TimeFrame.TryParse(value: str, timeFrame: TimeFrame) -> bool","summary":"It parses a string and if it matched to a timeframe name it sets it to the passed timeFrame parameter","remarks":null,"parameters":[{"name":"value","csharpType":"string","pythonType":"str","summary":"The timeframe name"},{"name":"timeFrame","csharpType":"TimeFrame&","pythonType":"TimeFrame","summary":"The storage variable for the matching timeframe"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if a matching timeframe found otherwise False","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (TimeFrame.TryParse(\"h1\", out var timeFrame))\n    Print(\"Parsed time frame: {0}\", timeFrame.Name);\nelse\n    Print(\"Unknown time frame name\");","python":"success, timeFrame = TimeFrame.TryParse(\"h1\", None)\nif success:\n    api.Print(f\"Parsed time frame: {timeFrame.Name}\")\nelse:\n    api.Print(\"Unknown time frame name\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/TryParse/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/TryParse/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeFrame.Name","kind":"property","name":"Name","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public string Name {get;}","python":"api.TimeFrame.Name: str","summary":"Returns the name of timeframe","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Current time frame: {0}\", TimeFrame.Name);","python":"api.Print(f\"Current time frame: {api.TimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeFrame.ShortName","kind":"property","name":"ShortName","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public string ShortName {get;}","python":"api.TimeFrame.ShortName: str","summary":"Returns the short name of timeframe","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Chart.DrawStaticText(\"timeFrame\", SymbolName + \" \" + TimeFrame.ShortName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray);","python":"api.Chart.DrawStaticText(\"timeFrame\", f\"{api.SymbolName} {api.TimeFrame.ShortName}\", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/ShortName/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/ShortName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Daily","kind":"field","name":"Daily","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Daily;","python":"TimeFrame.Daily: TimeFrame","summary":"Daily / D1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nPrint(\"Yesterday's high: {0}, low: {1}\", dailyBars.HighPrices.Last(1), dailyBars.LowPrices.Last(1));","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\napi.Print(f\"Yesterday's high: {dailyBars.HighPrices.Last(1)}, low: {dailyBars.LowPrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Daily/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Daily/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Day2","kind":"field","name":"Day2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Day2;","python":"TimeFrame.Day2: TimeFrame","summary":"Day2 / D2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Day2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Day2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Day2)\napi.Print(f\"{TimeFrame.Day2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Day2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Day2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Day3","kind":"field","name":"Day3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Day3;","python":"TimeFrame.Day3: TimeFrame","summary":"Day3 / D3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Day3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Day3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Day3)\napi.Print(f\"{TimeFrame.Day3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Day3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Day3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinDaily","kind":"field","name":"HeikinDaily","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinDaily;","python":"TimeFrame.HeikinDaily: TimeFrame","summary":"HeikinDaily / HD1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinDaily);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinDaily.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinDaily)\napi.Print(f\"{TimeFrame.HeikinDaily.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDaily/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDaily/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinDay2","kind":"field","name":"HeikinDay2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinDay2;","python":"TimeFrame.HeikinDay2: TimeFrame","summary":"HeikinDay2 / HD2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinDay2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinDay2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinDay2)\napi.Print(f\"{TimeFrame.HeikinDay2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDay2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDay2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinDay3","kind":"field","name":"HeikinDay3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinDay3;","python":"TimeFrame.HeikinDay3: TimeFrame","summary":"HeikinDay3 / HD3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinDay3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinDay3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinDay3)\napi.Print(f\"{TimeFrame.HeikinDay3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDay3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinDay3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour","kind":"field","name":"HeikinHour","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour;","python":"TimeFrame.HeikinHour: TimeFrame","summary":"HeikinHour / Hh1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour)\napi.Print(f\"{TimeFrame.HeikinHour.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour12","kind":"field","name":"HeikinHour12","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour12;","python":"TimeFrame.HeikinHour12: TimeFrame","summary":"HeikinHour12 / Hh12","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour12);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour12.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour12)\napi.Print(f\"{TimeFrame.HeikinHour12.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour12/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour12/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour2","kind":"field","name":"HeikinHour2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour2;","python":"TimeFrame.HeikinHour2: TimeFrame","summary":"HeikinHour2 / Hh2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour2)\napi.Print(f\"{TimeFrame.HeikinHour2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour3","kind":"field","name":"HeikinHour3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour3;","python":"TimeFrame.HeikinHour3: TimeFrame","summary":"HeikinHour3 / Hh3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour3)\napi.Print(f\"{TimeFrame.HeikinHour3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour4","kind":"field","name":"HeikinHour4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour4;","python":"TimeFrame.HeikinHour4: TimeFrame","summary":"HeikinHour4 / Hh4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour4)\napi.Print(f\"{TimeFrame.HeikinHour4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour6","kind":"field","name":"HeikinHour6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour6;","python":"TimeFrame.HeikinHour6: TimeFrame","summary":"HeikinHour6 / Hh6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour6)\napi.Print(f\"{TimeFrame.HeikinHour6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinHour8","kind":"field","name":"HeikinHour8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinHour8;","python":"TimeFrame.HeikinHour8: TimeFrame","summary":"HeikinHour8 / Hh8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinHour8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinHour8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinHour8)\napi.Print(f\"{TimeFrame.HeikinHour8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinHour8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute","kind":"field","name":"HeikinMinute","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute;","python":"TimeFrame.HeikinMinute: TimeFrame","summary":"HeikinMinute / Hm1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute)\napi.Print(f\"{TimeFrame.HeikinMinute.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute10","kind":"field","name":"HeikinMinute10","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute10;","python":"TimeFrame.HeikinMinute10: TimeFrame","summary":"HeikinMinute10 / Hm10","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute10);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute10.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute10)\napi.Print(f\"{TimeFrame.HeikinMinute10.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute10/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute10/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute15","kind":"field","name":"HeikinMinute15","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute15;","python":"TimeFrame.HeikinMinute15: TimeFrame","summary":"HeikinMinute15 / Hm15","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute15);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute15.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute15)\napi.Print(f\"{TimeFrame.HeikinMinute15.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute15/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute15/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute2","kind":"field","name":"HeikinMinute2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute2;","python":"TimeFrame.HeikinMinute2: TimeFrame","summary":"HeikinMinute2 / Hm2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute2)\napi.Print(f\"{TimeFrame.HeikinMinute2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute20","kind":"field","name":"HeikinMinute20","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute20;","python":"TimeFrame.HeikinMinute20: TimeFrame","summary":"HeikinMinute20 / Hm20","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute20);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute20.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute20)\napi.Print(f\"{TimeFrame.HeikinMinute20.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute20/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute20/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute3","kind":"field","name":"HeikinMinute3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute3;","python":"TimeFrame.HeikinMinute3: TimeFrame","summary":"HeikinMinute3 / Hm3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute3)\napi.Print(f\"{TimeFrame.HeikinMinute3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute30","kind":"field","name":"HeikinMinute30","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute30;","python":"TimeFrame.HeikinMinute30: TimeFrame","summary":"HeikinMinute30 / Hm30","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute30);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute30.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute30)\napi.Print(f\"{TimeFrame.HeikinMinute30.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute30/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute30/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute4","kind":"field","name":"HeikinMinute4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute4;","python":"TimeFrame.HeikinMinute4: TimeFrame","summary":"HeikinMinute4 / Hm4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute4)\napi.Print(f\"{TimeFrame.HeikinMinute4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute45","kind":"field","name":"HeikinMinute45","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute45;","python":"TimeFrame.HeikinMinute45: TimeFrame","summary":"HeikinMinute45 / Hm45","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute45);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute45.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute45)\napi.Print(f\"{TimeFrame.HeikinMinute45.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute45/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute45/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute5","kind":"field","name":"HeikinMinute5","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute5;","python":"TimeFrame.HeikinMinute5: TimeFrame","summary":"HeikinMinute5 / Hm5","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute5);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute5.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute5)\napi.Print(f\"{TimeFrame.HeikinMinute5.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute6","kind":"field","name":"HeikinMinute6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute6;","python":"TimeFrame.HeikinMinute6: TimeFrame","summary":"HeikinMinute6 / Hm6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute6)\napi.Print(f\"{TimeFrame.HeikinMinute6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute7","kind":"field","name":"HeikinMinute7","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute7;","python":"TimeFrame.HeikinMinute7: TimeFrame","summary":"HeikinMinute7 / Hm7","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute7);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute7.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute7)\napi.Print(f\"{TimeFrame.HeikinMinute7.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute7/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute7/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute8","kind":"field","name":"HeikinMinute8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute8;","python":"TimeFrame.HeikinMinute8: TimeFrame","summary":"HeikinMinute8 / Hm8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute8)\napi.Print(f\"{TimeFrame.HeikinMinute8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMinute9","kind":"field","name":"HeikinMinute9","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMinute9;","python":"TimeFrame.HeikinMinute9: TimeFrame","summary":"HeikinMinute9 / Hm9","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMinute9);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMinute9.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMinute9)\napi.Print(f\"{TimeFrame.HeikinMinute9.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute9/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMinute9/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinMonthly","kind":"field","name":"HeikinMonthly","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinMonthly;","python":"TimeFrame.HeikinMonthly: TimeFrame","summary":"HeikinMonthly / HMonth1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinMonthly);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinMonthly.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinMonthly)\napi.Print(f\"{TimeFrame.HeikinMonthly.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMonthly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinMonthly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.HeikinWeekly","kind":"field","name":"HeikinWeekly","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame HeikinWeekly;","python":"TimeFrame.HeikinWeekly: TimeFrame","summary":"HeikinWeekly / HW1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.HeikinWeekly);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.HeikinWeekly.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.HeikinWeekly)\napi.Print(f\"{TimeFrame.HeikinWeekly.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinWeekly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/HeikinWeekly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour","kind":"field","name":"Hour","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour;","python":"TimeFrame.Hour: TimeFrame","summary":"Hour / h1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour)\napi.Print(f\"{TimeFrame.Hour.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour12","kind":"field","name":"Hour12","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour12;","python":"TimeFrame.Hour12: TimeFrame","summary":"Hour12 / h12","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour12);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour12.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour12)\napi.Print(f\"{TimeFrame.Hour12.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour12/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour12/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour2","kind":"field","name":"Hour2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour2;","python":"TimeFrame.Hour2: TimeFrame","summary":"Hour2 / h2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour2)\napi.Print(f\"{TimeFrame.Hour2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour3","kind":"field","name":"Hour3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour3;","python":"TimeFrame.Hour3: TimeFrame","summary":"Hour3 / h3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour3)\napi.Print(f\"{TimeFrame.Hour3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour4","kind":"field","name":"Hour4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour4;","python":"TimeFrame.Hour4: TimeFrame","summary":"Hour4 / h4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour4)\napi.Print(f\"{TimeFrame.Hour4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour6","kind":"field","name":"Hour6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour6;","python":"TimeFrame.Hour6: TimeFrame","summary":"Hour6 / h6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour6)\napi.Print(f\"{TimeFrame.Hour6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Hour8","kind":"field","name":"Hour8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Hour8;","python":"TimeFrame.Hour8: TimeFrame","summary":"Hour8 / h8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Hour8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Hour8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Hour8)\napi.Print(f\"{TimeFrame.Hour8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Hour8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute","kind":"field","name":"Minute","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute;","python":"TimeFrame.Minute: TimeFrame","summary":"Minute / m1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute)\napi.Print(f\"{TimeFrame.Minute.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute10","kind":"field","name":"Minute10","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute10;","python":"TimeFrame.Minute10: TimeFrame","summary":"Minute10 / m10","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute10);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute10.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute10)\napi.Print(f\"{TimeFrame.Minute10.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute10/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute10/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute15","kind":"field","name":"Minute15","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute15;","python":"TimeFrame.Minute15: TimeFrame","summary":"Minute15 / m15","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute15);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute15.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute15)\napi.Print(f\"{TimeFrame.Minute15.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute15/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute15/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute2","kind":"field","name":"Minute2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute2;","python":"TimeFrame.Minute2: TimeFrame","summary":"Minute2 / m2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute2)\napi.Print(f\"{TimeFrame.Minute2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute20","kind":"field","name":"Minute20","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute20;","python":"TimeFrame.Minute20: TimeFrame","summary":"Minute20 / m20","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute20);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute20.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute20)\napi.Print(f\"{TimeFrame.Minute20.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute20/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute20/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute3","kind":"field","name":"Minute3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute3;","python":"TimeFrame.Minute3: TimeFrame","summary":"Minute3 / m3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute3)\napi.Print(f\"{TimeFrame.Minute3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute30","kind":"field","name":"Minute30","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute30;","python":"TimeFrame.Minute30: TimeFrame","summary":"Minute30 / m30","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute30);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute30.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute30)\napi.Print(f\"{TimeFrame.Minute30.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute30/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute30/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute4","kind":"field","name":"Minute4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute4;","python":"TimeFrame.Minute4: TimeFrame","summary":"Minute4 / m4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute4)\napi.Print(f\"{TimeFrame.Minute4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute45","kind":"field","name":"Minute45","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute45;","python":"TimeFrame.Minute45: TimeFrame","summary":"Minute45 / m45","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute45);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute45.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute45)\napi.Print(f\"{TimeFrame.Minute45.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute45/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute45/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute5","kind":"field","name":"Minute5","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute5;","python":"TimeFrame.Minute5: TimeFrame","summary":"Minute5 / m5","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute5);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute5.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute5)\napi.Print(f\"{TimeFrame.Minute5.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute6","kind":"field","name":"Minute6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute6;","python":"TimeFrame.Minute6: TimeFrame","summary":"Minute6 / m6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute6)\napi.Print(f\"{TimeFrame.Minute6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute7","kind":"field","name":"Minute7","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute7;","python":"TimeFrame.Minute7: TimeFrame","summary":"Minute7 / m7","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute7);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute7.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute7)\napi.Print(f\"{TimeFrame.Minute7.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute7/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute7/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute8","kind":"field","name":"Minute8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute8;","python":"TimeFrame.Minute8: TimeFrame","summary":"Minute8 / m8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute8)\napi.Print(f\"{TimeFrame.Minute8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Minute9","kind":"field","name":"Minute9","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Minute9;","python":"TimeFrame.Minute9: TimeFrame","summary":"Minute9 / m9","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Minute9);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Minute9.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Minute9)\napi.Print(f\"{TimeFrame.Minute9.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute9/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Minute9/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Monthly","kind":"field","name":"Monthly","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Monthly;","python":"TimeFrame.Monthly: TimeFrame","summary":"Monthly / Month1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var monthlyBars = MarketData.GetBars(TimeFrame.Monthly);\nPrint(\"Current month open: {0}\", monthlyBars.LastBar.Open);","python":"monthlyBars = api.MarketData.GetBars(TimeFrame.Monthly)\napi.Print(f\"Current month open: {monthlyBars.LastBar.Open}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Monthly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Monthly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range1","kind":"field","name":"Range1","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range1;","python":"TimeFrame.Range1: TimeFrame","summary":"Range1 / Ra1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range1);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range1.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range1)\napi.Print(f\"{TimeFrame.Range1.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range10","kind":"field","name":"Range10","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range10;","python":"TimeFrame.Range10: TimeFrame","summary":"Range10 / Ra10","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range10);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range10.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range10)\napi.Print(f\"{TimeFrame.Range10.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range10/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range10/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range100","kind":"field","name":"Range100","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range100;","python":"TimeFrame.Range100: TimeFrame","summary":"Range100 / Ra100","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range100);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range100.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range100)\napi.Print(f\"{TimeFrame.Range100.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range100/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range100/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range1000","kind":"field","name":"Range1000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range1000;","python":"TimeFrame.Range1000: TimeFrame","summary":"Range1000 / Ra1000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range1000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range1000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range1000)\napi.Print(f\"{TimeFrame.Range1000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range1000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range1000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range10000","kind":"field","name":"Range10000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range10000;","python":"TimeFrame.Range10000: TimeFrame","summary":"Range10000 / Ra10000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range10000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range10000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range10000)\napi.Print(f\"{TimeFrame.Range10000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range10000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range10000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range150","kind":"field","name":"Range150","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range150;","python":"TimeFrame.Range150: TimeFrame","summary":"Range150 / Ra150","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range150);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range150.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range150)\napi.Print(f\"{TimeFrame.Range150.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range150/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range150/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range2","kind":"field","name":"Range2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range2;","python":"TimeFrame.Range2: TimeFrame","summary":"Range2 / Ra2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range2)\napi.Print(f\"{TimeFrame.Range2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range20","kind":"field","name":"Range20","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range20;","python":"TimeFrame.Range20: TimeFrame","summary":"Range20 / Ra20","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range20);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range20.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range20)\napi.Print(f\"{TimeFrame.Range20.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range20/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range20/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range200","kind":"field","name":"Range200","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range200;","python":"TimeFrame.Range200: TimeFrame","summary":"Range200 / Ra200","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range200);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range200.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range200)\napi.Print(f\"{TimeFrame.Range200.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range200/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range200/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range2000","kind":"field","name":"Range2000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range2000;","python":"TimeFrame.Range2000: TimeFrame","summary":"Range2000 / Ra2000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range2000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range2000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range2000)\napi.Print(f\"{TimeFrame.Range2000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range2000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range2000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range3","kind":"field","name":"Range3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range3;","python":"TimeFrame.Range3: TimeFrame","summary":"Range3 / Ra3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range3)\napi.Print(f\"{TimeFrame.Range3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range30","kind":"field","name":"Range30","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range30;","python":"TimeFrame.Range30: TimeFrame","summary":"Range30 / Ra30","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range30);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range30.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range30)\napi.Print(f\"{TimeFrame.Range30.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range30/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range30/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range300","kind":"field","name":"Range300","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range300;","python":"TimeFrame.Range300: TimeFrame","summary":"Range300 / Ra300","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range300);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range300.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range300)\napi.Print(f\"{TimeFrame.Range300.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range300/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range300/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range4","kind":"field","name":"Range4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range4;","python":"TimeFrame.Range4: TimeFrame","summary":"Range4 / Ra4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range4)\napi.Print(f\"{TimeFrame.Range4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range5","kind":"field","name":"Range5","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range5;","python":"TimeFrame.Range5: TimeFrame","summary":"Range5 / Ra5","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range5);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range5.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range5)\napi.Print(f\"{TimeFrame.Range5.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range50","kind":"field","name":"Range50","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range50;","python":"TimeFrame.Range50: TimeFrame","summary":"Range50 / Ra50","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range50);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range50.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range50)\napi.Print(f\"{TimeFrame.Range50.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range50/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range50/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range500","kind":"field","name":"Range500","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range500;","python":"TimeFrame.Range500: TimeFrame","summary":"Range500 / Ra500","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range500);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range500.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range500)\napi.Print(f\"{TimeFrame.Range500.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range500/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range500/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range5000","kind":"field","name":"Range5000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range5000;","python":"TimeFrame.Range5000: TimeFrame","summary":"Range5000 / Ra5000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range5000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range5000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range5000)\napi.Print(f\"{TimeFrame.Range5000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range5000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range5000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range7500","kind":"field","name":"Range7500","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range7500;","python":"TimeFrame.Range7500: TimeFrame","summary":"Range7500 / Ra7500","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range7500);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range7500.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range7500)\napi.Print(f\"{TimeFrame.Range7500.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range7500/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range7500/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range8","kind":"field","name":"Range8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range8;","python":"TimeFrame.Range8: TimeFrame","summary":"Range8 / Ra8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range8)\napi.Print(f\"{TimeFrame.Range8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range80","kind":"field","name":"Range80","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range80;","python":"TimeFrame.Range80: TimeFrame","summary":"Range80 / Ra80","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range80);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range80.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range80)\napi.Print(f\"{TimeFrame.Range80.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range80/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range80/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Range800","kind":"field","name":"Range800","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Range800;","python":"TimeFrame.Range800: TimeFrame","summary":"Range800 / Ra800","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Range800);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Range800.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Range800)\napi.Print(f\"{TimeFrame.Range800.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range800/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Range800/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko1","kind":"field","name":"Renko1","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko1;","python":"TimeFrame.Renko1: TimeFrame","summary":"Renko1 / Re1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko1);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko1.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko1)\napi.Print(f\"{TimeFrame.Renko1.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko1/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko1/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko10","kind":"field","name":"Renko10","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko10;","python":"TimeFrame.Renko10: TimeFrame","summary":"Renko10 / Re10","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko10);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko10.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko10)\napi.Print(f\"{TimeFrame.Renko10.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko10/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko10/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko100","kind":"field","name":"Renko100","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko100;","python":"TimeFrame.Renko100: TimeFrame","summary":"Renko100 / Re100","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko100);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko100.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko100)\napi.Print(f\"{TimeFrame.Renko100.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko100/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko100/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko1000","kind":"field","name":"Renko1000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko1000;","python":"TimeFrame.Renko1000: TimeFrame","summary":"Renko1000 / Re1000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko1000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko1000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko1000)\napi.Print(f\"{TimeFrame.Renko1000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko1000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko1000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko15","kind":"field","name":"Renko15","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko15;","python":"TimeFrame.Renko15: TimeFrame","summary":"Renko15 / Re15","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko15);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko15.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko15)\napi.Print(f\"{TimeFrame.Renko15.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko15/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko15/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko150","kind":"field","name":"Renko150","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko150;","python":"TimeFrame.Renko150: TimeFrame","summary":"Renko150 / Re150","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko150);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko150.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko150)\napi.Print(f\"{TimeFrame.Renko150.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko150/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko150/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko2","kind":"field","name":"Renko2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko2;","python":"TimeFrame.Renko2: TimeFrame","summary":"Renko2 / Re2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko2)\napi.Print(f\"{TimeFrame.Renko2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko20","kind":"field","name":"Renko20","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko20;","python":"TimeFrame.Renko20: TimeFrame","summary":"Renko20 / Re20","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko20);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko20.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko20)\napi.Print(f\"{TimeFrame.Renko20.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko20/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko20/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko200","kind":"field","name":"Renko200","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko200;","python":"TimeFrame.Renko200: TimeFrame","summary":"Renko200 / Re200","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko200);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko200.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko200)\napi.Print(f\"{TimeFrame.Renko200.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko200/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko200/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko2000","kind":"field","name":"Renko2000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko2000;","python":"TimeFrame.Renko2000: TimeFrame","summary":"Renko2000 / Re2000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko2000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko2000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko2000)\napi.Print(f\"{TimeFrame.Renko2000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko2000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko2000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko25","kind":"field","name":"Renko25","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko25;","python":"TimeFrame.Renko25: TimeFrame","summary":"Renko25 / Re25","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko25);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko25.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko25)\napi.Print(f\"{TimeFrame.Renko25.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko25/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko25/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko3","kind":"field","name":"Renko3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko3;","python":"TimeFrame.Renko3: TimeFrame","summary":"Renko3 / Re3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko3)\napi.Print(f\"{TimeFrame.Renko3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko30","kind":"field","name":"Renko30","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko30;","python":"TimeFrame.Renko30: TimeFrame","summary":"Renko30 / Re30","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko30);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko30.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko30)\napi.Print(f\"{TimeFrame.Renko30.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko30/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko30/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko300","kind":"field","name":"Renko300","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko300;","python":"TimeFrame.Renko300: TimeFrame","summary":"Renko300 / Re300","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko300);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko300.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko300)\napi.Print(f\"{TimeFrame.Renko300.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko300/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko300/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko35","kind":"field","name":"Renko35","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko35;","python":"TimeFrame.Renko35: TimeFrame","summary":"Renko35 / Re35","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko35);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko35.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko35)\napi.Print(f\"{TimeFrame.Renko35.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko35/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko35/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko4","kind":"field","name":"Renko4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko4;","python":"TimeFrame.Renko4: TimeFrame","summary":"Renko4 / Re4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko4)\napi.Print(f\"{TimeFrame.Renko4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko40","kind":"field","name":"Renko40","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko40;","python":"TimeFrame.Renko40: TimeFrame","summary":"Renko40 / Re40","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko40);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko40.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko40)\napi.Print(f\"{TimeFrame.Renko40.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko40/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko40/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko45","kind":"field","name":"Renko45","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko45;","python":"TimeFrame.Renko45: TimeFrame","summary":"Renko45 / Re45","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko45);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko45.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko45)\napi.Print(f\"{TimeFrame.Renko45.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko45/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko45/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko5","kind":"field","name":"Renko5","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko5;","python":"TimeFrame.Renko5: TimeFrame","summary":"Renko5 / Re5","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko5);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko5.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko5)\napi.Print(f\"{TimeFrame.Renko5.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko50","kind":"field","name":"Renko50","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko50;","python":"TimeFrame.Renko50: TimeFrame","summary":"Renko50 / Re50","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko50);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko50.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko50)\napi.Print(f\"{TimeFrame.Renko50.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko50/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko50/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko500","kind":"field","name":"Renko500","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko500;","python":"TimeFrame.Renko500: TimeFrame","summary":"Renko500 / Re500","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko500);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko500.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko500)\napi.Print(f\"{TimeFrame.Renko500.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko500/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko500/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko6","kind":"field","name":"Renko6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko6;","python":"TimeFrame.Renko6: TimeFrame","summary":"Renko6 / Re6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko6)\napi.Print(f\"{TimeFrame.Renko6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko7","kind":"field","name":"Renko7","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko7;","python":"TimeFrame.Renko7: TimeFrame","summary":"Renko7 / Re7","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko7);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko7.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko7)\napi.Print(f\"{TimeFrame.Renko7.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko7/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko7/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko8","kind":"field","name":"Renko8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko8;","python":"TimeFrame.Renko8: TimeFrame","summary":"Renko8 / Re8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko8)\napi.Print(f\"{TimeFrame.Renko8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko800","kind":"field","name":"Renko800","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko800;","python":"TimeFrame.Renko800: TimeFrame","summary":"Renko800 / Re800","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko800);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko800.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko800)\napi.Print(f\"{TimeFrame.Renko800.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko800/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko800/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Renko9","kind":"field","name":"Renko9","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Renko9;","python":"TimeFrame.Renko9: TimeFrame","summary":"Renko9 / Re9","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Renko9);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Renko9.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Renko9)\napi.Print(f\"{TimeFrame.Renko9.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko9/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Renko9/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick","kind":"field","name":"Tick","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick;","python":"TimeFrame.Tick: TimeFrame","summary":"Tick / t1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ticks = MarketData.GetBars(TimeFrame.Tick);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick.ShortName, ticks.Count);","python":"ticks = api.MarketData.GetBars(TimeFrame.Tick)\napi.Print(f\"{TimeFrame.Tick.ShortName} bars loaded: {ticks.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick10","kind":"field","name":"Tick10","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick10;","python":"TimeFrame.Tick10: TimeFrame","summary":"Tick10 / t10","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick10);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick10.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick10)\napi.Print(f\"{TimeFrame.Tick10.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick10/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick10/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick100","kind":"field","name":"Tick100","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick100;","python":"TimeFrame.Tick100: TimeFrame","summary":"Tick100 / t100","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick100);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick100.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick100)\napi.Print(f\"{TimeFrame.Tick100.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick100/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick100/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick1000","kind":"field","name":"Tick1000","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick1000;","python":"TimeFrame.Tick1000: TimeFrame","summary":"Tick1000 / t1000","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick1000);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick1000.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick1000)\napi.Print(f\"{TimeFrame.Tick1000.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick1000/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick1000/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick15","kind":"field","name":"Tick15","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick15;","python":"TimeFrame.Tick15: TimeFrame","summary":"Tick15 / t15","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick15);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick15.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick15)\napi.Print(f\"{TimeFrame.Tick15.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick15/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick15/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick150","kind":"field","name":"Tick150","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick150;","python":"TimeFrame.Tick150: TimeFrame","summary":"Tick150 / t150","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick150);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick150.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick150)\napi.Print(f\"{TimeFrame.Tick150.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick150/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick150/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick2","kind":"field","name":"Tick2","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick2;","python":"TimeFrame.Tick2: TimeFrame","summary":"Tick2 / t2","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick2);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick2.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick2)\napi.Print(f\"{TimeFrame.Tick2.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick2/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick2/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick20","kind":"field","name":"Tick20","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick20;","python":"TimeFrame.Tick20: TimeFrame","summary":"Tick20 / t20","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick20);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick20.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick20)\napi.Print(f\"{TimeFrame.Tick20.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick20/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick20/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick200","kind":"field","name":"Tick200","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick200;","python":"TimeFrame.Tick200: TimeFrame","summary":"Tick200 / t200","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick200);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick200.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick200)\napi.Print(f\"{TimeFrame.Tick200.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick200/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick200/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick25","kind":"field","name":"Tick25","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick25;","python":"TimeFrame.Tick25: TimeFrame","summary":"Tick25 / t25","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick25);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick25.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick25)\napi.Print(f\"{TimeFrame.Tick25.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick25/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick25/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick250","kind":"field","name":"Tick250","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick250;","python":"TimeFrame.Tick250: TimeFrame","summary":"Tick250 / t250","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick250);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick250.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick250)\napi.Print(f\"{TimeFrame.Tick250.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick250/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick250/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick3","kind":"field","name":"Tick3","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick3;","python":"TimeFrame.Tick3: TimeFrame","summary":"Tick3 / t3","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick3);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick3.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick3)\napi.Print(f\"{TimeFrame.Tick3.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick3/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick3/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick30","kind":"field","name":"Tick30","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick30;","python":"TimeFrame.Tick30: TimeFrame","summary":"Tick30 / t30","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick30);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick30.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick30)\napi.Print(f\"{TimeFrame.Tick30.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick30/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick30/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick300","kind":"field","name":"Tick300","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick300;","python":"TimeFrame.Tick300: TimeFrame","summary":"Tick300 / t300","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick300);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick300.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick300)\napi.Print(f\"{TimeFrame.Tick300.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick300/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick300/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick4","kind":"field","name":"Tick4","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick4;","python":"TimeFrame.Tick4: TimeFrame","summary":"Tick4 / t4","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick4);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick4.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick4)\napi.Print(f\"{TimeFrame.Tick4.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick4/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick4/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick40","kind":"field","name":"Tick40","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick40;","python":"TimeFrame.Tick40: TimeFrame","summary":"Tick40 / t40","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick40);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick40.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick40)\napi.Print(f\"{TimeFrame.Tick40.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick40/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick40/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick5","kind":"field","name":"Tick5","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick5;","python":"TimeFrame.Tick5: TimeFrame","summary":"Tick5 / t5","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick5);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick5.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick5)\napi.Print(f\"{TimeFrame.Tick5.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick5/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick5/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick50","kind":"field","name":"Tick50","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick50;","python":"TimeFrame.Tick50: TimeFrame","summary":"Tick50 / t50","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick50);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick50.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick50)\napi.Print(f\"{TimeFrame.Tick50.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick50/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick50/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick500","kind":"field","name":"Tick500","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick500;","python":"TimeFrame.Tick500: TimeFrame","summary":"Tick500 / t500","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick500);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick500.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick500)\napi.Print(f\"{TimeFrame.Tick500.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick500/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick500/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick6","kind":"field","name":"Tick6","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick6;","python":"TimeFrame.Tick6: TimeFrame","summary":"Tick6 / t6","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick6);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick6.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick6)\napi.Print(f\"{TimeFrame.Tick6.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick6/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick6/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick60","kind":"field","name":"Tick60","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick60;","python":"TimeFrame.Tick60: TimeFrame","summary":"Tick60 / t60","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick60);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick60.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick60)\napi.Print(f\"{TimeFrame.Tick60.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick60/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick60/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick7","kind":"field","name":"Tick7","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick7;","python":"TimeFrame.Tick7: TimeFrame","summary":"Tick7 / t7","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick7);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick7.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick7)\napi.Print(f\"{TimeFrame.Tick7.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick7/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick7/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick750","kind":"field","name":"Tick750","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick750;","python":"TimeFrame.Tick750: TimeFrame","summary":"Tick750 / t750","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick750);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick750.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick750)\napi.Print(f\"{TimeFrame.Tick750.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick750/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick750/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick8","kind":"field","name":"Tick8","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick8;","python":"TimeFrame.Tick8: TimeFrame","summary":"Tick8 / t8","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick8);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick8.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick8)\napi.Print(f\"{TimeFrame.Tick8.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick8/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick8/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick80","kind":"field","name":"Tick80","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick80;","python":"TimeFrame.Tick80: TimeFrame","summary":"Tick80 / t80","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick80);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick80.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick80)\napi.Print(f\"{TimeFrame.Tick80.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick80/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick80/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick9","kind":"field","name":"Tick9","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick9;","python":"TimeFrame.Tick9: TimeFrame","summary":"Tick9 / t9","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick9);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick9.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick9)\napi.Print(f\"{TimeFrame.Tick9.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick9/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick9/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Tick90","kind":"field","name":"Tick90","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Tick90;","python":"TimeFrame.Tick90: TimeFrame","summary":"Tick90 / t90","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var bars = MarketData.GetBars(TimeFrame.Tick90);\nPrint(\"{0} bars loaded: {1}\", TimeFrame.Tick90.ShortName, bars.Count);","python":"bars = api.MarketData.GetBars(TimeFrame.Tick90)\napi.Print(f\"{TimeFrame.Tick90.ShortName} bars loaded: {bars.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick90/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Tick90/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeFrame.Weekly","kind":"field","name":"Weekly","type":"T:cAlgo.API.TimeFrame","namespace":"cAlgo.API","group":"Period","csharp":"public static TimeFrame Weekly;","python":"TimeFrame.Weekly: TimeFrame","summary":"Weekly / W1","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame","pythonType":"TimeFrame","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var weeklyBars = MarketData.GetBars(TimeFrame.Weekly);\nPrint(\"Last week's close: {0}\", weeklyBars.ClosePrices.Last(1));","python":"weeklyBars = api.MarketData.GetBars(TimeFrame.Weekly)\napi.Print(f\"Last week's close: {weeklyBars.ClosePrices.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Weekly/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrame/Weekly/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TimeFrameManager","kind":"interface","name":"TimeFrameManager","type":null,"namespace":"cAlgo.API","group":"TimeFrame","csharp":"public interface TimeFrameManager","python":"TimeFrameManager","summary":"Provides access to TimeFrames API for plugins.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\") ?? TimeFrameManager.Custom.Add(\"My Custom TF\");\nTimeFrameManager.Favorite.Add(TimeFrame.Hour4);\nPrint(\"Custom time frame: {0}, favorite time frames: {1}\", customTimeFrame.Name, TimeFrameManager.Favorite.Count());","python":"customTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is None:\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\napi.TimeFrameManager.Favorite.Add(TimeFrame.Hour4)\napi.Print(f\"Custom time frame: {customTimeFrame.Name}, favorite time frames: {len(list(api.TimeFrameManager.Favorite))}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TimeFrameManager.Custom","kind":"property","name":"Custom","type":"T:cAlgo.API.TimeFrameManager","namespace":"cAlgo.API","group":"TimeFrame","csharp":"CustomTimeFrames Custom {get;}","python":"api.TimeFrameManager.Custom: CustomTimeFrames","summary":"Provides access to Custom TimeFrames API.","remarks":null,"parameters":[],"returns":{"csharpType":"CustomTimeFrames","pythonType":"CustomTimeFrames","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"var customTimeFrame = TimeFrameManager.Custom.Get(\"My Custom TF\") ?? TimeFrameManager.Custom.Add(\"My Custom TF\");\nPrint(\"Custom time frame: {0}\", customTimeFrame.Name);","python":"customTimeFrame = api.TimeFrameManager.Custom.Get(\"My Custom TF\")\nif customTimeFrame is None:\n    customTimeFrame = api.TimeFrameManager.Custom.Add(\"My Custom TF\")\napi.Print(f\"Custom time frame: {customTimeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/Custom/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/Custom/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TimeFrameManager.Favorite","kind":"property","name":"Favorite","type":"T:cAlgo.API.TimeFrameManager","namespace":"cAlgo.API","group":"TimeFrame","csharp":"FavoriteTimeFrames Favorite {get;}","python":"api.TimeFrameManager.Favorite: FavoriteTimeFrames","summary":"Provides access to Favorite TimeFrames API.","remarks":null,"parameters":[],"returns":{"csharpType":"FavoriteTimeFrames","pythonType":"FavoriteTimeFrames","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"foreach (var timeFrame in TimeFrameManager.Favorite)\n    Print(\"Favorite time frame: {0}\", timeFrame.Name);","python":"for timeFrame in api.TimeFrameManager.Favorite:\n    api.Print(f\"Favorite time frame: {timeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/Favorite/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/TimeFrameManager/Favorite/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TimeFrames","kind":"interface","name":"TimeFrames","type":null,"namespace":"cAlgo.API","group":"Period","csharp":"public interface TimeFrames","python":"TimeFrames","summary":"Represents collection of all time frames including custom time frames.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        Print($\"TimeFrames Count: {TimeFrames.Count()}\");\n\n        foreach (var timeFrame in TimeFrames)\n        {\n            Print($\"Name: {timeFrame.Name}, ShortName: {timeFrame.ShortName}\");\n        }\n\n        TimeFrames.Added += args => Print($\"TimeFrames added: {string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name))}\");\n        TimeFrames.Removed += args => Print($\"TimeFrames removed: {string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name))}\");\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def on_start(self):\n        print(f\"TimeFrames Count: {len(list(api.TimeFrames))}\")\n\n        for timeFrame in api.TimeFrames:\n            print(f\"Name: {timeFrame.Name}, ShortName: {timeFrame.ShortName}\")\n\n        api.TimeFrames.Added += lambda args: print(\"TimeFrames added: \" + \", \".join([tf.Name for tf in args.TimeFrames]))\n        api.TimeFrames.Removed += lambda args: print(\"TimeFrames removed: \" + \", \".join([tf.Name for tf in args.TimeFrames]))","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."},{"name":"Cloud","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."}]}
{"id":"E:cAlgo.API.TimeFrames.Added","kind":"event","name":"Added","type":"T:cAlgo.API.TimeFrames","namespace":"cAlgo.API","group":"Period","csharp":"event Action<TimeFramesAddedEventArgs> Added;","python":"api.TimeFrames.Added += handler  # handler(obj: TimeFramesAddedEventArgs)","summary":"Occurs when new TimeFrames are added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TimeFramesAddedEventArgs>","pythonType":"Callable[[TimeFramesAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Added += OnTimeFramesAdded;\n}\n\nprivate void OnTimeFramesAdded(TimeFramesAddedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"Time frame added: {0} ({1})\", timeFrame.Name, timeFrame.ShortName);\n}","python":"def on_start(self):\n    api.TimeFrames.Added += self.on_time_frames_added\n\ndef on_time_frames_added(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"Time frame added: {timeFrame.Name} ({timeFrame.ShortName})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."},{"name":"Cloud","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."}]}
{"id":"E:cAlgo.API.TimeFrames.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.TimeFrames","namespace":"cAlgo.API","group":"Period","csharp":"event Action<TimeFramesRemovedEventArgs> Removed;","python":"api.TimeFrames.Removed += handler  # handler(obj: TimeFramesRemovedEventArgs)","summary":"Occurs when TimeFrames are removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TimeFramesRemovedEventArgs>","pythonType":"Callable[[TimeFramesRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Removed += OnTimeFramesRemoved;\n}\n\nprivate void OnTimeFramesRemoved(TimeFramesRemovedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"Time frame removed: {0}\", timeFrame.Name);\n}","python":"def on_start(self):\n    api.TimeFrames.Removed += self.on_time_frames_removed\n\ndef on_time_frames_removed(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"Time frame removed: {timeFrame.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Period/TimeFrames/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."},{"name":"Cloud","support":"Partial","behaviour":"Lists only the standard built-in time frames, no custom ones. Added and Removed are never raised."}]}
{"id":"T:cAlgo.API.TimeFramesAddedEventArgs","kind":"class","name":"TimeFramesAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TimeFramesAddedEventArgs","python":"TimeFramesAddedEventArgs","summary":"Provides data for the TimeFrames Added event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Added += OnTimeFramesAdded;\n}\n\nprivate void OnTimeFramesAdded(TimeFramesAddedEventArgs args)\n{\n    Print(\"Time frames added: {0}\", string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name)));\n}","python":"def on_start(self):\n    api.TimeFrames.Added += self.on_time_frames_added\n\ndef on_time_frames_added(self, args):\n    api.Print(\"Time frames added: \" + \", \".join([str(timeFrame) for timeFrame in args.TimeFrames]))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeFramesAddedEventArgs.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.TimeFramesAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TimeFrame[] TimeFrames {get;}","python":"timeFramesAddedEventArgs.TimeFrames: list[TimeFrame]","summary":"Gets the added time frames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame[]","pythonType":"list[TimeFrame]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Added += OnTimeFramesAdded;\n}\n\nprivate void OnTimeFramesAdded(TimeFramesAddedEventArgs args)\n{\n    foreach (var timeFrame in args.TimeFrames)\n        Print(\"New time frame available: {0}\", timeFrame);\n}","python":"def on_start(self):\n    api.TimeFrames.Added += self.on_time_frames_added\n\ndef on_time_frames_added(self, args):\n    for timeFrame in args.TimeFrames:\n        api.Print(f\"New time frame available: {timeFrame}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesAddedEventArgs/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesAddedEventArgs/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TimeFramesRemovedEventArgs","kind":"class","name":"TimeFramesRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TimeFramesRemovedEventArgs","python":"TimeFramesRemovedEventArgs","summary":"Provides data for the TimeFrames Removed event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Removed += OnTimeFramesRemoved;\n}\n\nprivate void OnTimeFramesRemoved(TimeFramesRemovedEventArgs args)\n{\n    Print(\"Time frames removed: {0}\", string.Join(\", \", args.TimeFrames.Select(timeFrame => timeFrame.Name)));\n}","python":"def on_start(self):\n    api.TimeFrames.Removed += self.on_time_frames_removed\n\ndef on_time_frames_removed(self, args):\n    api.Print(\"Time frames removed: \" + \", \".join([str(timeFrame) for timeFrame in args.TimeFrames]))"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeFramesRemovedEventArgs.TimeFrames","kind":"property","name":"TimeFrames","type":"T:cAlgo.API.TimeFramesRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TimeFrame[] TimeFrames {get;}","python":"timeFramesRemovedEventArgs.TimeFrames: list[TimeFrame]","summary":"Gets the removed time frames.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeFrame[]","pythonType":"list[TimeFrame]","summary":"","nullable":false},"exceptions":[],"since":"5.3","deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TimeFrames.Removed += OnTimeFramesRemoved;\n}\n\nprivate void OnTimeFramesRemoved(TimeFramesRemovedEventArgs args)\n{\n    if (args.TimeFrames.Contains(TimeFrame))\n        Print(\"The current time frame {0} was removed\", TimeFrame);\n}","python":"def on_start(self):\n    api.TimeFrames.Removed += self.on_time_frames_removed\n\ndef on_time_frames_removed(self, args):\n    if api.TimeFrame in args.TimeFrames:\n        api.Print(f\"The current time frame {api.TimeFrame} was removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesRemovedEventArgs/TimeFrames/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TimeFramesRemovedEventArgs/TimeFrames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TimeSeries","kind":"interface","name":"TimeSeries","type":null,"namespace":"cAlgo.API","group":"Data Series","csharp":"public interface TimeSeries","python":"TimeSeries","summary":"A series of values that represent time like Bars.OpenTimes","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use Bars OpenTimes Time Series\n    public partial class TimeSeriesSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            // Every Bars object has a time series which is the open times of bars\n            var timeSeries = Bars.OpenTimes;\n\n            Print(\"Count: \", timeSeries.Count);\n\n            // You can get another bars index by using TimeSeries GetIndexByTime/GetIndexByExactTime methods\n\n            var dailyBars = MarketData.GetBars(TimeFrame.Daily);\n\n            var dailyBarsIndex = timeSeries.GetIndexByTime(dailyBars.OpenTimes.LastValue);\n\n            var open = Bars.OpenPrices[dailyBarsIndex];\n\n            Print(\"Daily Bars Index: \", dailyBarsIndex, \" | Open: \", open);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass TimeSeriesSample():\n    def initialize(self):\n        # Every Bars object has a time series which is the open times of bars\n        timeSeries = api.Bars.OpenTimes\n\n        api.Print(f\"Count: {timeSeries.Count}\")\n\n        # You can get another bars index by using TimeSeries GetIndexByTime/GetIndexByExactTime methods\n        dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\n        dailyBarsIndex = timeSeries.GetIndexByTime(dailyBars.OpenTimes.LastValue)\n        openPrice = api.Bars.OpenPrices[dailyBarsIndex]\n        api.Print(f\"Daily Bars Index: {dailyBarsIndex} | Open: {openPrice}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": false\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.TimeSeries.GetIndexByExactTime(System.DateTime)","kind":"method","name":"GetIndexByExactTime","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"int GetIndexByExactTime(DateTime dateTime)","python":"timeSeries.GetIndexByExactTime(dateTime: DateTime) -> int","summary":"Find the index in the different time frame series.","remarks":null,"parameters":[{"name":"dateTime","csharpType":"DateTime","pythonType":"DateTime","summary":"The open time of the bar at this index"}],"returns":{"csharpType":"int","pythonType":"int","summary":"Exact index of bar at passed time","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var hourlyBars = MarketData.GetBars(TimeFrame.Hour);\nvar hourlyIndex = hourlyBars.OpenTimes.GetIndexByExactTime(Bars.OpenTimes.LastValue);\nif (hourlyIndex >= 0)\n    Print(\"Hourly bar with the same open time: {0}\", hourlyBars[hourlyIndex].Close);\nelse\n    Print(\"No hourly bar opened exactly at {0}\", Bars.OpenTimes.LastValue);","python":"hourlyBars = api.MarketData.GetBars(TimeFrame.Hour)\nhourlyIndex = hourlyBars.OpenTimes.GetIndexByExactTime(api.Bars.OpenTimes.LastValue)\nif hourlyIndex >= 0:\n    api.Print(f\"Hourly bar with the same open time: {hourlyBars[hourlyIndex].Close}\")\nelse:\n    api.Print(f\"No hourly bar opened exactly at {api.Bars.OpenTimes.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/GetIndexByExactTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/GetIndexByExactTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.TimeSeries.GetIndexByTime(System.DateTime)","kind":"method","name":"GetIndexByTime","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"int GetIndexByTime(DateTime dateTime)","python":"timeSeries.GetIndexByTime(dateTime: DateTime) -> int","summary":"Find the index in the different time frame series.","remarks":null,"parameters":[{"name":"dateTime","csharpType":"DateTime","pythonType":"DateTime","summary":"The open time of the bar at this index"}],"returns":{"csharpType":"int","pythonType":"int","summary":"Index of bar at passed time","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var dailyBars = MarketData.GetBars(TimeFrame.Daily);\nvar dailyIndex = dailyBars.OpenTimes.GetIndexByTime(Bars.OpenTimes.LastValue);\nPrint(\"Daily bar containing the current bar opened at {0}\", dailyBars.OpenTimes[dailyIndex]);","python":"dailyBars = api.MarketData.GetBars(TimeFrame.Daily)\ndailyIndex = dailyBars.OpenTimes.GetIndexByTime(api.Bars.OpenTimes.LastValue)\napi.Print(f\"Daily bar containing the current bar opened at {dailyBars.OpenTimes[dailyIndex]}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/GetIndexByTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/GetIndexByTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.TimeSeries.Last(System.Int32)","kind":"method","name":"Last","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"DateTime Last(int index)","python":"timeSeries.Last(index: int) -> DateTime","summary":"Access a value in the data series certain number of bars ago.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"Number of bars ago"}],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var openTime = Bars.OpenTimes.Last(5);\nPrint(\"The bar five bars ago opened at {0}\", openTime);","python":"openTime = api.Bars.OpenTimes.Last(5)\napi.Print(f\"The bar five bars ago opened at {openTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Last/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Last/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeSeries.Count","kind":"property","name":"Count","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"int Count {get;}","python":"timeSeries.Count: int","summary":"Gets the number of elements contained in the series.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Open times count: {0}\", Bars.OpenTimes.Count);","python":"api.Print(f\"Open times count: {api.Bars.OpenTimes.Count}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeSeries.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"DateTime Item {get;}","python":"timeSeries[index: int] -> DateTime","summary":"Returns the DateTime value at the specified index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":"The index of the returned value within the series."}],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var firstBarTime = Bars.OpenTimes[0];\nPrint(\"The first loaded bar opened at {0}\", firstBarTime);","python":"firstBarTime = api.Bars.OpenTimes[0]\napi.Print(f\"The first loaded bar opened at {firstBarTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TimeSeries.LastValue","kind":"property","name":"LastValue","type":"T:cAlgo.API.TimeSeries","namespace":"cAlgo.API","group":"Data Series","csharp":"DateTime LastValue {get;}","python":"timeSeries.LastValue: DateTime","summary":"Gets the last value of this time series.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var openTime = Bars.OpenTimes.LastValue;\nPrint(\"The current bar opened at {0}\", openTime);","python":"openTime = api.Bars.OpenTimes.LastValue\napi.Print(f\"The current bar opened at {openTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/LastValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/TimeSeries/LastValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TimeSeriesMovingAverage","kind":"interface","name":"TimeSeriesMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TimeSeriesMovingAverage","python":"TimeSeriesMovingAverage","summary":"A Time Series Moving Average is moving average based on linear regression forecast.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TimeSeriesMovingAverage _timeSeriesMovingAverage;\n\nprotected override void Initialize()\n{\n    _timeSeriesMovingAverage = Indicators.TimeSeriesMovingAverage(Bars.ClosePrices, 9);\n}\n\npublic override void Calculate(int index)\n{\n    //Print the current value of TimeSeries Moving Average to the log\n    Print(\"The current TimeSeries Moving Average  is {0}\", _timeSeriesMovingAverage.Result[index]);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nimport math\n\nclass Test():\n    def initialize(self):\n        self.timeSeriesMovingAverage = api.Indicators.TimeSeriesMovingAverage(api.Bars.ClosePrices, 9)\n\n    def calculate(self, index):\n        # Print the current value of TimeSeries Moving Average to the log\n        api.Print(f\"The current TimeSeries Moving Average is {self.timeSeriesMovingAverage.Result[index]}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Time Series Moving Average indicator\n    public partial class TimeSeriesMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TimeSeriesMovingAverage _fastTimeSeriesMovingAverage;\n\n        private TimeSeriesMovingAverage _slowTimeSeriesMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastTimeSeriesMovingAverage = Indicators.TimeSeriesMovingAverage(FastMaSource, FastMaPeriod);\n            _slowTimeSeriesMovingAverage = Indicators.TimeSeriesMovingAverage(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastTimeSeriesMovingAverage.Result.HasCrossedAbove(_slowTimeSeriesMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastTimeSeriesMovingAverage.Result.HasCrossedBelow(_slowTimeSeriesMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TimeSeriesMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastTimeSeriesMovingAverage = api.Indicators.TimeSeriesMovingAverage(api.FastMaSource, api.FastMaPeriod)\n        self.slowTimeSeriesMovingAverage = api.Indicators.TimeSeriesMovingAverage(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastTimeSeriesMovingAverage.Result, self.slowTimeSeriesMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastTimeSeriesMovingAverage.Result, self.slowTimeSeriesMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TimeSeriesMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TimeSeriesMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TimeZones","kind":"class","name":"TimeZones","type":null,"namespace":"cAlgo.API","group":"Utility","csharp":"public static class TimeZones","python":"TimeZones","summary":"Standard TimeZones class.","remarks":"Sets the timezone for all the robot or indicator datetime references. C# and Python algos set it the same way, with the TimeZone key of config.json.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    // A new cBot or indicator uses the UTC time zone by default\n    // To change it, set the TimeZone key of config.json to the value of any TimeZones constant\n    public partial class TimeZoneSample : Robot\n    {\n        protected override void OnStart()\n        {\n            Print(\"Algo time: {0}, UTC time: {1}, time zone: {2}\", Time, TimeInUtc, TimeZone.DisplayName);\n        }\n    }\n}","python":"class TimeZoneSample():\n    def on_start(self):\n        api.Print(f\"Algo time: {api.Time}, UTC time: {api.TimeInUtc}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Eastern Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.AlaskanStandardTime","kind":"field","name":"AlaskanStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string AlaskanStandardTime;","python":"TimeZones.AlaskanStandardTime: str","summary":"(GMT-09:00) Alaska","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Alaskan Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AlaskanStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AlaskanStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.ArabStandardTime","kind":"field","name":"ArabStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string ArabStandardTime;","python":"TimeZones.ArabStandardTime: str","summary":"(GMT+03:00) Kuwait, Riyadh","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Arab Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.ArabianStandardTime","kind":"field","name":"ArabianStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string ArabianStandardTime;","python":"TimeZones.ArabianStandardTime: str","summary":"(GMT+04:00) Abu Dhabi, Muscat","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Arabian Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabianStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabianStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.ArabicStandardTime","kind":"field","name":"ArabicStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string ArabicStandardTime;","python":"TimeZones.ArabicStandardTime: str","summary":"(GMT+03:00) Baghdad","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Arabic Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabicStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ArabicStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.AtlanticStandardTime","kind":"field","name":"AtlanticStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string AtlanticStandardTime;","python":"TimeZones.AtlanticStandardTime: str","summary":"(GMT-04:00) Atlantic Time (Canada)","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Atlantic Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AtlanticStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AtlanticStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.AzoresStandardTime","kind":"field","name":"AzoresStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string AzoresStandardTime;","python":"TimeZones.AzoresStandardTime: str","summary":"(GMT-01:00) Azores","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Azores Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AzoresStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/AzoresStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CanadaCentralStandardTime","kind":"field","name":"CanadaCentralStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CanadaCentralStandardTime;","python":"TimeZones.CanadaCentralStandardTime: str","summary":"(GMT-06:00) Saskatchewan","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Canada Central Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CanadaCentralStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CanadaCentralStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CapeVerdeStandardTime","kind":"field","name":"CapeVerdeStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CapeVerdeStandardTime;","python":"TimeZones.CapeVerdeStandardTime: str","summary":"(GMT-01:00) Cape Verde Islands","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Cape Verde Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CapeVerdeStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CapeVerdeStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CaucasusStandardTime","kind":"field","name":"CaucasusStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CaucasusStandardTime;","python":"TimeZones.CaucasusStandardTime: str","summary":"(GMT+04:00) Baku, Tbilisi, Yerevan","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Caucasus Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CaucasusStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CaucasusStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CenAustraliaStandardTime","kind":"field","name":"CenAustraliaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CenAustraliaStandardTime;","python":"TimeZones.CenAustraliaStandardTime: str","summary":"(GMT+09:30) Adelaide","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Cen. Australia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CenAustraliaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CenAustraliaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralAmericaStandardTime","kind":"field","name":"CentralAmericaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralAmericaStandardTime;","python":"TimeZones.CentralAmericaStandardTime: str","summary":"(GMT-06:00) Central America","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central America Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralAmericaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralAmericaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralAsiaStandardTime","kind":"field","name":"CentralAsiaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralAsiaStandardTime;","python":"TimeZones.CentralAsiaStandardTime: str","summary":"(GMT+06:00) Astana, Dhaka","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central Asia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralAsiaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralAsiaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralEuropeStandardTime","kind":"field","name":"CentralEuropeStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralEuropeStandardTime;","python":"TimeZones.CentralEuropeStandardTime: str","summary":"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central Europe Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralEuropeStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralEuropeStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralEuropeanStandardTime","kind":"field","name":"CentralEuropeanStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralEuropeanStandardTime;","python":"TimeZones.CentralEuropeanStandardTime: str","summary":"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central European Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralEuropeanStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralEuropeanStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralPacificStandardTime","kind":"field","name":"CentralPacificStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralPacificStandardTime;","python":"TimeZones.CentralPacificStandardTime: str","summary":"(GMT+11:00) Magadan, Solomon Islands, New Caledonia","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central Pacific Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralPacificStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralPacificStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.CentralStandardTime","kind":"field","name":"CentralStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string CentralStandardTime;","python":"TimeZones.CentralStandardTime: str","summary":"(GMT-06:00) Central Time (US and Canada","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Central Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/CentralStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.ChinaStandardTime","kind":"field","name":"ChinaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string ChinaStandardTime;","python":"TimeZones.ChinaStandardTime: str","summary":"(GMT+08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"China Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ChinaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ChinaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.DatelineStandardTime","kind":"field","name":"DatelineStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string DatelineStandardTime;","python":"TimeZones.DatelineStandardTime: str","summary":"(GMT-12:00) International Date Line West","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Dateline Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/DatelineStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/DatelineStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EAfricaStandardTime","kind":"field","name":"EAfricaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EAfricaStandardTime;","python":"TimeZones.EAfricaStandardTime: str","summary":"(GMT+03:00) Nairobi","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"E. Africa Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EAfricaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EAfricaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EAustraliaStandardTime","kind":"field","name":"EAustraliaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EAustraliaStandardTime;","python":"TimeZones.EAustraliaStandardTime: str","summary":"(GMT+10:00) Brisbane","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"E. Australia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EAustraliaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EAustraliaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EEuropeStandardTime","kind":"field","name":"EEuropeStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EEuropeStandardTime;","python":"TimeZones.EEuropeStandardTime: str","summary":"(GMT+02:00) Bucharest","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"E. Europe Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EEuropeStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EEuropeStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.ESouthAmericaStandardTime","kind":"field","name":"ESouthAmericaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string ESouthAmericaStandardTime;","python":"TimeZones.ESouthAmericaStandardTime: str","summary":"(GMT-03:00) Brasilia","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"E. South America Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ESouthAmericaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/ESouthAmericaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EasternStandardTime","kind":"field","name":"EasternStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EasternStandardTime;","python":"TimeZones.EasternStandardTime: str","summary":"(GMT-05:00) Eastern Time (US and Canada)","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"New York time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"New York time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Eastern Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EasternStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EasternStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EgyptStandardTime","kind":"field","name":"EgyptStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EgyptStandardTime;","python":"TimeZones.EgyptStandardTime: str","summary":"(GMT+02:00) Cairo","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Egypt Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EgyptStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EgyptStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.EkaterinburgStandardTime","kind":"field","name":"EkaterinburgStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string EkaterinburgStandardTime;","python":"TimeZones.EkaterinburgStandardTime: str","summary":"(GMT+05:00) Ekaterinburg","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Ekaterinburg Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EkaterinburgStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/EkaterinburgStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.FLEStandardTime","kind":"field","name":"FLEStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string FLEStandardTime;","python":"TimeZones.FLEStandardTime: str","summary":"(GMT+02:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"FLE Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/FLEStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/FLEStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.GMTStandardTime","kind":"field","name":"GMTStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string GMTStandardTime;","python":"TimeZones.GMTStandardTime: str","summary":"(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"London time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"London time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"GMT Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GMTStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GMTStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.GTBStandardTime","kind":"field","name":"GTBStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string GTBStandardTime;","python":"TimeZones.GTBStandardTime: str","summary":"(GMT+02:00) Athens, Istanbul, Minsk","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"GTB Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GTBStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GTBStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.GreenlandStandardTime","kind":"field","name":"GreenlandStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string GreenlandStandardTime;","python":"TimeZones.GreenlandStandardTime: str","summary":"(GMT-03:00) Greenland","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Greenland Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GreenlandStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GreenlandStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.GreenwichStandardTime","kind":"field","name":"GreenwichStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string GreenwichStandardTime;","python":"TimeZones.GreenwichStandardTime: str","summary":"(GMT) Casablanca, Monrovia","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Greenwich Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GreenwichStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/GreenwichStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.HawaiianStandardTime","kind":"field","name":"HawaiianStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string HawaiianStandardTime;","python":"TimeZones.HawaiianStandardTime: str","summary":"(GMT-10:00) Hawaii","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Hawaiian Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/HawaiianStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/HawaiianStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.IndiaStandardTime","kind":"field","name":"IndiaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string IndiaStandardTime;","python":"TimeZones.IndiaStandardTime: str","summary":"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"India Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IndiaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IndiaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.IranStandardTime","kind":"field","name":"IranStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string IranStandardTime;","python":"TimeZones.IranStandardTime: str","summary":"(GMT+03:30) Tehran","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Iran Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IranStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IranStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.IsraelStandardTime","kind":"field","name":"IsraelStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string IsraelStandardTime;","python":"TimeZones.IsraelStandardTime: str","summary":"(GMT+02:00) Jerusalem","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Israel Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IsraelStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/IsraelStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.KoreaStandardTime","kind":"field","name":"KoreaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string KoreaStandardTime;","python":"TimeZones.KoreaStandardTime: str","summary":"(GMT+09:00) Seoul","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Korea Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/KoreaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/KoreaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.MidAtlanticStandardTime","kind":"field","name":"MidAtlanticStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string MidAtlanticStandardTime;","python":"TimeZones.MidAtlanticStandardTime: str","summary":"(GMT-02:00) Mid-Atlantic","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Mid-Atlantic Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MidAtlanticStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MidAtlanticStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.MountainStandardTime","kind":"field","name":"MountainStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string MountainStandardTime;","python":"TimeZones.MountainStandardTime: str","summary":"(GMT-07:00) Mountain Time (US and Canada)","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Mountain Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MountainStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MountainStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.MyanmarStandardTime","kind":"field","name":"MyanmarStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string MyanmarStandardTime;","python":"TimeZones.MyanmarStandardTime: str","summary":"(GMT+06:30) Yangon Rangoon","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Myanmar Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MyanmarStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/MyanmarStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.NCentralAsiaStandardTime","kind":"field","name":"NCentralAsiaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string NCentralAsiaStandardTime;","python":"TimeZones.NCentralAsiaStandardTime: str","summary":"(GMT+06:00) Almaty, Novosibirsk","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"N. Central Asia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NCentralAsiaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NCentralAsiaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.NepalStandardTime","kind":"field","name":"NepalStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string NepalStandardTime;","python":"TimeZones.NepalStandardTime: str","summary":"(GMT+05:45) Kathmandu","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Nepal Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NepalStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NepalStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.NewZealandStandardTime","kind":"field","name":"NewZealandStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string NewZealandStandardTime;","python":"TimeZones.NewZealandStandardTime: str","summary":"(GMT+12:00) Auckland, Wellington","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"New Zealand Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NewZealandStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NewZealandStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.NorthAsiaEastStandardTime","kind":"field","name":"NorthAsiaEastStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string NorthAsiaEastStandardTime;","python":"TimeZones.NorthAsiaEastStandardTime: str","summary":"(GMT+08:00) Irkutsk, Ulaanbaatar","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"North Asia East Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NorthAsiaEastStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NorthAsiaEastStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.NorthAsiaStandardTime","kind":"field","name":"NorthAsiaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string NorthAsiaStandardTime;","python":"TimeZones.NorthAsiaStandardTime: str","summary":"(GMT+07:00) Krasnoyarsk","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"North Asia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NorthAsiaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/NorthAsiaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.PacificStandardTime","kind":"field","name":"PacificStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string PacificStandardTime;","python":"TimeZones.PacificStandardTime: str","summary":"(GMT-08:00) Pacific Time (US and Canada); Tijuana","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Pacific Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/PacificStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/PacificStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.RomanceStandardTime","kind":"field","name":"RomanceStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string RomanceStandardTime;","python":"TimeZones.RomanceStandardTime: str","summary":"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Romance Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/RomanceStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/RomanceStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.RussianStandardTime","kind":"field","name":"RussianStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string RussianStandardTime;","python":"TimeZones.RussianStandardTime: str","summary":"(GMT+03:00) Moscow, St. Petersburg, Volgograd","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Russian Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/RussianStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/RussianStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.SamoaStandardTime","kind":"field","name":"SamoaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string SamoaStandardTime;","python":"TimeZones.SamoaStandardTime: str","summary":"(GMT-11:00) Midway Island, Samoa","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Samoa Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SamoaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SamoaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.SingaporeStandardTime","kind":"field","name":"SingaporeStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string SingaporeStandardTime;","python":"TimeZones.SingaporeStandardTime: str","summary":"(GMT+08:00) Kuala Lumpur, Singapore","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Singapore time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Singapore time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Singapore Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SingaporeStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SingaporeStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.SouthAfricaStandardTime","kind":"field","name":"SouthAfricaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string SouthAfricaStandardTime;","python":"TimeZones.SouthAfricaStandardTime: str","summary":"(GMT+02:00) Harare, Pretoria","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"South Africa Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SouthAfricaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SouthAfricaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.SriLankaStandardTime","kind":"field","name":"SriLankaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string SriLankaStandardTime;","python":"TimeZones.SriLankaStandardTime: str","summary":"(GMT+06:00) Sri Jayawardenepura","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Sri Lanka Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SriLankaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/SriLankaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.TaipeiStandardTime","kind":"field","name":"TaipeiStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string TaipeiStandardTime;","python":"TimeZones.TaipeiStandardTime: str","summary":"(GMT+08:00) Taipei","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Taipei Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TaipeiStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TaipeiStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.TasmaniaStandardTime","kind":"field","name":"TasmaniaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string TasmaniaStandardTime;","python":"TimeZones.TasmaniaStandardTime: str","summary":"(GMT+10:00) Hobart","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Tasmania Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TasmaniaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TasmaniaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.TokyoStandardTime","kind":"field","name":"TokyoStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string TokyoStandardTime;","python":"TimeZones.TokyoStandardTime: str","summary":"(GMT+09:00) Osaka, Sapporo, Tokyo","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Tokyo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Tokyo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Tokyo Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TokyoStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TokyoStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.TongaStandardTime","kind":"field","name":"TongaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string TongaStandardTime;","python":"TimeZones.TongaStandardTime: str","summary":"(GMT+13:00) Nuku'alofa","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Tonga Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TongaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/TongaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.UTC","kind":"field","name":"UTC","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string UTC;","python":"TimeZones.UTC: str","summary":"Coordinated Universal Time","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"UTC time: {0}, same as TimeInUtc: {1}\", Time, TimeInUtc); }\n}","python":"api.Print(f\"UTC time: {api.Time}, same as TimeInUtc: {api.TimeInUtc}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/UTC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/UTC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.VladivostokStandardTime","kind":"field","name":"VladivostokStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string VladivostokStandardTime;","python":"TimeZones.VladivostokStandardTime: str","summary":"(GMT+10:00) Vladivostok","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Vladivostok Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/VladivostokStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/VladivostokStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.WAustraliaStandardTime","kind":"field","name":"WAustraliaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string WAustraliaStandardTime;","python":"TimeZones.WAustraliaStandardTime: str","summary":"(GMT+08:00) Perth","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"W. Australia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WAustraliaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WAustraliaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.WCentralAfricaStandardTime","kind":"field","name":"WCentralAfricaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string WCentralAfricaStandardTime;","python":"TimeZones.WCentralAfricaStandardTime: str","summary":"(GMT+01:00) West Central Africa","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"W. Central Africa Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WCentralAfricaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WCentralAfricaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.WEuropeStandardTime","kind":"field","name":"WEuropeStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string WEuropeStandardTime;","python":"TimeZones.WEuropeStandardTime: str","summary":"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Frankfurt time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Frankfurt time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"W. Europe Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WEuropeStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WEuropeStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.WestAsiaStandardTime","kind":"field","name":"WestAsiaStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string WestAsiaStandardTime;","python":"TimeZones.WestAsiaStandardTime: str","summary":"(GMT+05:00) Islamabad, Karachi, Tashkent","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"West Asia Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WestAsiaStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WestAsiaStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.WestPacificStandardTime","kind":"field","name":"WestPacificStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string WestPacificStandardTime;","python":"TimeZones.WestPacificStandardTime: str","summary":"(GMT+10:00) Guam, Port Moresby","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"West Pacific Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WestPacificStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/WestPacificStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TimeZones.YakutskStandardTime","kind":"field","name":"YakutskStandardTime","type":"T:cAlgo.API.TimeZones","namespace":"cAlgo.API","group":"Utility","csharp":"public static string YakutskStandardTime;","python":"TimeZones.YakutskStandardTime: str","summary":"(GMT+09:00) Yakutsk","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"public partial class TimeZoneSample : Robot\n{\n    protected override void OnStart() { Print(\"Algo time: {0}, time zone: {1}\", Time, TimeZone.DisplayName); }\n}","python":"api.Print(f\"Algo time: {api.Time}, time zone: {api.TimeZone.DisplayName}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"Yakutsk Standard Time\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/YakutskStandardTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/Utility/TimeZones/YakutskStandardTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Timer","kind":"interface","name":"Timer","type":null,"namespace":"cAlgo.API","group":"Timer","csharp":"public interface Timer","python":"Timer","summary":"Schedules execution of virtual OnTimer method with specified interval.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the API Timer, this timer works both on live and back test\n    // The timer is available for both cBots and indicators\n    // Every cBot/indicator can have one single timer\n    // You can also use the .NET timers if you want to but those will not work properly on back test\n    public partial class Test : Robot\n    {\n        protected override void OnStart()\n        {\n            // You can start the cBot timer by calling Timer.Start method, for interval you can pass a time span or seconds\n            Timer.Start(TimeSpan.FromSeconds(1));\n            // You can also use the TimerTick event instead of OnTimer method\n            Timer.TimerTick += Timer_TimerTick;\n        }\n\n        private void Timer_TimerTick()\n        {\n            Print(\"Timer tick event at {0}\", Server.Time);\n        }\n\n        protected override void OnTimer()\n        {\n            Print(\"OnTimer at {0}\", Server.Time);\n        }\n\n        protected override void OnStop()\n        {\n            // To stop the timer you can call Timer.Stop method anywhere on your cBot/indicator\n            Timer.Stop();\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\nfrom System import TimeSpan\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_start(self):\n        # You can use on_timer method to listen to timer ticks\n        # or you can also use the TimerTick event instead of OnTimer method\n        api.Timer.TimerTick += self.on_timer_tick\n        # You have to call timer start method with interval either in seconds or TimeSpan\n        api.Timer.Start(TimeSpan.FromSeconds(1))\n\n    def on_timer(self):\n        api.Print(f\"on_timer at {api.Server.Time}\")\n\n    def on_timer_tick(self):\n        api.Print(f\"Timer tick event at {api.Server.Time}\")\n\n    def on_stop(self):\n        api.Timer.Stop()","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Timer.Start(System.TimeSpan)","kind":"method","name":"Start","type":"T:cAlgo.API.Timer","namespace":"cAlgo.API","group":"Timer","csharp":"void Start(TimeSpan interval)","python":"api.Timer.Start(interval: TimeSpan) -> None","summary":"Starts the Timer","remarks":null,"parameters":[{"name":"interval","csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"Interval as a TimeSpan"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(TimeSpan.FromMilliseconds(500));\n}\n\nprotected override void OnTimer()\n{\n    Print(\"Bid: {0}, Ask: {1}\", Symbol.Bid, Symbol.Ask);\n}","python":"from System import TimeSpan\n\ndef on_start(self):\n    api.Timer.Start(TimeSpan.FromMilliseconds(500))\n\ndef on_timer(self):\n    api.Print(f\"Bid: {api.Symbol.Bid}, Ask: {api.Symbol.Ask}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Timer.Start(System.Int32)","kind":"method","name":"Start","type":"T:cAlgo.API.Timer","namespace":"cAlgo.API","group":"Timer","csharp":"void Start(int intervalInSeconds)","python":"api.Timer.Start(intervalInSeconds: int) -> None","summary":"Starts the Timer","remarks":null,"parameters":[{"name":"intervalInSeconds","csharpType":"int","pythonType":"int","summary":"Interval in seconds"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(5);\n}\n\nprotected override void OnTimer()\n{\n    Print(\"Open positions: {0}, equity: {1}\", Positions.Count, Account.Equity);\n}","python":"def on_start(self):\n    api.Timer.Start(5)\n\ndef on_timer(self):\n    api.Print(f\"Open positions: {api.Positions.Count}, equity: {api.Account.Equity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Start/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Start/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.Timer.Stop","kind":"method","name":"Stop","type":"T:cAlgo.API.Timer","namespace":"cAlgo.API","group":"Timer","csharp":"void Stop()","python":"api.Timer.Stop() -> None","summary":"Stops the Timer","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.Start(1);\n}\n\nprotected override void OnTimer()\n{\n    Print(\"Waiting for positions to close, open: {0}\", Positions.Count);\n    if (Positions.Count == 0)\n        Timer.Stop();\n}","python":"def on_start(self):\n    api.Timer.Start(1)\n\ndef on_timer(self):\n    api.Print(f\"Waiting for positions to close, open: {api.Positions.Count}\")\n    if api.Positions.Count == 0:\n        api.Timer.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Stop/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Stop/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Timer.Interval","kind":"property","name":"Interval","type":"T:cAlgo.API.Timer","namespace":"cAlgo.API","group":"Timer","csharp":"TimeSpan Interval {get;}","python":"api.Timer.Interval: TimeSpan","summary":"Gets the interval of timer. Returns -1 millisecond if the timer is stopped","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Timer.Start(5);\nPrint(\"Timer interval: {0}\", Timer.Interval);\nTimer.Stop();\nPrint(\"Interval after stop: {0}\", Timer.Interval);","python":"api.Timer.Start(5)\napi.Print(f\"Timer interval: {api.Timer.Interval}\")\napi.Timer.Stop()\napi.Print(f\"Interval after stop: {api.Timer.Interval}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Interval/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/Interval/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"E:cAlgo.API.Timer.TimerTick","kind":"event","name":"TimerTick","type":"T:cAlgo.API.Timer","namespace":"cAlgo.API","group":"Timer","csharp":"event Action TimerTick;","python":"api.Timer.TimerTick += handler  # handler()","summary":"Occurs when the interval elapses","remarks":null,"parameters":[],"returns":{"csharpType":"Action","pythonType":"Action","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Timer.TimerTick += OnTimerTick;\n    Timer.Start(1);\n}\n\nprivate void OnTimerTick()\n{\n    Print(\"Timer tick at {0}\", Server.Time);\n}","python":"def on_start(self):\n    api.Timer.TimerTick += self.on_timer_tick\n    api.Timer.Start(1)\n\ndef on_timer_tick(self):\n    api.Print(f\"Timer tick at {api.Server.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/TimerTick/","markdown":"https://help.ctrader.com/ctrader-algo/references/Timer/Timer/TimerTick/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.ToggleButton","kind":"class","name":"ToggleButton","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class ToggleButton : Control","python":"ToggleButton","summary":"Represents the Toggle button.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\nusing System.Linq;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use ToggleButton control and handle its checked/unchecked events\n    public partial class ToggleButtonSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7\n            };\n\n            for (int i = 0; i < 5; i++)\n            {\n                var toggleButton = new ToggleButton\n                {\n                    Text = \"Toggle Button #\" + i + \" Unchecked\",\n                    Margin = 10\n                };\n\n                toggleButton.Checked += ToggleButton_Checked;\n                toggleButton.Unchecked += ToggleButton_Unchecked;\n\n                stackPanel.AddChild(toggleButton);\n            }\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void ToggleButton_Checked(ToggleButtonEventArgs obj)\n        {\n            var textSplit = obj.ToggleButton.Text.Split(' ').TakeWhile(text => !text.Equals(\"Unchecked\", StringComparison.OrdinalIgnoreCase)).ToArray();\n\n            obj.ToggleButton.Text = string.Join(\" \", textSplit) + \" Checked\";\n        }\n\n        private void ToggleButton_Unchecked(ToggleButtonEventArgs obj)\n        {\n            var textSplit = obj.ToggleButton.Text.Split(' ').TakeWhile(text => !text.Equals(\"Checked\", StringComparison.OrdinalIgnoreCase)).ToArray();\n\n            obj.ToggleButton.Text = string.Join(\" \", textSplit) + \" Unchecked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n\n        for i in range(5):\n            toggleButton = ToggleButton()\n            toggleButton.Text = f\"Toggle Button # {i} Unchecked\"\n            toggleButton.Margin = Thickness(10)\n            toggleButton.Checked += self.on_toggle_button_checked\n            toggleButton.Unchecked += self.on_toggle_button_unchecked\n\n            stackPanel.AddChild(toggleButton)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_toggle_button_checked(self, args):\n        textSplit = args.ToggleButton.Text.split(' ')[:4]\n        args.ToggleButton.Text = f\"{' '.join(textSplit)} Checked\"\n\n    def on_toggle_button_unchecked(self, args):\n        textSplit = args.ToggleButton.Text.split(' ')[:4]\n        args.ToggleButton.Text = f\"{' '.join(textSplit)} Unchecked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.ToggleButton.#ctor","kind":"constructor","name":"ToggleButton","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public ToggleButton()","python":"ToggleButton()","summary":"Initializes a new instance of the Toggle button class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Auto trading\", IsChecked = true };\ntoggleButton.Click += args => Print(\"Auto trading: {0}\", args.ToggleButton.IsChecked);\nChart.AddControl(toggleButton);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"Auto trading\"\ntoggleButton.IsChecked = True\ntoggleButton.Click += lambda args: api.Print(f\"Auto trading: {args.ToggleButton.IsChecked}\")\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.BorderColor","kind":"property","name":"BorderColor","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public Color BorderColor {get; set;}","python":"toggleButton.BorderColor: Color","summary":"Gets or sets the border line color.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"News filter\", BorderColor = Color.Gold, BorderThickness = 1 };\nChart.AddControl(toggleButton);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"News filter\"\ntoggleButton.BorderColor = Color.Gold\ntoggleButton.BorderThickness = Thickness(1)\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/BorderColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/BorderColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.BorderThickness","kind":"property","name":"BorderThickness","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public Thickness BorderThickness {get; set;}","python":"toggleButton.BorderThickness: Thickness","summary":"Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, \"5\", \"1 2 3 4\".","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Trailing\", BorderColor = Color.White, BorderThickness = new Thickness(2) };\nChart.AddControl(toggleButton);\nPrint(\"Border thickness: {0}\", toggleButton.BorderThickness.Top);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"Trailing\"\ntoggleButton.BorderColor = Color.White\ntoggleButton.BorderThickness = Thickness(2)\napi.Chart.AddControl(toggleButton)\napi.Print(f\"Border thickness: {toggleButton.BorderThickness.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/BorderThickness/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/BorderThickness/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.Content","kind":"property","name":"Content","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public ControlBase Content {get; set;}","python":"toggleButton.Content: ControlBase","summary":"Gets or sets the content.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var content = new StackPanel { Orientation = Orientation.Horizontal };\ncontent.AddChild(new Rectangle { Width = 8, Height = 8, FillColor = Color.Orange, Margin = 3 });\ncontent.AddChild(new TextBlock { Text = \"Alerts\" });\nvar toggleButton = new ToggleButton { Content = content };\nChart.AddControl(toggleButton);","python":"content = StackPanel()\ncontent.Orientation = Orientation.Horizontal\nlabel = TextBlock()\nlabel.Text = \"Alerts\"\ncontent.AddChild(label)\ntoggleButton = ToggleButton()\ntoggleButton.Content = content\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Content/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Content/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.CornerRadius","kind":"property","name":"CornerRadius","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public CornerRadius CornerRadius {get; set;}","python":"toggleButton.CornerRadius: CornerRadius","summary":"Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).","remarks":null,"parameters":[],"returns":{"csharpType":"CornerRadius","pythonType":"CornerRadius","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Hedge\", CornerRadius = new CornerRadius(10) };\nChart.AddControl(toggleButton);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"Hedge\"\ntoggleButton.CornerRadius = CornerRadius(10)\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/CornerRadius/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/CornerRadius/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.IsChecked","kind":"property","name":"IsChecked","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsChecked {get; set;}","python":"toggleButton.IsChecked: bool","summary":"Defines whether the Toggle button is checked.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Show levels\" };\ntoggleButton.IsChecked = Positions.Count > 0;\nChart.AddControl(toggleButton);\nPrint(\"Levels visible: {0}\", toggleButton.IsChecked);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"Show levels\"\ntoggleButton.IsChecked = api.Positions.Count > 0\napi.Chart.AddControl(toggleButton)\napi.Print(f\"Levels visible: {toggleButton.IsChecked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/IsChecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/IsChecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.ToggleButton.Text","kind":"property","name":"Text","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public string Text {get; set;}","python":"toggleButton.Text: str","summary":"Gets or sets the text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Trading: OFF\" };\ntoggleButton.Checked += args => args.ToggleButton.Text = \"Trading: ON\";\ntoggleButton.Unchecked += args => args.ToggleButton.Text = \"Trading: OFF\";\nChart.AddControl(toggleButton);","python":"toggleButton = ToggleButton()\ntoggleButton.Text = \"Trading: OFF\"\napi.Chart.AddControl(toggleButton)\napi.Print(f\"Toggle button text: {toggleButton.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.ToggleButton.Checked","kind":"event","name":"Checked","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ToggleButtonEventArgs> Checked;","python":"toggleButton.Checked += handler  # handler(obj: ToggleButtonEventArgs)","summary":"Occurs when checked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ToggleButtonEventArgs>","pythonType":"Callable[[ToggleButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Show SMA\" };\ntoggleButton.Checked += args => Print(\"SMA shown, value: {0}\", Indicators.SimpleMovingAverage(Bars.ClosePrices, 14).Result.LastValue);\nChart.AddControl(toggleButton);","python":"def on_start(self):\n    toggleButton = ToggleButton()\n    toggleButton.Text = \"Show SMA\"\n    toggleButton.Checked += self.on_toggle_button_checked\n    api.Chart.AddControl(toggleButton)\n\ndef on_toggle_button_checked(self, args):\n    sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n    api.Print(f\"SMA shown, value: {sma.Result.LastValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Checked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Checked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.ToggleButton.Click","kind":"event","name":"Click","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ToggleButtonEventArgs> Click;","python":"toggleButton.Click += handler  # handler(obj: ToggleButtonEventArgs)","summary":"Occurs when clicked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ToggleButtonEventArgs>","pythonType":"Callable[[ToggleButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Pause\" };\ntoggleButton.Click += args => Print(\"Paused: {0}\", args.ToggleButton.IsChecked);\nChart.AddControl(toggleButton);","python":"def on_start(self):\n    toggleButton = ToggleButton()\n    toggleButton.Text = \"Pause\"\n    toggleButton.Click += self.on_toggle_button_click\n    api.Chart.AddControl(toggleButton)\n\ndef on_toggle_button_click(self, args):\n    api.Print(f\"Paused: {args.ToggleButton.IsChecked}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Click/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Click/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.ToggleButton.Unchecked","kind":"event","name":"Unchecked","type":"T:cAlgo.API.ToggleButton","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<ToggleButtonEventArgs> Unchecked;","python":"toggleButton.Unchecked += handler  # handler(obj: ToggleButtonEventArgs)","summary":"Occurs when unchecked.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<ToggleButtonEventArgs>","pythonType":"Callable[[ToggleButtonEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var toggleButton = new ToggleButton { Text = \"Trading enabled\", IsChecked = true };\ntoggleButton.Unchecked += args =>\n{\n    foreach (var order in PendingOrders.ToArray())\n        CancelPendingOrder(order);\n    Print(\"Trading disabled, pending orders cancelled\");\n};\nChart.AddControl(toggleButton);","python":"def on_start(self):\n    toggleButton = ToggleButton()\n    toggleButton.Text = \"Trading enabled\"\n    toggleButton.IsChecked = True\n    toggleButton.Unchecked += self.on_toggle_button_unchecked\n    api.Chart.AddControl(toggleButton)\n\ndef on_toggle_button_unchecked(self, args):\n    for order in list(api.PendingOrders):\n        api.CancelPendingOrder(order)\n    api.Print(\"Trading disabled, pending orders cancelled\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Unchecked/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/Unchecked/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.ToggleButtonEventArgs","kind":"class","name":"ToggleButtonEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class ToggleButtonEventArgs","python":"ToggleButtonEventArgs","summary":"Represents the toggle button event class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\nusing System.Linq;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use ToggleButtonEventArgs\n    public partial class ToggleButtonEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var stackPanel = new StackPanel\n            {\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                BackgroundColor = Color.Gold,\n                Opacity = 0.7\n            };\n\n            for (int i = 0; i < 5; i++)\n            {\n                var toggleButton = new ToggleButton\n                {\n                    Text = \"Toggle Button #\" + i + \" Unchecked\",\n                    Margin = 10\n                };\n\n                toggleButton.Checked += OnToggleButtonChecked;\n                toggleButton.Unchecked += OnToggleButtonUnchecked;\n\n                stackPanel.AddChild(toggleButton);\n            }\n\n            Chart.AddControl(stackPanel);\n        }\n\n        private void OnToggleButtonChecked(ToggleButtonEventArgs obj)\n        {\n            var textSplit = obj.ToggleButton.Text.Split(' ').TakeWhile(text => !text.Equals(\"Unchecked\", StringComparison.OrdinalIgnoreCase)).ToArray();\n\n            obj.ToggleButton.Text = string.Join(\" \", textSplit) + \" Checked\";\n        }\n\n        private void OnToggleButtonUnchecked(ToggleButtonEventArgs obj)\n        {\n            var textSplit = obj.ToggleButton.Text.Split(' ').TakeWhile(text => !text.Equals(\"Checked\", StringComparison.OrdinalIgnoreCase)).ToArray();\n\n            obj.ToggleButton.Text = string.Join(\" \", textSplit) + \" Unchecked\";\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        stackPanel = StackPanel()\n        stackPanel.HorizontalAlignment = HorizontalAlignment.Center\n        stackPanel.VerticalAlignment = VerticalAlignment.Center\n        stackPanel.BackgroundColor = Color.Gold\n        stackPanel.Opacity = 0.7\n\n        for i in range(5):\n            toggleButton = ToggleButton()\n            toggleButton.Text = f\"Toggle Button #{i} Unchecked\"\n            toggleButton.Margin = Thickness(10)\n            toggleButton.Checked += self.on_toggle_button_checked\n            toggleButton.Unchecked += self.on_toggle_button_unchecked\n\n            stackPanel.AddChild(toggleButton)\n\n        api.Chart.AddControl(stackPanel)\n\n    def on_toggle_button_checked(self, args):\n        text = args.ToggleButton.Text[:16]\n        args.ToggleButton.Text = f\"{text} Checked\"\n\n    def on_toggle_button_unchecked(self, args):\n        text = args.ToggleButton.Text[:16]\n        args.ToggleButton.Text = f\"{text} Unchecked\"","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ToggleButtonEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ToggleButtonEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ToggleButton.Checked, ToggleButton.Click, ToggleButton.Unchecked)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ToggleButton.Checked, ToggleButton.Click, ToggleButton.Unchecked)."}]}
{"id":"P:cAlgo.API.ToggleButtonEventArgs.ToggleButton","kind":"property","name":"ToggleButton","type":"T:cAlgo.API.ToggleButtonEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public ToggleButton ToggleButton {get;}","python":"toggleButtonEventArgs.ToggleButton: ToggleButton","summary":"Gets the toggle button data.","remarks":null,"parameters":[],"returns":{"csharpType":"ToggleButton","pythonType":"ToggleButton","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var toggleButton = new ToggleButton { Text = \"Trading enabled\", IsChecked = true };\n    toggleButton.Click += OnToggleButtonClick;\n    Chart.AddControl(toggleButton);\n}\n\nprivate void OnToggleButtonClick(ToggleButtonEventArgs args)\n{\n    var isEnabled = args.ToggleButton.IsChecked == true;\n    args.ToggleButton.Text = isEnabled ? \"Trading enabled\" : \"Trading disabled\";\n}","python":"def on_start(self):\n    toggleButton = ToggleButton()\n    toggleButton.Text = \"Trading enabled\"\n    toggleButton.IsChecked = True\n    toggleButton.Click += self.on_toggle_button_click\n    api.Chart.AddControl(toggleButton)\n\ndef on_toggle_button_click(self, args):\n    isEnabled = args.ToggleButton.IsChecked == True\n    args.ToggleButton.Text = \"Trading enabled\" if isEnabled else \"Trading disabled\""}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ToggleButtonEventArgs/ToggleButton/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/ToggleButtonEventArgs/ToggleButton/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (ToggleButton.Checked, ToggleButton.Click, ToggleButton.Unchecked)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (ToggleButton.Checked, ToggleButton.Click, ToggleButton.Unchecked)."}]}
{"id":"T:cAlgo.API.Internals.TotalMarginCalculationType","kind":"enum","name":"TotalMarginCalculationType","type":null,"namespace":"cAlgo.API.Internals","group":"Account","csharp":"public enum TotalMarginCalculationType","python":"TotalMarginCalculationType","summary":"Defines types of total margin requirements per Symbol.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Account.TotalMarginCalculationType == TotalMarginCalculationType.Max)\n    Print(\"Hedged positions only use the margin of the larger side\");\nelse\n    Print(\"Total margin calculation type: {0}\", Account.TotalMarginCalculationType);","python":"if api.Account.TotalMarginCalculationType == TotalMarginCalculationType.Max:\n    api.Print(\"Hedged positions only use the margin of the larger side\")\nelse:\n    api.Print(f\"Total margin calculation type: {api.Account.TotalMarginCalculationType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Internals.TotalMarginCalculationType.Sum","kind":"enum value","name":"Sum","type":"T:cAlgo.API.Internals.TotalMarginCalculationType","namespace":"cAlgo.API.Internals","group":"Account","csharp":"TotalMarginCalculationType.Sum;","python":"TotalMarginCalculationType.Sum","summary":"Total margin requirements per Symbol are equal to Sum of all margin requirements of all positions of that Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"TotalMarginCalculationType","pythonType":"TotalMarginCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Internals.TotalMarginCalculationType.Max","kind":"enum value","name":"Max","type":"T:cAlgo.API.Internals.TotalMarginCalculationType","namespace":"cAlgo.API.Internals","group":"Account","csharp":"TotalMarginCalculationType.Max;","python":"TotalMarginCalculationType.Max","summary":"Total margin requirements per Symbol are equal to Max margin requirements from all Long and all Short Positions of that Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"TotalMarginCalculationType","pythonType":"TotalMarginCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.Internals.TotalMarginCalculationType.Net","kind":"enum value","name":"Net","type":"T:cAlgo.API.Internals.TotalMarginCalculationType","namespace":"cAlgo.API.Internals","group":"Account","csharp":"TotalMarginCalculationType.Net;","python":"TotalMarginCalculationType.Net","summary":"Total margin requirements per Symbol are equal to the difference between margin requirements of all Long and all Short Positions of that Symbol.","remarks":null,"parameters":[],"returns":{"csharpType":"TotalMarginCalculationType","pythonType":"TotalMarginCalculationType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/TotalMarginCalculationType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TradeOperation","kind":"class","name":"TradeOperation","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public sealed class TradeOperation","python":"TradeOperation","summary":"Provides access to the properties describing an asynchronous trade operation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var operation = ExecuteMarketOrderAsync(TradeType.Buy, SymbolName, 10000, \"myLabel\", result => Print(\"Order completed: {0}\", result.IsSuccessful));\nPrint(\"Operation is executing: {0}\", operation.IsExecuting);","python":"operation = api.ExecuteMarketOrderAsync(TradeType.Buy, api.SymbolName, 10000, \"myLabel\", lambda result: api.Print(f\"Order completed: {result.IsSuccessful}\"))\napi.Print(f\"Operation is executing: {operation.IsExecuting}\")"},{"csharp":"private TradeOperation _operation;\n\nprotected override void OnStart()\n{\n    _operation = ExecuteMarketOrderAsync(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin, OnTradeResult);\n}\n\nprotected override void OnTick()\n{\n    if (_operation != null && !_operation.IsExecuting)\n    {\n        Print(_operation.ToString());\n        _operation = null;\n    }\n}\n\nprivate void OnTradeResult(TradeResult result)\n{\n    Print(\"Trade operation successful: {0}\", result.IsSuccessful);\n}","python":"def on_start(self):\n    self.operation = api.ExecuteMarketOrderAsync(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin, self.on_trade_result)\n\ndef on_tick(self):\n    if self.operation is not None and not self.operation.IsExecuting:\n        api.Print(self.operation.ToString())\n        self.operation = None\n\ndef on_trade_result(self, result):\n    api.Print(f\"Trade operation successful: {result.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeOperation.IsExecuting","kind":"property","name":"IsExecuting","type":"T:cAlgo.API.TradeOperation","namespace":"cAlgo.API","group":"Trading","csharp":"public bool IsExecuting {get;}","python":"tradeOperation.IsExecuting: bool","summary":"True if a trade operation is being executed, false if it completed","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var operation = ExecuteMarketOrderAsync(TradeType.Buy, SymbolName, 20000, \"myLabel\", result => Print(\"Completed: {0}\", result.IsSuccessful));\nif (operation.IsExecuting)\n    Print(\"Trade is executing\");","python":"operation = api.ExecuteMarketOrderAsync(TradeType.Buy, api.SymbolName, 20000, \"myLabel\", lambda result: api.Print(f\"Completed: {result.IsSuccessful}\"))\nif operation.IsExecuting:\n    api.Print(\"Trade is executing\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/IsExecuting/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/IsExecuting/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeOperation.TradeResult","kind":"property","name":"TradeResult","type":"T:cAlgo.API.TradeOperation","namespace":"cAlgo.API","group":"Trading","csharp":"public TradeResult TradeResult {get;}","python":"tradeOperation.TradeResult: TradeResult","summary":"The result of a trade operation","remarks":null,"parameters":[],"returns":{"csharpType":"TradeResult","pythonType":"TradeResult","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var operation = ExecuteMarketOrderAsync(TradeType.Buy, SymbolName, 20000, \"myLabel\", result => Print(\"Callback: {0}\", result.IsSuccessful));\nif (!operation.IsExecuting && operation.TradeResult.IsSuccessful)\n    Print(\"Trade {0} executed\", operation.TradeResult.Position.Label);","python":"operation = api.ExecuteMarketOrderAsync(TradeType.Buy, api.SymbolName, 20000, \"myLabel\", lambda result: api.Print(f\"Callback: {result.IsSuccessful}\"))\nif not operation.IsExecuting and operation.TradeResult.IsSuccessful:\n    api.Print(f\"Trade {operation.TradeResult.Position.Label} executed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/TradeResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeOperation/TradeResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TradeResult","kind":"class","name":"TradeResult","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public sealed class TradeResult","python":"TradeResult","summary":"The result of a trade operation.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01), \"myLabel\", 20, 40);\nif (result.IsSuccessful)\n    Print(\"Position {0} opened at {1}\", result.Position.Id, result.Position.EntryPrice);\nelse\n    Print(\"Market order failed: {0}\", result.Error);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.QuantityToVolumeInUnits(0.01), \"myLabel\", 20, 40)\nif result.IsSuccessful:\n    api.Print(f\"Position {result.Position.Id} opened at {result.Position.EntryPrice}\")\nelse:\n    api.Print(f\"Market order failed: {result.Error}\")"},{"csharp":"var result = PlaceLimitOrder(TradeType.Sell, SymbolName, 10000, Symbol.Ask + 20 * Symbol.PipSize, \"myLabel\");\nPrint(result.IsSuccessful ? \"Order \" + result.PendingOrder.Id + \" placed\" : \"Order failed: \" + result.Error);","python":"result = api.PlaceLimitOrder(TradeType.Sell, api.SymbolName, 10000, api.Symbol.Ask + 20 * api.Symbol.PipSize, \"myLabel\")\napi.Print(f\"Order {result.PendingOrder.Id} placed\" if result.IsSuccessful else f\"Order failed: {result.Error}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeResult.Error","kind":"property","name":"Error","type":"T:cAlgo.API.TradeResult","namespace":"cAlgo.API","group":"Trading","csharp":"public ErrorCode? Error {get;}","python":"api.LastResult.Error: ErrorCode | None","summary":"The error code of an unsuccessful trade.","remarks":null,"parameters":[],"returns":{"csharpType":"ErrorCode?","pythonType":"ErrorCode | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Sell, \"EURUSD\", 1, \"myLabel\");\nif (!result.IsSuccessful && result.Error == ErrorCode.BadVolume)\n    Print(\"Invalid volume, minimum is {0}\", Symbols.GetSymbol(\"EURUSD\").VolumeInUnitsMin);","python":"result = api.ExecuteMarketOrder(TradeType.Sell, \"EURUSD\", 1, \"myLabel\")\nif not result.IsSuccessful and result.Error == ErrorCode.BadVolume:\n    api.Print(f\"Invalid volume, minimum is {api.Symbols.GetSymbol('EURUSD').VolumeInUnitsMin}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/Error/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/Error/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeResult.IsSuccessful","kind":"property","name":"IsSuccessful","type":"T:cAlgo.API.TradeResult","namespace":"cAlgo.API","group":"Trading","csharp":"public bool IsSuccessful {get;}","python":"api.LastResult.IsSuccessful: bool","summary":"True if the trade is successful, false if there is an error.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 20000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Buy at {0}\", result.Position.EntryPrice);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 20000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Buy at {result.Position.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/IsSuccessful/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/IsSuccessful/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeResult.PendingOrder","kind":"property","name":"PendingOrder","type":"T:cAlgo.API.TradeResult","namespace":"cAlgo.API","group":"Trading","csharp":"public PendingOrder PendingOrder {get;}","python":"api.LastResult.PendingOrder: PendingOrder","summary":"The resulting pending order of a trade request.","remarks":null,"parameters":[],"returns":{"csharpType":"PendingOrder","pythonType":"PendingOrder","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = PlaceLimitOrder(TradeType.Sell, SymbolName, 50000, Symbol.Ask + 20 * Symbol.PipSize, \"myLabel\", 10, null, ProtectionType.Relative);\nif (result.IsSuccessful)\n    Print(\"Order placed. SL: {0}\", result.PendingOrder.StopLoss);","python":"result = api.PlaceLimitOrder(TradeType.Sell, api.SymbolName, 50000, api.Symbol.Ask + 20 * api.Symbol.PipSize, \"myLabel\", 10, None, ProtectionType.Relative)\nif result.IsSuccessful:\n    api.Print(f\"Order placed. SL: {result.PendingOrder.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/PendingOrder/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/PendingOrder/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradeResult.Position","kind":"property","name":"Position","type":"T:cAlgo.API.TradeResult","namespace":"cAlgo.API","group":"Trading","csharp":"public Position Position {get;}","python":"api.LastResult.Position: Position","summary":"The resulting position of a trade request.","remarks":null,"parameters":[],"returns":{"csharpType":"Position","pythonType":"Position","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 50000, \"myLabel\", 20, 40);\nif (result.IsSuccessful)\n    Print(\"Sell position {0} at {1}, stop loss {2}\", result.Position.Id, result.Position.EntryPrice, result.Position.StopLoss);","python":"result = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 50000, \"myLabel\", 20, 40)\nif result.IsSuccessful:\n    api.Print(f\"Sell position {result.Position.Id} at {result.Position.EntryPrice}, stop loss {result.Position.StopLoss}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/Position/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeResult/Position/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TradeType","kind":"enum","name":"TradeType","type":null,"namespace":"cAlgo.API","group":"Trading","csharp":"public enum TradeType","python":"TradeType","summary":"The direction of a trade order.","remarks":"Indicates the trade direction, whether it is a Buy or a Sell trade.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tradeType = Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1) ? TradeType.Buy : TradeType.Sell;\nvar result = ExecuteMarketOrder(tradeType, SymbolName, 10000, \"myLabel\", 20, 40);\nPrint(\"{0} order executed: {1}\", tradeType, result.IsSuccessful);","python":"tradeType = TradeType.Buy if api.Bars.ClosePrices.Last(1) > api.Bars.OpenPrices.Last(1) else TradeType.Sell\nresult = api.ExecuteMarketOrder(tradeType, api.SymbolName, 10000, \"myLabel\", 20, 40)\napi.Print(f\"{tradeType} order executed: {result.IsSuccessful}\")"},{"csharp":"var position = Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Sell);\nif (position == null)\n    PlaceLimitOrder(TradeType.Sell, \"EURUSD\", 10000, Symbols.GetSymbol(\"EURUSD\").Ask + 0.0020, \"myLabel\");","python":"position = api.Positions.Find(\"myLabel\", \"EURUSD\", TradeType.Sell)\nif position is None:\n    api.PlaceLimitOrder(TradeType.Sell, \"EURUSD\", 10000, api.Symbols.GetSymbol(\"EURUSD\").Ask + 0.0020, \"myLabel\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TradeType.Buy","kind":"enum value","name":"Buy","type":"T:cAlgo.API.TradeType","namespace":"cAlgo.API","group":"Trading","csharp":"TradeType.Buy;","python":"TradeType.Buy","summary":"Represents a Buy order.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Bought at {0}\", result.Position.EntryPrice);","python":"result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Bought at {result.Position.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TradeType.Sell","kind":"enum value","name":"Sell","type":"T:cAlgo.API.TradeType","namespace":"cAlgo.API","group":"Trading","csharp":"TradeType.Sell;","python":"TradeType.Sell","summary":"Represents a Sell order.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeType","pythonType":"TradeType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, \"myLabel\");\nif (result.IsSuccessful)\n    Print(\"Sold at {0}\", result.Position.EntryPrice);","python":"result = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, \"myLabel\")\nif result.IsSuccessful:\n    api.Print(f\"Sold at {result.Position.EntryPrice}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Trading/TradeType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TradeVolumeIndex","kind":"interface","name":"TradeVolumeIndex","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TradeVolumeIndex","python":"TradeVolumeIndex","summary":"Trade Volume Index measures the amount of money flowing in and out of an asset.","remarks":"The underlying assumption of this indicator is that there is buying pressure when the price trades near the asking price and selling pressure when it trades near the bid.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TradeVolumeIndex _tradeVolume;\n\nprotected override void Initialize()\n{\n   _tradeVolume = Indicators.TradeVolumeIndex(Source);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _tradeVolume.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.tradeVolume = api.Indicators.TradeVolumeIndex(api.Source)\n\n    def calculate(self, index):\n        api.Result[index] = self.tradeVolume.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Source\",\n      \"Type\": \"DataSeries\"\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Trade Volume Index indicator\n    public partial class TradeVolumeIndexSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TradeVolumeIndex _tradeVolumeIndex;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _tradeVolumeIndex = Indicators.TradeVolumeIndex(Bars.ClosePrices);\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_tradeVolumeIndex.Result, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_tradeVolumeIndex.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_tradeVolumeIndex.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TradeVolumeIndexSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.tradeVolumeIndex = api.Indicators.TradeVolumeIndex(api.Bars.ClosePrices)\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.tradeVolumeIndex.Result, 14)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.tradeVolumeIndex.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.tradeVolumeIndex.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TradeVolumeIndex/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TradeVolumeIndex/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.TradeVolumeIndex.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.TradeVolumeIndex","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"tradeVolumeIndex.Result: IndicatorDataSeries","summary":"Gets the time series of Trade Volume Index indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TradeVolumeIndex _tradeVolume;\n\nprotected override void OnStart()\n{\n    _tradeVolume = Indicators.TradeVolumeIndex(Bars.ClosePrices);\n}\n\nprotected override void OnBar()\n{\n    var currentValue = _tradeVolume.Result.Last(1);\n    Print(\"Trade Volume Index: {0}\", currentValue);\n}","python":"def on_start(self):\n    self.tradeVolume = api.Indicators.TradeVolumeIndex(api.Bars.ClosePrices)\n\ndef on_bar(self):\n    currentValue = self.tradeVolume.Result.Last(1)\n    api.Print(f\"Trade Volume Index: {currentValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TradeVolumeIndex/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TradeVolumeIndex/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TradeWatch","kind":"interface","name":"TradeWatch","type":null,"namespace":"cAlgo.API","group":"TradeWatch","csharp":"public interface TradeWatch","python":"TradeWatch","summary":"Represents the trade watch panel.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System;\n\nnamespace cAlgo.Plugins;\n\npublic partial class Test : Plugin\n{\n    protected override void OnStart()\n    {\n        var webView = new WebView\n        {\n            DefaultBackgroundColor = Color.Red,\n            Width = 1000\n        };\n\n        webView.Loaded += _ => webView.NavigateAsync(\"https://ctrader.com/\");\n\n        TradeWatch.IsVisibleChanged += _ => Print(\"OnTradeWatchIsVisibleChanged\");\n        TradeWatch.SizeChanged += _ => Print(\"OnTradeWatchSizeChanged\");\n\n        var tab = TradeWatch.AddTab(\"Test\");\n\n        var detachButton = new Button\n        {\n            Text = \"Detach\",\n        };\n\n        detachButton.Click += _ => tab.Detach();\n\n        var attachButton = new Button\n        {\n            Text = \"Attach\",\n        };\n\n        attachButton.Click += _ => tab.Attach();\n\n        var changeHeightButton = new Button\n        {\n            Text = \"Change Height\",\n        };\n\n        changeHeightButton.Click += _ => TradeWatch.Height = Random.Shared.NextInt64(100, 600);\n\n        var changeVisibilityButton = new Button\n        {\n            Text = \"Change Visibility\",\n        };\n\n        changeVisibilityButton.Click += _ => TradeWatch.IsVisible = !TradeWatch.IsVisible;\n\n        var changeBalanceBarVisibilityButton = new Button\n        {\n            Text = \"Change Balance Bar Visibility\",\n        };\n\n        changeBalanceBarVisibilityButton.Click += _ => tab.IsBalanceBarVisible = !tab.IsBalanceBarVisible;\n\n        var panel = new StackPanel\n        {\n            Orientation = Orientation.Horizontal\n        };\n\n        panel.AddChild(detachButton);\n        panel.AddChild(attachButton);\n        panel.AddChild(changeHeightButton);\n        panel.AddChild(changeVisibilityButton);\n        panel.AddChild(changeBalanceBarVisibilityButton);\n        panel.AddChild(webView);\n\n        tab.Child = panel;\n        tab.IsSelected = true;\n\n        tab.Index = 0;\n\n        tab.Attached += args => Print(\"Attached. ID=\", args.TradeWatchTab.Index);\n        tab.Detached += args => Print(\"Detached. ID=\", args.TradeWatchTab.Index);\n        tab.SizeChanged += args => Print(\"TabSizeChanged. Height={0} Width={1}\", args.TradeWatchTab.Height, args.TradeWatchTab.Width);\n\n        tab.IsSelectedChanged += OnTabIsSelectedChanged;\n\n        var tab1 = TradeWatch.AddTab(\"Test\");\n        tab1.Index = 1;\n\n        var tab2 = TradeWatch.AddTab(\"Test3\");\n        tab2.Index = 2;\n        tab1.IsSelectedChanged += OnTabIsSelectedChanged;\n        tab2.IsSelectedChanged += OnTabIsSelectedChanged;\n    }\n\n    private void OnTabIsSelectedChanged(TradeWatchTabIsSelectedChangedEventArgs args)\n    {\n        var tab = args.TradeWatchTab;\n        Print(\"OnIsSelectedChanged. Index={0} ID={2} title={1}\", tab.Index, tab.Title, tab.Id);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Action, Func\nimport random\n\nclass Test():\n    def on_start(self):\n        webView = WebView()\n        webView.DefaultBackgroundColor = Color.Red\n        webView.Width = 1000\n        webView.Loaded += lambda _: webView.NavigateAsync(\"https://ctrader.com/\")\n\n        api.TradeWatch.IsVisibleChanged += lambda _: print(\"OnTradeWatchIsVisibleChanged\")\n        api.TradeWatch.SizeChanged += lambda _: print(\"OnTradeWatchSizeChanged\")\n\n        tab = api.TradeWatch.AddTab(\"Test\")\n\n        detachButton = Button()\n        detachButton.Text = \"Detach\"\n        detachButton.Click += lambda _: tab.Detach()\n\n        attachButton = Button()\n        attachButton.Text = \"Attach\"\n        attachButton.Click += lambda _: tab.Attach()\n\n        changeHeightButton = Button()\n        changeHeightButton.Text = \"Change Height\"\n        changeHeightButton.Click += self.on_change_height_button_click\n\n        changeVisibilityButton = Button()\n        changeVisibilityButton.Text = \"Change Visibility\"\n        changeVisibilityButton.Click += self.on_change_visibility_button_click\n\n        changeBalanceBarVisibilityButton = Button()\n        changeBalanceBarVisibilityButton.Text = \"Change Balance Bar Visibility\"\n        changeBalanceBarVisibilityButton.Click += lambda _: self.on_change_balance_bar_visibility(tab)\n\n        panel = StackPanel()\n        panel.Orientation = Orientation.Horizontal\n\n        panel.AddChild(detachButton)\n        panel.AddChild(attachButton)\n        panel.AddChild(changeHeightButton)\n        panel.AddChild(changeVisibilityButton)\n        panel.AddChild(changeBalanceBarVisibilityButton)\n        panel.AddChild(webView)\n\n        tab.Child = panel\n        tab.IsSelected = True\n        tab.Index = 0\n        tab.Attached += lambda args: print(f\"Attached. ID={args.TradeWatchTab.Index}\")\n        tab.Detached += lambda args: print(f\"Detached. ID={args.TradeWatchTab.Index}\")\n        tab.SizeChanged += lambda args: print(f\"TabSizeChanged. Height={args.TradeWatchTab.Height} Width={args.TradeWatchTab.Width}\")\n        tab.IsSelectedChanged += self.on_tab_is_selected_changed\n\n        tab1 = api.TradeWatch.AddTab(\"Test\")\n        tab1.Index = 1\n\n        tab2 = api.TradeWatch.AddTab(\"Test3\")\n        tab2.Index = 2\n        tab1.IsSelectedChanged += self.on_tab_is_selected_changed\n        tab2.IsSelectedChanged += self.on_tab_is_selected_changed\n\n    def on_tab_is_selected_changed(self, args):\n        print(f\"OnIsSelectedChanged. Index={args.TradeWatchTab.Index} ID={args.TradeWatchTab.Title} title={args.TradeWatchTab.Id}\")\n\n    def on_change_height_button_click(self, args):\n        api.TradeWatch.Height = random.randint(100, 600)\n\n    def on_change_visibility_button_click(self, args):\n        api.TradeWatch.IsVisible = not api.TradeWatch.IsVisible\n\n    def on_change_balance_bar_visibility(self, tab):\n        tab.IsBalanceBarVisible = not tab.IsBalanceBarVisible","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.TradeWatch.AddTab(System.String)","kind":"method","name":"AddTab","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"TradeWatchTab AddTab(string title)","python":"api.TradeWatch.AddTab(title: str) -> TradeWatchTab","summary":"Adds a new tab.","remarks":null,"parameters":[{"name":"title","csharpType":"string","pythonType":"str","summary":"Tab title"}],"returns":{"csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"Added tab.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.Child = new TextBlock { Text = \"Hello from my plugin\" };\ntab.IsSelected = true;\nPrint(\"Added trade watch tab {0}\", tab.Id);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\ntab.Child = textBlock\ntab.IsSelected = True\napi.Print(f\"Added trade watch tab {tab.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/AddTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/AddTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.TradeWatch.RemoveTab(System.String)","kind":"method","name":"RemoveTab","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool RemoveTab(string id)","python":"api.TradeWatch.RemoveTab(id: str) -> bool","summary":"Removes a tab by ID.","remarks":null,"parameters":[{"name":"id","csharpType":"string","pythonType":"str","summary":"Tab ID"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if tab was removed otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"Temporary Tab\");\nvar isRemoved = TradeWatch.RemoveTab(tab.Id);\nPrint(\"Tab removed: {0}\", isRemoved);","python":"tab = api.TradeWatch.AddTab(\"Temporary Tab\")\nisRemoved = api.TradeWatch.RemoveTab(tab.Id)\napi.Print(f\"Tab removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/RemoveTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/RemoveTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.TradeWatch.RemoveTab(cAlgo.API.TradeWatchTab)","kind":"method","name":"RemoveTab","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool RemoveTab(TradeWatchTab tab)","python":"api.TradeWatch.RemoveTab(tab: TradeWatchTab) -> bool","summary":"Removes a tab.","remarks":null,"parameters":[{"name":"tab","csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"Tab"}],"returns":{"csharpType":"bool","pythonType":"bool","summary":"True if tab was removed otherwise false.","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"Temporary Tab\");\nvar isRemoved = TradeWatch.RemoveTab(tab);\nPrint(\"Tab removed: {0}\", isRemoved);","python":"tab = api.TradeWatch.AddTab(\"Temporary Tab\")\nisRemoved = api.TradeWatch.RemoveTab(tab)\napi.Print(f\"Tab removed: {isRemoved}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/RemoveTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/RemoveTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatch.Height","kind":"property","name":"Height","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"double Height {get; set;}","python":"api.TradeWatch.Height: float","summary":"Get / set height of trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"TradeWatch.Height = 300;\nPrint(\"Trade watch height: {0}\", TradeWatch.Height);","python":"api.TradeWatch.Height = 300\napi.Print(f\"Trade watch height: {api.TradeWatch.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatch.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool IsVisible {get; set;}","python":"api.TradeWatch.IsVisible: bool","summary":"Get / set visibility of trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"TradeWatch.IsVisible = !TradeWatch.IsVisible;\nPrint(\"Trade watch is visible: {0}\", TradeWatch.IsVisible);","python":"api.TradeWatch.IsVisible = not api.TradeWatch.IsVisible\napi.Print(f\"Trade watch is visible: {api.TradeWatch.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatch.Width","kind":"property","name":"Width","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"double Width {get;}","python":"api.TradeWatch.Width: float","summary":"Get / set width of trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"Print(\"Trade watch width: {0}\", TradeWatch.Width);","python":"api.Print(f\"Trade watch width: {api.TradeWatch.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatch.IsVisibleChanged","kind":"event","name":"IsVisibleChanged","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchIsVisibleChangedEventArgs> IsVisibleChanged;","python":"api.TradeWatch.IsVisibleChanged += handler  # handler(obj: TradeWatchIsVisibleChangedEventArgs)","summary":"Occurs after trade watch visibility (IsVisible) changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchIsVisibleChangedEventArgs>","pythonType":"Callable[[TradeWatchIsVisibleChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.IsVisibleChanged += OnTradeWatchIsVisibleChanged;\n}\n\nprivate void OnTradeWatchIsVisibleChanged(TradeWatchIsVisibleChangedEventArgs args)\n{\n    Print(\"Trade watch is visible: {0}\", args.TradeWatch.IsVisible);\n}","python":"def on_start(self):\n    api.TradeWatch.IsVisibleChanged += self.on_trade_watch_is_visible_changed\n\ndef on_trade_watch_is_visible_changed(self, args):\n    api.Print(f\"Trade watch is visible: {args.TradeWatch.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/IsVisibleChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/IsVisibleChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatch.SizeChanged","kind":"event","name":"SizeChanged","type":"T:cAlgo.API.TradeWatch","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchSizeChangedEventArgs> SizeChanged;","python":"api.TradeWatch.SizeChanged += handler  # handler(obj: TradeWatchSizeChangedEventArgs)","summary":"Occurs after trade watch size (height / width) changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchSizeChangedEventArgs>","pythonType":"Callable[[TradeWatchSizeChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.SizeChanged += OnTradeWatchSizeChanged;\n}\n\nprivate void OnTradeWatchSizeChanged(TradeWatchSizeChangedEventArgs args)\n{\n    Print(\"Trade watch size changed: {0}x{1}\", args.TradeWatch.Width, args.TradeWatch.Height);\n}","python":"def on_start(self):\n    api.TradeWatch.SizeChanged += self.on_trade_watch_size_changed\n\ndef on_trade_watch_size_changed(self, args):\n    api.Print(f\"Trade watch size changed: {args.TradeWatch.Width}x{args.TradeWatch.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/SizeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatch/SizeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchIsVisibleChangedEventArgs","kind":"class","name":"TradeWatchIsVisibleChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchIsVisibleChangedEventArgs","python":"TradeWatchIsVisibleChangedEventArgs","summary":"Provides data for plugin trade watch IsVisibleChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.IsVisibleChanged += OnTradeWatchIsVisibleChanged;\n}\n\nprivate void OnTradeWatchIsVisibleChanged(TradeWatchIsVisibleChangedEventArgs args)\n{\n    Print(\"Trade watch is visible: {0}\", args.TradeWatch.IsVisible);\n}","python":"def on_start(self):\n    api.TradeWatch.IsVisibleChanged += self.on_trade_watch_is_visible_changed\n\ndef on_trade_watch_is_visible_changed(self, args):\n    api.Print(f\"Trade watch is visible: {args.TradeWatch.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchIsVisibleChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchIsVisibleChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchIsVisibleChangedEventArgs.TradeWatch","kind":"property","name":"TradeWatch","type":"T:cAlgo.API.TradeWatchIsVisibleChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatch TradeWatch {get;}","python":"tradeWatchIsVisibleChangedEventArgs.TradeWatch: TradeWatch","summary":"Trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatch","pythonType":"TradeWatch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.IsVisibleChanged += OnTradeWatchIsVisibleChanged;\n}\n\nprivate void OnTradeWatchIsVisibleChanged(TradeWatchIsVisibleChangedEventArgs args)\n{\n    if (args.TradeWatch.IsVisible)\n        Print(\"Trade watch shown, size: {0} x {1}\", args.TradeWatch.Width, args.TradeWatch.Height);\n}","python":"def on_start(self):\n    api.TradeWatch.IsVisibleChanged += self.on_trade_watch_is_visible_changed\n\ndef on_trade_watch_is_visible_changed(self, args):\n    if args.TradeWatch.IsVisible:\n        api.Print(f\"Trade watch shown, size: {args.TradeWatch.Width} x {args.TradeWatch.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchIsVisibleChangedEventArgs/TradeWatch/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchIsVisibleChangedEventArgs/TradeWatch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchSizeChangedEventArgs","kind":"class","name":"TradeWatchSizeChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchSizeChangedEventArgs","python":"TradeWatchSizeChangedEventArgs","summary":"Provides data for plugin trade watch SizeChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.SizeChanged += OnTradeWatchSizeChanged;\n}\n\nprivate void OnTradeWatchSizeChanged(TradeWatchSizeChangedEventArgs args)\n{\n    Print(\"Trade watch resized to {0} x {1}\", args.TradeWatch.Width, args.TradeWatch.Height);\n}","python":"def on_start(self):\n    api.TradeWatch.SizeChanged += self.on_trade_watch_size_changed\n\ndef on_trade_watch_size_changed(self, args):\n    api.Print(f\"Trade watch resized to {args.TradeWatch.Width} x {args.TradeWatch.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchSizeChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchSizeChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchSizeChangedEventArgs.TradeWatch","kind":"property","name":"TradeWatch","type":"T:cAlgo.API.TradeWatchSizeChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatch TradeWatch {get;}","python":"tradeWatchSizeChangedEventArgs.TradeWatch: TradeWatch","summary":"Trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatch","pythonType":"TradeWatch","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    TradeWatch.SizeChanged += OnTradeWatchSizeChanged;\n}\n\nprivate void OnTradeWatchSizeChanged(TradeWatchSizeChangedEventArgs args)\n{\n    if (args.TradeWatch.Height < 150)\n        Print(\"Trade watch is too small to show details: {0}\", args.TradeWatch.Height);\n}","python":"def on_start(self):\n    api.TradeWatch.SizeChanged += self.on_trade_watch_size_changed\n\ndef on_trade_watch_size_changed(self, args):\n    if args.TradeWatch.Height < 150:\n        api.Print(f\"Trade watch is too small to show details: {args.TradeWatch.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchSizeChangedEventArgs/TradeWatch/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchSizeChangedEventArgs/TradeWatch/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchTab","kind":"interface","name":"TradeWatchTab","type":null,"namespace":"cAlgo.API","group":"TradeWatch","csharp":"public interface TradeWatchTab","python":"TradeWatchTab","summary":"Represents a trade watch panel tab.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.Child = new TextBlock { Text = \"Hello from my plugin\" };\ntab.IsBalanceBarVisible = false;\ntab.IsSelected = true;\nPrint(\"Trade watch tab {0} added at index {1}\", tab.Title, tab.Index);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntextBlock = TextBlock()\ntextBlock.Text = \"Hello from my plugin\"\ntab.Child = textBlock\ntab.IsBalanceBarVisible = False\ntab.IsSelected = True\napi.Print(f\"Trade watch tab {tab.Title} added at index {tab.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.TradeWatchTab.Attach","kind":"method","name":"Attach","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool Attach()","python":"tradeWatchTab.Attach() -> bool","summary":"Attaches current tab back to trade watch.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.Detach();\nvar isAttached = tab.Attach();\nPrint(\"Tab attached back: {0}\", isAttached);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntab.Detach()\nisAttached = tab.Attach()\napi.Print(f\"Tab attached back: {isAttached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attach/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attach/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"M:cAlgo.API.TradeWatchTab.Detach","kind":"method","name":"Detach","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool Detach()","python":"tradeWatchTab.Detach() -> bool","summary":"Detaches current tab to a separate window.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nvar isDetached = tab.Detach();\nPrint(\"Tab detached: {0}\", isDetached);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\nisDetached = tab.Detach()\napi.Print(f\"Tab detached: {isDetached}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detach/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detach/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Child","kind":"property","name":"Child","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"ControlBase Child {get; set;}","python":"tradeWatchTab.Child: ControlBase","summary":"Get / set content of current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nvar panel = new StackPanel { Orientation = Orientation.Horizontal };\npanel.AddChild(new TextBlock { Text = \"Tab content\" });\ntab.Child = panel;","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\npanel = StackPanel()\npanel.Orientation = Orientation.Horizontal\ntextBlock = TextBlock()\ntextBlock.Text = \"Tab content\"\npanel.AddChild(textBlock)\ntab.Child = panel"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.DetachedWindow","kind":"property","name":"DetachedWindow","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"DetachedWindow DetachedWindow {get;}","python":"tradeWatchTab.DetachedWindow: DetachedWindow","summary":"Returns detached window properties.","remarks":null,"parameters":[],"returns":{"csharpType":"DetachedWindow","pythonType":"DetachedWindow","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.DetachedWindow.Width = 800;\ntab.DetachedWindow.Height = 400;\ntab.Detach();","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntab.DetachedWindow.Width = 800\ntab.DetachedWindow.Height = 400\ntab.Detach()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/DetachedWindow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/DetachedWindow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Height","kind":"property","name":"Height","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"double Height {get;}","python":"tradeWatchTab.Height: float","summary":"Returns current height of tab.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nPrint(\"Tab height: {0}\", tab.Height);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\napi.Print(f\"Tab height: {tab.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Id","kind":"property","name":"Id","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"string Id {get;}","python":"tradeWatchTab.Id: str","summary":"Returns unique ID of the current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nPrint(\"Tab ID: {0}\", tab.Id);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\napi.Print(f\"Tab ID: {tab.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Index","kind":"property","name":"Index","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"int Index {get; set;}","python":"tradeWatchTab.Index: int","summary":"Get / set the index of the tab.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.Index = 0;\nPrint(\"Tab index: {0}\", tab.Index);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntab.Index = 0\napi.Print(f\"Tab index: {tab.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Index/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Index/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.IsBalanceBarVisible","kind":"property","name":"IsBalanceBarVisible","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool IsBalanceBarVisible {get; set;}","python":"tradeWatchTab.IsBalanceBarVisible: bool","summary":"Get / set the visibility of balance bar for the tab.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.IsBalanceBarVisible = false;\nPrint(\"Balance bar visible: {0}\", tab.IsBalanceBarVisible);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntab.IsBalanceBarVisible = False\napi.Print(f\"Balance bar visible: {tab.IsBalanceBarVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsBalanceBarVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsBalanceBarVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.IsSelected","kind":"property","name":"IsSelected","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"bool IsSelected {get; set;}","python":"tradeWatchTab.IsSelected: bool","summary":"Get / set selected state of current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\ntab.IsSelected = true;\nPrint(\"Tab is selected: {0}\", tab.IsSelected);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\ntab.IsSelected = True\napi.Print(f\"Tab is selected: {tab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelected/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Title","kind":"property","name":"Title","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"string Title {get;}","python":"tradeWatchTab.Title: str","summary":"Returns title of the current tab.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nPrint(\"Tab title: {0}\", tab.Title);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\napi.Print(f\"Tab title: {tab.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTab.Width","kind":"property","name":"Width","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"double Width {get;}","python":"tradeWatchTab.Width: float","summary":"Returns current width of tab.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var tab = TradeWatch.AddTab(\"My Tab\");\nPrint(\"Tab width: {0}\", tab.Width);","python":"tab = api.TradeWatch.AddTab(\"My Tab\")\napi.Print(f\"Tab width: {tab.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatchTab.Attached","kind":"event","name":"Attached","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchTabAttachedEventArgs> Attached;","python":"tradeWatchTab.Attached += handler  # handler(obj: TradeWatchTabAttachedEventArgs)","summary":"Occurs when tab attached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchTabAttachedEventArgs>","pythonType":"Callable[[TradeWatchTabAttachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Attached += OnTabAttached;\n}\n\nprivate void OnTabAttached(TradeWatchTabAttachedEventArgs args)\n{\n    Print(\"Tab {0} attached\", args.TradeWatchTab.Title);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.Attached += self.on_tab_attached\n\ndef on_tab_attached(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} attached\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Attached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatchTab.Detached","kind":"event","name":"Detached","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchTabDetachedEventArgs> Detached;","python":"tradeWatchTab.Detached += handler  # handler(obj: TradeWatchTabDetachedEventArgs)","summary":"Occurs when tab detached.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchTabDetachedEventArgs>","pythonType":"Callable[[TradeWatchTabDetachedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Detached += OnTabDetached;\n}\n\nprivate void OnTabDetached(TradeWatchTabDetachedEventArgs args)\n{\n    Print(\"Tab {0} detached\", args.TradeWatchTab.Title);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.Detached += self.on_tab_detached\n\ndef on_tab_detached(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} detached\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detached/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/Detached/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatchTab.IsSelectedChanged","kind":"event","name":"IsSelectedChanged","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchTabIsSelectedChangedEventArgs> IsSelectedChanged;","python":"tradeWatchTab.IsSelectedChanged += handler  # handler(obj: TradeWatchTabIsSelectedChangedEventArgs)","summary":"Occurs after tab IsSelected value change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchTabIsSelectedChangedEventArgs>","pythonType":"Callable[[TradeWatchTabIsSelectedChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.IsSelectedChanged += OnTabIsSelectedChanged;\n}\n\nprivate void OnTabIsSelectedChanged(TradeWatchTabIsSelectedChangedEventArgs args)\n{\n    Print(\"Tab {0} is selected: {1}\", args.TradeWatchTab.Title, args.TradeWatchTab.IsSelected);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.IsSelectedChanged += self.on_tab_is_selected_changed\n\ndef on_tab_is_selected_changed(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} is selected: {args.TradeWatchTab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelectedChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/IsSelectedChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"E:cAlgo.API.TradeWatchTab.SizeChanged","kind":"event","name":"SizeChanged","type":"T:cAlgo.API.TradeWatchTab","namespace":"cAlgo.API","group":"TradeWatch","csharp":"event Action<TradeWatchTabSizeChangedEventArgs> SizeChanged;","python":"tradeWatchTab.SizeChanged += handler  # handler(obj: TradeWatchTabSizeChangedEventArgs)","summary":"Occurs after tab size (height / width) value change.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<TradeWatchTabSizeChangedEventArgs>","pythonType":"Callable[[TradeWatchTabSizeChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.SizeChanged += OnTabSizeChanged;\n}\n\nprivate void OnTabSizeChanged(TradeWatchTabSizeChangedEventArgs args)\n{\n    Print(\"Tab size changed: {0}x{1}\", args.TradeWatchTab.Width, args.TradeWatchTab.Height);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.SizeChanged += self.on_tab_size_changed\n\ndef on_tab_size_changed(self, args):\n    api.Print(f\"Tab size changed: {args.TradeWatchTab.Width}x{args.TradeWatchTab.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/SizeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Plugin/TradeWatch/TradeWatchTab/SizeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchTabAttachedEventArgs","kind":"class","name":"TradeWatchTabAttachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchTabAttachedEventArgs","python":"TradeWatchTabAttachedEventArgs","summary":"Provides data for plugin trade watch tab attached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Child = new TextBlock { Text = \"Hello from plugin\" };\n    tab.Attached += OnTradeWatchTabAttached;\n}\n\nprivate void OnTradeWatchTabAttached(TradeWatchTabAttachedEventArgs args)\n{\n    Print(\"Tab {0} attached back to the trade watch\", args.TradeWatchTab.Title);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    tab.Child = text_block\n    tab.Attached += self.on_trade_watch_tab_attached\n\ndef on_trade_watch_tab_attached(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} attached back to the trade watch\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabAttachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabAttachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTabAttachedEventArgs.TradeWatchTab","kind":"property","name":"TradeWatchTab","type":"T:cAlgo.API.TradeWatchTabAttachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatchTab TradeWatchTab {get;}","python":"tradeWatchTabAttachedEventArgs.TradeWatchTab: TradeWatchTab","summary":"Attached tab.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Attached += OnTradeWatchTabAttached;\n}\n\nprivate void OnTradeWatchTabAttached(TradeWatchTabAttachedEventArgs args)\n{\n    Print(\"Tab {0} attached at index {1}\", args.TradeWatchTab.Id, args.TradeWatchTab.Index);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.Attached += self.on_trade_watch_tab_attached\n\ndef on_trade_watch_tab_attached(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Id} attached at index {args.TradeWatchTab.Index}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabAttachedEventArgs/TradeWatchTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabAttachedEventArgs/TradeWatchTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchTabDetachedEventArgs","kind":"class","name":"TradeWatchTabDetachedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchTabDetachedEventArgs","python":"TradeWatchTabDetachedEventArgs","summary":"Provides data for plugin trade watch tab detached event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Child = new TextBlock { Text = \"Hello from plugin\" };\n    tab.Detached += OnTradeWatchTabDetached;\n}\n\nprivate void OnTradeWatchTabDetached(TradeWatchTabDetachedEventArgs args)\n{\n    Print(\"Tab {0} detached from the trade watch\", args.TradeWatchTab.Title);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    tab.Child = text_block\n    tab.Detached += self.on_trade_watch_tab_detached\n\ndef on_trade_watch_tab_detached(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} detached from the trade watch\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabDetachedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabDetachedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTabDetachedEventArgs.TradeWatchTab","kind":"property","name":"TradeWatchTab","type":"T:cAlgo.API.TradeWatchTabDetachedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatchTab TradeWatchTab {get;}","python":"tradeWatchTabDetachedEventArgs.TradeWatchTab: TradeWatchTab","summary":"Detached tab.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Detached += OnTradeWatchTabDetached;\n}\n\nprivate void OnTradeWatchTabDetached(TradeWatchTabDetachedEventArgs args)\n{\n    Print(\"Detached tab {0} size: {1} x {2}\", args.TradeWatchTab.Id, args.TradeWatchTab.Width, args.TradeWatchTab.Height);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.Detached += self.on_trade_watch_tab_detached\n\ndef on_trade_watch_tab_detached(self, args):\n    api.Print(f\"Detached tab {args.TradeWatchTab.Id} size: {args.TradeWatchTab.Width} x {args.TradeWatchTab.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabDetachedEventArgs/TradeWatchTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabDetachedEventArgs/TradeWatchTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchTabIsSelectedChangedEventArgs","kind":"class","name":"TradeWatchTabIsSelectedChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchTabIsSelectedChangedEventArgs","python":"TradeWatchTabIsSelectedChangedEventArgs","summary":"Provides data for plugin trade watch tab IsSelectedChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Child = new TextBlock { Text = \"Hello from plugin\" };\n    tab.IsSelectedChanged += OnTradeWatchTabIsSelectedChanged;\n}\n\nprivate void OnTradeWatchTabIsSelectedChanged(TradeWatchTabIsSelectedChangedEventArgs args)\n{\n    Print(\"Tab {0} is selected: {1}\", args.TradeWatchTab.Title, args.TradeWatchTab.IsSelected);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    tab.Child = text_block\n    tab.IsSelectedChanged += self.on_trade_watch_tab_is_selected_changed\n\ndef on_trade_watch_tab_is_selected_changed(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} is selected: {args.TradeWatchTab.IsSelected}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabIsSelectedChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabIsSelectedChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTabIsSelectedChangedEventArgs.TradeWatchTab","kind":"property","name":"TradeWatchTab","type":"T:cAlgo.API.TradeWatchTabIsSelectedChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatchTab TradeWatchTab {get;}","python":"tradeWatchTabIsSelectedChangedEventArgs.TradeWatchTab: TradeWatchTab","summary":"Trade watch tab.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.IsSelectedChanged += OnTradeWatchTabIsSelectedChanged;\n}\n\nprivate void OnTradeWatchTabIsSelectedChanged(TradeWatchTabIsSelectedChangedEventArgs args)\n{\n    if (args.TradeWatchTab.IsSelected)\n        args.TradeWatchTab.Child = new TextBlock { Text = \"Balance: \" + Account.Balance };\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.IsSelectedChanged += self.on_trade_watch_tab_is_selected_changed\n\ndef on_trade_watch_tab_is_selected_changed(self, args):\n    if args.TradeWatchTab.IsSelected:\n        text_block = TextBlock()\n        text_block.Text = f\"Balance: {api.Account.Balance}\"\n        args.TradeWatchTab.Child = text_block"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabIsSelectedChangedEventArgs/TradeWatchTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabIsSelectedChangedEventArgs/TradeWatchTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradeWatchTabSizeChangedEventArgs","kind":"class","name":"TradeWatchTabSizeChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class TradeWatchTabSizeChangedEventArgs","python":"TradeWatchTabSizeChangedEventArgs","summary":"Provides data for plugin trade watch tab SizeChanged event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.Child = new TextBlock { Text = \"Hello from plugin\" };\n    tab.SizeChanged += OnTradeWatchTabSizeChanged;\n}\n\nprivate void OnTradeWatchTabSizeChanged(TradeWatchTabSizeChangedEventArgs args)\n{\n    Print(\"Tab {0} resized to {1} x {2}\", args.TradeWatchTab.Title, args.TradeWatchTab.Width, args.TradeWatchTab.Height);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    text_block = TextBlock()\n    text_block.Text = \"Hello from plugin\"\n    tab.Child = text_block\n    tab.SizeChanged += self.on_trade_watch_tab_size_changed\n\ndef on_trade_watch_tab_size_changed(self, args):\n    api.Print(f\"Tab {args.TradeWatchTab.Title} resized to {args.TradeWatchTab.Width} x {args.TradeWatchTab.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"P:cAlgo.API.TradeWatchTabSizeChangedEventArgs.TradeWatchTab","kind":"property","name":"TradeWatchTab","type":"T:cAlgo.API.TradeWatchTabSizeChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public TradeWatchTab TradeWatchTab {get;}","python":"tradeWatchTabSizeChangedEventArgs.TradeWatchTab: TradeWatchTab","summary":"Trade watch tab.","remarks":null,"parameters":[],"returns":{"csharpType":"TradeWatchTab","pythonType":"TradeWatchTab","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var tab = TradeWatch.AddTab(\"My Tab\");\n    tab.SizeChanged += OnTradeWatchTabSizeChanged;\n}\n\nprivate void OnTradeWatchTabSizeChanged(TradeWatchTabSizeChangedEventArgs args)\n{\n    if (args.TradeWatchTab.Width < 300)\n        Print(\"Tab {0} is narrow: {1}\", args.TradeWatchTab.Id, args.TradeWatchTab.Width);\n}","python":"def on_start(self):\n    tab = api.TradeWatch.AddTab(\"My Tab\")\n    tab.SizeChanged += self.on_trade_watch_tab_size_changed\n\ndef on_trade_watch_tab_size_changed(self, args):\n    if args.TradeWatchTab.Width < 300:\n        api.Print(f\"Tab {args.TradeWatchTab.Id} is narrow: {args.TradeWatchTab.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/TradeWatchTab/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/TradeWatchTab/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the CLI."},{"name":"Cloud","support":"None","behaviour":"Available to plugins only, and plugins cannot run in the cloud."}]}
{"id":"T:cAlgo.API.TradingHoliday","kind":"interface","name":"TradingHoliday","type":null,"namespace":"cAlgo.API","group":"Symbols","csharp":"public interface TradingHoliday","python":"TradingHoliday","summary":"Represents a symbol trading holiday.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var holiday in Symbol.MarketHours.Holidays)\n    Print(\"{0} from {1} to {2}, recurring: {3}\", holiday.Name, holiday.StartTime, holiday.EndTime, holiday.IsRecurring);","python":"for holiday in api.Symbol.MarketHours.Holidays:\n    api.Print(f\"{holiday.Name} from {holiday.StartTime} to {holiday.EndTime}, recurring: {holiday.IsRecurring}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradingHoliday.EndTime","kind":"property","name":"EndTime","type":"T:cAlgo.API.TradingHoliday","namespace":"cAlgo.API","group":"Symbols","csharp":"DateTime EndTime {get;}","python":"tradingHoliday.EndTime: DateTime","summary":"Gets the end date and time of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var isHolidayNow = Symbol.MarketHours.Holidays.Any(holiday => Server.Time >= holiday.StartTime && Server.Time <= holiday.EndTime);\nPrint(\"Trading holiday now: {0}\", isHolidayNow);","python":"isHolidayNow = any(holiday.StartTime <= api.Server.Time <= holiday.EndTime for holiday in api.Symbol.MarketHours.Holidays)\napi.Print(f\"Trading holiday now: {isHolidayNow}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/EndTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/EndTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradingHoliday.IsRecurring","kind":"property","name":"IsRecurring","type":"T:cAlgo.API.TradingHoliday","namespace":"cAlgo.API","group":"Symbols","csharp":"bool IsRecurring {get;}","python":"tradingHoliday.IsRecurring: bool","summary":"Gets a value indicating whether the trading holiday is recurring.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var holiday in Symbol.MarketHours.Holidays.Where(holiday => holiday.IsRecurring))\n    Print(\"Recurring holiday: {0}\", holiday.Name);","python":"for holiday in api.Symbol.MarketHours.Holidays:\n    if holiday.IsRecurring:\n        api.Print(f\"Recurring holiday: {holiday.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/IsRecurring/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/IsRecurring/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradingHoliday.Name","kind":"property","name":"Name","type":"T:cAlgo.API.TradingHoliday","namespace":"cAlgo.API","group":"Symbols","csharp":"string Name {get;}","python":"tradingHoliday.Name: str","summary":"Gets the name of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var holiday in Symbol.MarketHours.Holidays)\n    Print(\"Holiday: {0}\", holiday.Name);","python":"for holiday in api.Symbol.MarketHours.Holidays:\n    api.Print(f\"Holiday: {holiday.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.TradingHoliday.StartTime","kind":"property","name":"StartTime","type":"T:cAlgo.API.TradingHoliday","namespace":"cAlgo.API","group":"Symbols","csharp":"DateTime StartTime {get;}","python":"tradingHoliday.StartTime: DateTime","summary":"Gets the start date and time of the trading holiday.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var nextHoliday = Symbol.MarketHours.Holidays.Where(holiday => holiday.StartTime > Server.Time).OrderBy(holiday => holiday.StartTime).FirstOrDefault();\nif (nextHoliday != null)\n    Print(\"Next holiday {0} starts at {1}\", nextHoliday.Name, nextHoliday.StartTime);","python":"upcoming = [holiday for holiday in api.Symbol.MarketHours.Holidays if holiday.StartTime > api.Server.Time]\nif len(upcoming) > 0:\n    nextHoliday = min(upcoming, key=lambda holiday: holiday.StartTime)\n    api.Print(f\"Next holiday {nextHoliday.Name} starts at {nextHoliday.StartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/StartTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingHoliday/StartTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TradingPermission","kind":"interface","name":"TradingPermission","type":null,"namespace":"cAlgo.API","group":"Permissions","csharp":"public interface TradingPermission","python":"TradingPermission","summary":"Trading Permission","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (!Permissions.TradingPermission.IsAllowed && !Permissions.TradingPermission.Request())\n    Print(\"Trading permission was denied by the user\");","python":"if not api.Permissions.TradingPermission.IsAllowed and not api.Permissions.TradingPermission.Request():\n    api.Print(\"Trading permission was denied by the user\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Permissions/TradingPermission/","markdown":"https://help.ctrader.com/ctrader-algo/references/Permissions/TradingPermission/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Internals.TradingSession","kind":"interface","name":"TradingSession","type":null,"namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"public interface TradingSession","python":"TradingSession","summary":"Trading session schedule","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing cAlgo.API.Internals;\nusing System;\n\nnamespace cAlgo\n{\n    // This sample indicator shows how to use a symbol TradingSession\n    public partial class TradingSessionSample : Indicator\n    {\n        private TextBlock _isOpenedTextBlock;\n\n        private TextBlock _timeTillCloseTextBlock;\n\n        private TextBlock _timeTillOpenTextBlock;\n\n        private Symbol _symbol;\n\n        protected override void Initialize()\n        {\n            var grid = new Grid(6, 2)\n            {\n                BackgroundColor = Color.Gold,\n                Opacity = 0.6,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n            };\n\n            var style = new Style();\n\n            style.Set(ControlProperty.Padding, 1);\n            style.Set(ControlProperty.Margin, 2);\n            style.Set(ControlProperty.BackgroundColor, Color.Black);\n            style.Set(ControlProperty.FontSize, 8);\n\n            _symbol = UseCurrentSymbol ? Symbol : Symbols.GetSymbol(OtherSymbolName);\n\n            grid.AddChild(new TextBlock { Text = \"Symbol Info\", Style = style, HorizontalAlignment = HorizontalAlignment.Center }, 0, 0, 1, 2);\n\n            grid.AddChild(new TextBlock { Text = \"Time Till Open\", Style = style }, 1, 0);\n\n            _timeTillOpenTextBlock = new TextBlock { Text = _symbol.MarketHours.TimeTillOpen().ToString(), Style = style };\n\n            grid.AddChild(_timeTillOpenTextBlock, 1, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Time Till Close\", Style = style }, 2, 0);\n\n            _timeTillCloseTextBlock = new TextBlock { Text = _symbol.MarketHours.TimeTillClose().ToString(), Style = style };\n\n            grid.AddChild(_timeTillCloseTextBlock, 2, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Is Opened\", Style = style }, 3, 0);\n\n            _isOpenedTextBlock = new TextBlock { Text = _symbol.MarketHours.IsOpened().ToString(), Style = style };\n\n            grid.AddChild(_isOpenedTextBlock, 3, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Trading Sessions #\", Style = style }, 4, 0);\n\n            grid.AddChild(new TextBlock { Text = _symbol.MarketHours.Sessions.Count.ToString(), Style = style }, 4, 1);\n\n            grid.AddChild(new TextBlock { Text = \"Trading Session Week Days\", Style = style }, 5, 0);\n\n            var weekDays = string.Empty;\n\n            for (var iSession = 0; iSession < _symbol.MarketHours.Sessions.Count; iSession++)\n            {\n                var currentSessionWeekDays = string.Format(\"{0}({1})-{2}({3})\", _symbol.MarketHours.Sessions[iSession].StartDay, _symbol.MarketHours.Sessions[iSession].StartTime, _symbol.MarketHours.Sessions[iSession].EndDay, _symbol.MarketHours.Sessions[iSession].EndTime);\n                weekDays = iSession == 0 ? currentSessionWeekDays : string.Format(\"{0}, {1}\", weekDays, currentSessionWeekDays);\n            }\n\n            grid.AddChild(new TextBlock { Text = weekDays, Style = style }, 5, 1);\n\n            Chart.AddControl(grid);\n\n            Timer.Start(TimeSpan.FromSeconds(1));\n        }\n\n        protected override void OnTimer()\n        {\n            _timeTillOpenTextBlock.Text = _symbol.MarketHours.TimeTillOpen().ToString();\n            _timeTillCloseTextBlock.Text = _symbol.MarketHours.TimeTillClose().ToString();\n            _isOpenedTextBlock.Text = _symbol.MarketHours.IsOpened().ToString();\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass TradingSessionSample():\n    def initialize(self):\n        grid = Grid(6, 2)\n        grid.BackgroundColor = Color.Gold\n        grid.Opacity = 0.6\n        grid.HorizontalAlignment = HorizontalAlignment.Center\n        grid.VerticalAlignment = VerticalAlignment.Center\n\n        self.style = Style()\n\n        self.style.Set(ControlProperty.Padding, 1)\n        self.style.Set(ControlProperty.Margin, Thickness(2))\n        self.style.Set(ControlProperty.BackgroundColor, Color.Black)\n        self.style.Set(ControlProperty.FontSize, 8)\n\n        self.symbol = api.Symbol if api.UseCurrentSymbol else api.Symbols.GetSymbol(api.OtherSymbolName)\n\n        grid.AddChild(self.get_text_block(\"Symbol Info\", HorizontalAlignment.Center), 0, 0, 1, 2)\n\n        grid.AddChild(self.get_text_block(\"Time Till Open\"), 1, 0)\n\n        self.timeTillOpenTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillOpen()))\n\n        grid.AddChild(self.timeTillOpenTextBlock, 1, 1)\n\n        grid.AddChild(self.get_text_block(\"Time Till Close\"), 2, 0)\n\n        self.timeTillCloseTextBlock = self.get_text_block(str(self.symbol.MarketHours.TimeTillClose()))\n\n        grid.AddChild(self.timeTillCloseTextBlock, 2, 1)\n\n        grid.AddChild(self.get_text_block(\"Is Opened\"), 3, 0)\n\n        self.isOpenedTextBlock = self.get_text_block(str(self.symbol.MarketHours.IsOpened()))\n\n        grid.AddChild(self.isOpenedTextBlock, 3, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Sessions #\"), 4, 0)\n        grid.AddChild(self.get_text_block(str(self.symbol.MarketHours.Sessions.Count)), 4, 1)\n\n        grid.AddChild(self.get_text_block(\"Trading Session Week Days\"), 5, 0)\n\n        weekDays = \"\"\n\n        for iSession in range(self.symbol.MarketHours.Sessions.Count):\n            currentSessionWeekDays = f\"{self.symbol.MarketHours.Sessions[iSession].StartDay}({self.symbol.MarketHours.Sessions[iSession].StartTime})-{self.symbol.MarketHours.Sessions[iSession].EndDay}({self.symbol.MarketHours.Sessions[iSession].EndTime})\"\n            weekDays = currentSessionWeekDays if iSession == 0 else f\"{weekDays}, {currentSessionWeekDays}\"\n\n        grid.AddChild(self.get_text_block(weekDays), 5, 1)\n\n        api.Chart.AddControl(grid)\n\n        api.Timer.Start(1)\n\n    def on_timer(self):\n        self.timeTillOpenTextBlock.Text = str(self.symbol.MarketHours.TimeTillOpen())\n        self.timeTillCloseTextBlock.Text = str(self.symbol.MarketHours.TimeTillClose())\n        self.isOpenedTextBlock.Text = str(self.symbol.MarketHours.IsOpened())\n\n    def get_text_block(self, text, horizontalAlignment = None):\n        textBlock = TextBlock()\n        textBlock.Text = text\n        textBlock.Style = self.style\n        if horizontalAlignment is not None:\n            textBlock.HorizontalAlignment = horizontalAlignment\n        return textBlock","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"UseCurrentSymbol\",\n      \"DisplayName\": \"Use Current Symbol\",\n      \"Type\": \"Boolean\",\n      \"DefaultValue\": true\n    },\n    {\n      \"Name\": \"OtherSymbolName\",\n      \"DisplayName\": \"Other Symbol Name\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"GBPUSD\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.TradingSession.EndDay","kind":"property","name":"EndDay","type":"T:cAlgo.API.Internals.TradingSession","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"DayOfWeek EndDay {get;}","python":"tradingSession.EndDay: DayOfWeek","summary":"Day of week when trading session ends","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var session in Symbol.MarketHours.Sessions)\n    Print(\"Session ends on {0}\", session.EndDay);","python":"for session in api.Symbol.MarketHours.Sessions:\n    api.Print(f\"Session ends on {session.EndDay}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/EndDay/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/EndDay/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.TradingSession.EndTime","kind":"property","name":"EndTime","type":"T:cAlgo.API.Internals.TradingSession","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"TimeSpan EndTime {get;}","python":"tradingSession.EndTime: TimeSpan","summary":"Time when trading session ends","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var session in Symbol.MarketHours.Sessions)\n    Print(\"{0} session ends at {1}\", session.EndDay, session.EndTime);","python":"for session in api.Symbol.MarketHours.Sessions:\n    api.Print(f\"{session.EndDay} session ends at {session.EndTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/EndTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/EndTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.TradingSession.StartDay","kind":"property","name":"StartDay","type":"T:cAlgo.API.Internals.TradingSession","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"DayOfWeek StartDay {get;}","python":"tradingSession.StartDay: DayOfWeek","summary":"Day of week when trading session starts","remarks":null,"parameters":[],"returns":{"csharpType":"DayOfWeek","pythonType":"DayOfWeek","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var session in Symbol.MarketHours.Sessions)\n    Print(\"Session starts on {0}\", session.StartDay);","python":"for session in api.Symbol.MarketHours.Sessions:\n    api.Print(f\"Session starts on {session.StartDay}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/StartDay/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/StartDay/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Internals.TradingSession.StartTime","kind":"property","name":"StartTime","type":"T:cAlgo.API.Internals.TradingSession","namespace":"cAlgo.API.Internals","group":"Symbols","csharp":"TimeSpan StartTime {get;}","python":"tradingSession.StartTime: TimeSpan","summary":"Time when trading session starts","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var session in Symbol.MarketHours.Sessions)\n    Print(\"{0} session starts at {1}\", session.StartDay, session.StartTime);","python":"for session in api.Symbol.MarketHours.Sessions:\n    api.Print(f\"{session.StartDay} session starts at {session.StartTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/StartTime/","markdown":"https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/TradingSession/StartTime/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Transaction","kind":"interface","name":"Transaction","type":null,"namespace":"cAlgo.API","group":"Transactions","csharp":"public interface Transaction","python":"Transaction","summary":"Represents an account transaction.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n    Print(\"{0} {1} {2}, balance after: {3}, note: {4}\", transaction.Time, transaction.Type, transaction.Amount, transaction.Balance, transaction.Note);","python":"for transaction in api.Transactions:\n    api.Print(f\"{transaction.Time} {transaction.Type} {transaction.Amount}, balance after: {transaction.Balance}, note: {transaction.Note}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Amount","kind":"property","name":"Amount","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"double Amount {get;}","python":"transaction.Amount: float","summary":"Gets transaction amount.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var deposited = Transactions.Where(transaction => transaction.Type == TransactionType.Deposit).Sum(transaction => transaction.Amount);\nPrint(\"Total deposited: {0}\", deposited);","python":"deposited = sum(transaction.Amount for transaction in api.Transactions if transaction.Type == TransactionType.Deposit)\napi.Print(f\"Total deposited: {deposited}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Amount/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Amount/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Balance","kind":"property","name":"Balance","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"double Balance {get;}","python":"transaction.Balance: float","summary":"Gets account balance after transaction.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n    Print(\"Balance after transaction {0}: {1}\", transaction.Id, transaction.Balance);","python":"for transaction in api.Transactions:\n    api.Print(f\"Balance after transaction {transaction.Id}: {transaction.Balance}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Balance/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Balance/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Equity","kind":"property","name":"Equity","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"double? Equity {get;}","python":"transaction.Equity: float | None","summary":"Gets account equity after transaction or null.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n{\n    if (transaction.Equity.HasValue)\n        Print(\"Equity after transaction {0}: {1}\", transaction.Id, transaction.Equity.Value);\n}","python":"for transaction in api.Transactions:\n    if transaction.Equity is not None:\n        api.Print(f\"Equity after transaction {transaction.Id}: {transaction.Equity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Equity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Equity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Id","kind":"property","name":"Id","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"long Id {get;}","python":"transaction.Id: int","summary":"Gets transaction Id.","remarks":null,"parameters":[],"returns":{"csharpType":"long","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n    Print(\"Transaction Id: {0}\", transaction.Id);","python":"for transaction in api.Transactions:\n    api.Print(f\"Transaction Id: {transaction.Id}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Id/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Id/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.MaxEquity","kind":"property","name":"MaxEquity","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"double? MaxEquity {get;}","python":"transaction.MaxEquity: float | None","summary":"Gets account max equity after transaction or null.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n{\n    if (transaction.MaxEquity.HasValue)\n        Print(\"Max equity after transaction {0}: {1}\", transaction.Id, transaction.MaxEquity.Value);\n}","python":"for transaction in api.Transactions:\n    if transaction.MaxEquity is not None:\n        api.Print(f\"Max equity after transaction {transaction.Id}: {transaction.MaxEquity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/MaxEquity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/MaxEquity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.MinEquity","kind":"property","name":"MinEquity","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"double? MinEquity {get;}","python":"transaction.MinEquity: float | None","summary":"Gets account min equity after transaction or null.","remarks":null,"parameters":[],"returns":{"csharpType":"double?","pythonType":"float | None","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n{\n    if (transaction.MinEquity.HasValue)\n        Print(\"Min equity after transaction {0}: {1}\", transaction.Id, transaction.MinEquity.Value);\n}","python":"for transaction in api.Transactions:\n    if transaction.MinEquity is not None:\n        api.Print(f\"Min equity after transaction {transaction.Id}: {transaction.MinEquity}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/MinEquity/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/MinEquity/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Note","kind":"property","name":"Note","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"string Note {get;}","python":"transaction.Note: str","summary":"Gets transaction note if has otherwise null.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"foreach (var transaction in Transactions)\n{\n    if (transaction.Note != null)\n        Print(\"Transaction {0} note: {1}\", transaction.Id, transaction.Note);\n}","python":"for transaction in api.Transactions:\n    if transaction.Note is not None:\n        api.Print(f\"Transaction {transaction.Id} note: {transaction.Note}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Note/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Note/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Time","kind":"property","name":"Time","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"DateTime Time {get;}","python":"transaction.Time: DateTime","summary":"Gets transaction time.","remarks":null,"parameters":[],"returns":{"csharpType":"DateTime","pythonType":"DateTime","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var lastMonth = Transactions.Where(transaction => transaction.Time > Server.Time.AddMonths(-1)).ToArray();\nPrint(\"Transactions in the last month: {0}\", lastMonth.Length);","python":"lastMonth = [transaction for transaction in api.Transactions if transaction.Time > api.Server.Time.AddMonths(-1)]\napi.Print(f\"Transactions in the last month: {len(lastMonth)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Time/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Time/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transaction.Type","kind":"property","name":"Type","type":"T:cAlgo.API.Transaction","namespace":"cAlgo.API","group":"Transactions","csharp":"TransactionType Type {get;}","python":"transaction.Type: TransactionType","summary":"Gets transaction type.","remarks":null,"parameters":[],"returns":{"csharpType":"TransactionType","pythonType":"TransactionType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var withdrawals = Transactions.Count(transaction => transaction.Type == TransactionType.Withdrawal);\nPrint(\"Withdrawals: {0}\", withdrawals);","python":"withdrawals = len([transaction for transaction in api.Transactions if transaction.Type == TransactionType.Withdrawal])\napi.Print(f\"Withdrawals: {withdrawals}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Type/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transaction/Type/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.TransactionType","kind":"enum","name":"TransactionType","type":null,"namespace":"cAlgo.API","group":"Transactions","csharp":"public enum TransactionType","python":"TransactionType","summary":"Represents the different types of account transactions.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"var deposits = Transactions.Where(transaction => transaction.Type == TransactionType.Deposit).Sum(transaction => transaction.Amount);\nvar withdrawals = Transactions.Where(transaction => transaction.Type == TransactionType.Withdrawal).Sum(transaction => transaction.Amount);\nPrint(\"Deposits: {0}, withdrawals: {1}\", deposits, withdrawals);","python":"deposits = sum(transaction.Amount for transaction in api.Transactions if transaction.Type == TransactionType.Deposit)\nwithdrawals = sum(transaction.Amount for transaction in api.Transactions if transaction.Type == TransactionType.Withdrawal)\napi.Print(f\"Deposits: {deposits}, withdrawals: {withdrawals}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TransactionType.Deposit","kind":"enum value","name":"Deposit","type":"T:cAlgo.API.TransactionType","namespace":"cAlgo.API","group":"Transactions","csharp":"TransactionType.Deposit;","python":"TransactionType.Deposit","summary":"Represents a deposit transaction.","remarks":null,"parameters":[],"returns":{"csharpType":"TransactionType","pythonType":"TransactionType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.TransactionType.Withdrawal","kind":"enum value","name":"Withdrawal","type":"T:cAlgo.API.TransactionType","namespace":"cAlgo.API","group":"Transactions","csharp":"TransactionType.Withdrawal;","python":"TransactionType.Withdrawal","summary":"Represents a withdrawal transaction.","remarks":null,"parameters":[],"returns":{"csharpType":"TransactionType","pythonType":"TransactionType","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/TransactionType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Transactions","kind":"interface","name":"Transactions","type":null,"namespace":"cAlgo.API","group":"Transactions","csharp":"public interface Transactions","python":"Transactions","summary":"Represents account transactions collection.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Transactions count: {0}\", Transactions.Count);\n\nforeach (var transaction in Transactions)\n    Print(\"Id: {0}, Amount: {1}, Type: {2}, Time: {3}\", transaction.Id, transaction.Amount, transaction.Type, transaction.Time);","python":"api.Print(f\"Transactions count: {api.Transactions.Count}\")\n\nfor transaction in api.Transactions:\n    api.Print(f\"Id: {transaction.Id}, Amount: {transaction.Amount}, Type: {transaction.Type}, Time: {transaction.Time}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transactions.Count","kind":"property","name":"Count","type":"T:cAlgo.API.Transactions","namespace":"cAlgo.API","group":"Transactions","csharp":"int Count {get;}","python":"api.Transactions.Count: int","summary":"Gets count of transactions.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"Print(\"Account has {0} transactions\", Transactions.Count);","python":"api.Print(f\"Account has {api.Transactions.Count} transactions\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/Count/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/Count/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Transactions.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Transactions","namespace":"cAlgo.API","group":"Transactions","csharp":"Transaction Item {get;}","python":"api.Transactions[index: int] -> Transaction","summary":"Gets transaction by index.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"Transaction","pythonType":"Transaction","summary":"","nullable":false},"exceptions":[],"since":"5.2","deprecated":null,"examples":[{"csharp":"if (Transactions.Count > 0)\n    Print(\"First transaction: {0} {1}\", Transactions[0].Type, Transactions[0].Amount);","python":"if api.Transactions.Count > 0:\n    api.Print(f\"First transaction: {api.Transactions[0].Type} {api.Transactions[0].Amount}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Account/Transactions/Transactions/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TriangularMovingAverage","kind":"interface","name":"TriangularMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TriangularMovingAverage","python":"TriangularMovingAverage","summary":"The Triangular Moving Average is a moving average that gives more weith to values located in the middle of aggregated period.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TriangularMovingAverage _triangularMovingAverage;\nprotected override void Initialize()\n{\n    _triangularMovingAverage = Indicators.TriangularMovingAverage(Bars.ClosePrices, 9);\n}\n\npublic override void Calculate(int index)\n{\n    //Print the current value of _triangularMovingAverage to the log\n    Print(\"The current Triangular Moving Average is {0}\", _triangularMovingAverage.Result[index]);\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.triangularMovingAverage = api.Indicators.TriangularMovingAverage(api.Bars.ClosePrices, 9)\n\n    def calculate(self, index):\n        # print the current value of self.triangularMovingAverage to the log\n        api.Print(f\"The current Triangular Moving Average is {self.triangularMovingAverage.Result[index]}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Triangular Moving Average indicator\n    public partial class TriangularMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TriangularMovingAverage _fastTriangularMovingAverage;\n\n        private TriangularMovingAverage _slowTriangularMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastTriangularMovingAverage = Indicators.TriangularMovingAverage(FastMaSource, FastMaPeriod);\n            _slowTriangularMovingAverage = Indicators.TriangularMovingAverage(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastTriangularMovingAverage.Result.HasCrossedAbove(_slowTriangularMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastTriangularMovingAverage.Result.HasCrossedBelow(_slowTriangularMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TriangularMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastTriangularMovingAverage = api.Indicators.TriangularMovingAverage(api.FastMaSource, api.FastMaPeriod)\n        self.slowTriangularMovingAverage = api.Indicators.TriangularMovingAverage(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastTriangularMovingAverage.Result, self.slowTriangularMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastTriangularMovingAverage.Result, self.slowTriangularMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TriangularMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TriangularMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TripleExponentialMovingAverage","kind":"interface","name":"TripleExponentialMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TripleExponentialMovingAverage","python":"TripleExponentialMovingAverage","summary":"The Triple Exponential Moving Average (TEMA) is a technical indicator that provides a smoothed representation of price data by applying three levels of exponential smoothing","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TripleExponentialMovingAverage _tema;\n\nprotected override void OnStart()\n{\n    _tema = Indicators.TripleExponentialMovingAverage(Bars.ClosePrices, 21);\n}\n\nprotected override void OnBar()\n{\n    if (Bars.ClosePrices.Last(1) > _tema.Result.Last(1))\n        Print(\"Close is above TEMA: {0}\", _tema.Result.Last(1));\n}","python":"def on_start(self):\n    self.tema = api.Indicators.TripleExponentialMovingAverage(api.Bars.ClosePrices, 21)\n\ndef on_bar(self):\n    if api.Bars.ClosePrices.Last(1) > self.tema.Result.Last(1):\n        api.Print(f\"Close is above TEMA: {self.tema.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TripleExponentialMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TripleExponentialMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.Trix","kind":"interface","name":"Trix","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Trix","python":"Trix","summary":"TRIX was developed by Jack Huton. It is a momentum oscillator that will help you filter unimportant price movement.","remarks":"When TRIX is rising, it is a good signal to buy, whether when TRIX is falling, it is a good signal to sell.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Trix _trix;\nprotected override void Initialize()\n{\n    _trix = Indicators.Trix(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _trix.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.trix = api.Indicators.Trix(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.trix.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Trix indicator\n    public partial class TrixSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private Trix _trix;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _trix = Indicators.Trix(Bars.ClosePrices, 9);\n        }\n\n        protected override void OnBar()\n        {\n            if (_trix.Result.Last(1) > 0 && _trix.Result.Last(2) <= 0)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_trix.Result.Last(1) < 0 && _trix.Result.Last(2) >= 0)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TrixSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.trix = api.Indicators.Trix(api.Bars.ClosePrices, 9)\n\n    def on_bar_closed(self):\n        if self.trix.Result.Last(0) > 0 and self.trix.Result.Last(1) <= 0:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.trix.Result.Last(0) < 0 and self.trix.Result.Last(1) >= 0:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Trix/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Trix/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.Trix.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.Trix","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"trix.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Trix indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private Trix _trix;\nprotected override void Initialize()\n{\n    _trix = Indicators.Trix(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _trix.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.trix = api.Indicators.Trix(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.trix.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Trix/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Trix/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TrueRange","kind":"interface","name":"TrueRange","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TrueRange","python":"TrueRange","summary":"The Average True Range is a measure of market volatility developed by Wilder.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TrueRange _trueRange;\n\nprotected override void Initialize()\n{\n     _trueRange = Indicators.TrueRange();\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.trueRange = api.Indicators.TrueRange()\n\n    def calculate(self, index):\n        result = self.trueRange.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing System;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the True Range indicator\n    public partial class TrueRangeSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TrueRange _trueRange;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _trueRange = Indicators.TrueRange();\n        }\n\n        protected override void OnBar()\n        {\n            if (Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1) && Bars.ClosePrices.Last(2) < Bars.OpenPrices.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteOrder(TradeType.Buy);\n            }\n            else if (Bars.ClosePrices.Last(1) < Bars.OpenPrices.Last(1) && Bars.ClosePrices.Last(2) > Bars.OpenPrices.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteOrder(TradeType.Sell);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n\n        private void ExecuteOrder(TradeType tradeType)\n        {\n            var trueRangeInPips = _trueRange.Result.Last(1) * (Symbol.TickSize / Symbol.PipSize * Math.Pow(10, Symbol.Digits));\n\n            var stopLossInPips = trueRangeInPips * 2;\n            var takeProfitInPips = stopLossInPips * 2;\n\n            ExecuteMarketOrder(tradeType, SymbolName, _volumeInUnits, Label, stopLossInPips, takeProfitInPips);\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TrueRangeSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.trueRange = api.Indicators.TrueRange()\n\n    def on_bar_closed(self):\n        if api.Bars.ClosePrices.Last(0) > api.Bars.OpenPrices.Last(0) and api.Bars.ClosePrices.Last(1) < api.Bars.OpenPrices.Last(1):\n            self.close_positions(TradeType.Sell)\n            self.execute_order(TradeType.Buy)\n        elif api.Bars.ClosePrices.Last(0) < api.Bars.OpenPrices.Last(0) and api.Bars.ClosePrices.Last(1) > api.Bars.OpenPrices.Last(1):\n            self.close_positions(TradeType.Buy)\n            self.execute_order(TradeType.Sell)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)\n\n    def execute_order(self, tradeType):\n        trueRangeInPips = self.trueRange.Result.Last(0) * (api.Symbol.TickSize / api.Symbol.PipSize * pow(10, api.Symbol.Digits))\n        stopLossInPips = trueRangeInPips * 2\n        takeProfitInPips = stopLossInPips * 2\n        api.ExecuteMarketOrder(tradeType, api.SymbolName, self.volumeInUnits, api.Label, stopLossInPips, takeProfitInPips)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TrueRange/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TrueRange/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.TrueRange.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.TrueRange","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"trueRange.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the True Range indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var trueRange = Indicators.TrueRange();\nvar trueRangeInPips = trueRange.Result.Last(1) / Symbol.PipSize;\nPrint(\"True Range of the last closed bar: {0} pips\", trueRangeInPips);","python":"trueRange = api.Indicators.TrueRange()\ntrueRangeInPips = trueRange.Result.Last(1) / api.Symbol.PipSize\napi.Print(f\"True Range of the last closed bar: {trueRangeInPips} pips\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TrueRange/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TrueRange/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.TypicalPrice","kind":"interface","name":"TypicalPrice","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface TypicalPrice","python":"TypicalPrice","summary":"A Typical Price is an average of high, low and close values for a single period.","remarks":"Typical Price gives a simplified view of all prices for a period as a single series.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TypicalPrice _typicalPrice;\nprotected override void Initialize()\n{\n    _typicalPrice = Indicators.TypicalPrice();\n}\npublic override void Calculate(int index)\n{\n    double result = _typicalPrice.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.typicalPrice = api.Indicators.TypicalPrice()\n\n    def calculate(self, index):\n        result = self.typicalPrice.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Typical Price indicator\n    public partial class TypicalPriceSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private TypicalPrice _typicalPrice;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _typicalPrice = Indicators.TypicalPrice();\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_typicalPrice.Result, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_typicalPrice.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_typicalPrice.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass TypicalPriceSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.typicalPrice = api.Indicators.TypicalPrice()\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.typicalPrice.Result, 14)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.typicalPrice.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.typicalPrice.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TypicalPrice/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TypicalPrice/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.TypicalPrice.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.TypicalPrice","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"typicalPrice.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Typical Price indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private TypicalPrice _typicalPrice;\nprotected override void Initialize()\n{\n    _typicalPrice = Indicators.TypicalPrice();\n}\npublic override void Calculate(int index)\n{\n    double result = _typicalPrice.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.typicalPrice = api.Indicators.TypicalPrice()\n\n    def calculate(self, index):\n        result = self.typicalPrice.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/TypicalPrice/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/TypicalPrice/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.UltimateOscillator","kind":"interface","name":"UltimateOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface UltimateOscillator","python":"UltimateOscillator","summary":"The Ultimate Oscillator is a technical analysis oscillator based on a notion of buying or selling \"pressure\".","remarks":"It uses the weighted average of three different time periods to reduce the volatility and false transaction signals that are associated with many other indicators that mainly rely on a single time period.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private UltimateOscillator ultimateOscillator;\n\nprotected override void Initialize()\n{\n    ultimateOscillator = Indicators.UltimateOscillator(Cycle1,Cycle2,Cycle3);\n}\npublic override void Calculate(int index)\n{\n    Result[index] = ultimateOscillator.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.ultimateOscillator = api.Indicators.UltimateOscillator(api.Cycle1, api.Cycle2, api.Cycle3)\n\n    def calculate(self, index):\n        api.Result[index] = self.ultimateOscillator.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Cycle1\",\n      \"DisplayName\": \"Cycle 1\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 7\n    },\n    {\n      \"Name\": \"Cycle2\",\n      \"DisplayName\": \"Cycle 2\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    },\n    {\n      \"Name\": \"Cycle3\",\n      \"DisplayName\": \"Cycle 3\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 28\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\",\n      \"Color\": \"Green\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Ultimate Oscillator indicator\n    public partial class UltimateOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private UltimateOscillator _ultimateOscillator;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _ultimateOscillator = Indicators.UltimateOscillator(7, 14, 28);\n        }\n\n        protected override void OnBar()\n        {\n            if (_ultimateOscillator.Result.Last(1) > 70 && _ultimateOscillator.Result.Last(2) < 70)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_ultimateOscillator.Result.Last(1) < 30 && _ultimateOscillator.Result.Last(2) > 30)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass UltimateOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.ultimateOscillator = api.Indicators.UltimateOscillator(7, 14, 28)\n\n    def on_bar_closed(self):\n        if self.ultimateOscillator.Result.Last(0) > 70 and self.ultimateOscillator.Result.Last(1) < 70:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.ultimateOscillator.Result.Last(0) < 30 and self.ultimateOscillator.Result.Last(1) > 30:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/UltimateOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/UltimateOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.UltimateOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.UltimateOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"ultimateOscillator.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Ultimate Oscillator indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var ultimateOscillator = Indicators.UltimateOscillator(7, 14, 28);\nvar value = ultimateOscillator.Result.Last(1);\nif (value > 70)\n    Print(\"Overbought: {0}\", value);\nelse if (value < 30)\n    Print(\"Oversold: {0}\", value);","python":"ultimateOscillator = api.Indicators.UltimateOscillator(7, 14, 28)\nvalue = ultimateOscillator.Result.Last(1)\nif value > 70:\n    api.Print(f\"Overbought: {value}\")\nelif value < 30:\n    api.Print(f\"Oversold: {value}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/UltimateOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/UltimateOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.UserTimeOffsetChangedEventArgs","kind":"class","name":"UserTimeOffsetChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"Application","csharp":"public class UserTimeOffsetChangedEventArgs","python":"UserTimeOffsetChangedEventArgs","summary":"Represents the user time offset change event data.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This example shows how to use the UserTimeOffsetChangedEventArgs\n    // Change your cTrader platform time offset/zone to see the print message\n    public partial class UserTimeOffsetChangedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Application.UserTimeOffsetChanged += OnApplicationUserTimeOffsetChanged;\n        }\n\n        private void OnApplicationUserTimeOffsetChanged(UserTimeOffsetChangedEventArgs obj)\n        {\n            Print(\"User time offset changed to: {0}\", obj.UserTimeOffset);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Application.UserTimeOffsetChanged += self.on_application_user_time_offset_changed\n\n    def on_application_user_time_offset_changed(self, args):\n        print(f\"User time offset changed to: {args.UserTimeOffset}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.UserTimeOffsetChangedEventArgs.UserTimeOffset","kind":"property","name":"UserTimeOffset","type":"T:cAlgo.API.UserTimeOffsetChangedEventArgs","namespace":"cAlgo.API","group":"Application","csharp":"public TimeSpan UserTimeOffset {get;}","python":"userTimeOffsetChangedEventArgs.UserTimeOffset: TimeSpan","summary":"Gets the user time offset.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Application.UserTimeOffsetChanged += OnUserTimeOffsetChanged;\n}\n\nprivate void OnUserTimeOffsetChanged(UserTimeOffsetChangedEventArgs args)\n{\n    var userTime = Server.TimeInUtc.Add(args.UserTimeOffset);\n    Print(\"User time offset: {0}, user time: {1}\", args.UserTimeOffset, userTime);\n}","python":"def on_start(self):\n    api.Application.UserTimeOffsetChanged += self.on_user_time_offset_changed\n\ndef on_user_time_offset_changed(self, args):\n    userTime = api.Server.TimeInUtc.Add(args.UserTimeOffset)\n    api.Print(f\"User time offset: {args.UserTimeOffset}, user time: {userTime}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/UserTimeOffset/","markdown":"https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/UserTimeOffset/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.VariableIndexDynamicAverage","kind":"interface","name":"VariableIndexDynamicAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface VariableIndexDynamicAverage","python":"VariableIndexDynamicAverage","summary":"The Variable Index Dynamic Average (VIDYA) indicator is a type of moving average that dynamically adjusts its smoothing period based on market volatility.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private VariableIndexDynamicAverage _vidya;\n\nprotected override void OnStart()\n{\n    _vidya = Indicators.VariableIndexDynamicAverage(Bars.ClosePrices, 9, 12);\n}\n\nprotected override void OnBar()\n{\n    if (Bars.ClosePrices.Last(1) > _vidya.Result.Last(1))\n        Print(\"Close is above VIDYA: {0}\", _vidya.Result.Last(1));\n}","python":"def on_start(self):\n    self.vidya = api.Indicators.VariableIndexDynamicAverage(api.Bars.ClosePrices, 9, 12)\n\ndef on_bar(self):\n    if api.Bars.ClosePrices.Last(1) > self.vidya.Result.Last(1):\n        api.Print(f\"Close is above VIDYA: {self.vidya.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VariableIndexDynamicAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VariableIndexDynamicAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.VerticalAlignment","kind":"enum","name":"VerticalAlignment","type":null,"namespace":"cAlgo.API","group":"Chart","csharp":"public enum VerticalAlignment","python":"VerticalAlignment","summary":"Describes vertical position related to an anchor point or a parent element.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the VerticalAlignment\n    public partial class VerticalAlignmentSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var textBlock = new TextBlock\n            {\n                Text = string.Format(\"Alignment: {0}\", VerticalAlignment),\n                VerticalAlignment = VerticalAlignment,\n                HorizontalAlignment = HorizontalAlignment.Center\n            };\n\n            Chart.AddControl(textBlock);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        textBlock = TextBlock()\n        textBlock.Text = f\"Alignment: {api.VerticalAlignment}\"\n        textBlock.VerticalAlignment = api.VerticalAlignment\n        textBlock.HorizontalAlignment = HorizontalAlignment.Center\n\n        api.Chart.AddControl(textBlock)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"VerticalAlignment\",\n      \"DisplayName\": \"Vertical Alignment\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.VerticalAlignment\",\n      \"DefaultValue\": \"Center\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.VerticalAlignment.Center","kind":"enum value","name":"Center","type":"T:cAlgo.API.VerticalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"VerticalAlignment.Center;","python":"VerticalAlignment.Center","summary":"Center vertical alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.VerticalAlignment.Top","kind":"enum value","name":"Top","type":"T:cAlgo.API.VerticalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"VerticalAlignment.Top;","python":"VerticalAlignment.Top","summary":"Top vertical alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.VerticalAlignment.Bottom","kind":"enum value","name":"Bottom","type":"T:cAlgo.API.VerticalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"VerticalAlignment.Bottom;","python":"VerticalAlignment.Bottom","summary":"Bottom vertical alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.VerticalAlignment.Stretch","kind":"enum value","name":"Stretch","type":"T:cAlgo.API.VerticalAlignment","namespace":"cAlgo.API","group":"Chart","csharp":"VerticalAlignment.Stretch;","python":"VerticalAlignment.Stretch","summary":"Stretch vertical alignment.","remarks":null,"parameters":[],"returns":{"csharpType":"VerticalAlignment","pythonType":"VerticalAlignment","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/","markdown":"https://help.ctrader.com/ctrader-algo/references/Chart/VerticalAlignment/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.VerticalHorizontalFilter","kind":"interface","name":"VerticalHorizontalFilter","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface VerticalHorizontalFilter","python":"VerticalHorizontalFilter","summary":"Vertical Horizontal Filter determines whether a price is going through a congestion phase or a trending phase.","remarks":"Vertical Horizontal Filter rises when trend is strong and falls when trend is weak.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate VerticalHorizontalFilter VHFilter;\n//...\nprotected override void Initialize()\n{\n    VHFilter = Indicators.VerticalHorizontalFilter(Bars.OpenPrices, 28);\n    //...\n}\npublic override void Calculate(int index)\n{\n    double value = VHFilter.Result[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.verticalHorizontalFilter = api.Indicators.VerticalHorizontalFilter(api.Bars.OpenPrices, 28)\n\n    def calculate(self, index):\n        value = self.verticalHorizontalFilter.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Vertical Horizontal Filter indicator\n    public partial class VerticalHorizontalFilterSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private VerticalHorizontalFilter _verticalHorizontalFilter;\n\n        private SimpleMovingAverage _priceSimpleMovingAverage;\n        private SimpleMovingAverage _verticalHorizontalFilterSimpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _verticalHorizontalFilter = Indicators.VerticalHorizontalFilter(Bars.ClosePrices, 28);\n\n            _verticalHorizontalFilterSimpleMovingAverage = Indicators.SimpleMovingAverage(_verticalHorizontalFilter.Result, 14);\n\n            _priceSimpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_verticalHorizontalFilter.Result.Last(1) < _verticalHorizontalFilterSimpleMovingAverage.Result.Last(1)) return;\n\n            if (Bars.ClosePrices.Last(1) > _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) <= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) >= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass VerticalHorizontalFilterSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.verticalHorizontalFilter = api.Indicators.VerticalHorizontalFilter(api.Bars.ClosePrices, 28)\n        self.verticalHorizontalFilterSimpleMovingAverage = api.Indicators.SimpleMovingAverage(self.verticalHorizontalFilter.Result, 14)\n        self.priceSimpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n\n    def on_bar_closed(self):\n        if self.verticalHorizontalFilter.Result.Last(0) < self.verticalHorizontalFilterSimpleMovingAverage.Result.Last(0):\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VerticalHorizontalFilter/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VerticalHorizontalFilter/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.VerticalHorizontalFilter.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.VerticalHorizontalFilter","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"verticalHorizontalFilter.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Vertical Horizontal Filter indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var verticalHorizontalFilter = Indicators.VerticalHorizontalFilter(Bars.ClosePrices, 28);\nPrint(\"Vertical Horizontal Filter: {0}\", verticalHorizontalFilter.Result.Last(1));","python":"verticalHorizontalFilter = api.Indicators.VerticalHorizontalFilter(api.Bars.ClosePrices, 28)\napi.Print(f\"Vertical Horizontal Filter: {verticalHorizontalFilter.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VerticalHorizontalFilter/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VerticalHorizontalFilter/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.Vidya","kind":"interface","name":"Vidya","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface Vidya","python":"Vidya","summary":"Volatility Index Dynamic Average (VIDYA) is a smoothing (moving average) based on dynamically changing periods.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"// Indicators.Vidya is obsolete, new code creates a VariableIndexDynamicAverage instead\nprivate VariableIndexDynamicAverage _vidya;\n\nprotected override void OnStart()\n{\n    _vidya = Indicators.VariableIndexDynamicAverage(Bars.ClosePrices, 9, 12);\n}\n\nprotected override void OnBar()\n{\n    Print(\"VIDYA: {0}\", _vidya.Result.Last(1));\n}\n\n// An existing Vidya instance exposes its values through the Result series\nprivate void PrintVidya(Vidya vidya)\n{\n    Print(\"Legacy VIDYA: {0}\", vidya.Result.Last(1));\n}","python":"# Indicators.Vidya is obsolete, new code creates a VariableIndexDynamicAverage instead\ndef on_start(self):\n    self.vidya = api.Indicators.VariableIndexDynamicAverage(api.Bars.ClosePrices, 9, 12)\n\ndef on_bar(self):\n    api.Print(f\"VIDYA: {self.vidya.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/Vidya/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/Vidya/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.VolumeOscillator","kind":"interface","name":"VolumeOscillator","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface VolumeOscillator","python":"VolumeOscillator","summary":"The Volume Oscillator identifies trends in volume using a two moving average system. A strong trend is signaled when it is positive. Falling volume indicates trend weakness.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private VolumeOscillator _volumeOscillator;\n\nprotected override void Initialize()\n{\n   _volumeOscillator = Indicators.VolumeOscillator(ShortTerm, LongTerm);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _volumeOscillator.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.volumeOscillator = api.Indicators.VolumeOscillator(api.ShortTerm, api.LongTerm)\n\n    def calculate(self, index):\n        api.Result[index] = self.volumeOscillator.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"ShortTerm\",\n      \"DisplayName\": \"Short Term\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9\n    },\n    {\n      \"Name\": \"LongTerm\",\n      \"DisplayName\": \"Long Term\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 21\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Volume Oscillator indicator\n    public partial class VolumeOscillatorSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private VolumeOscillator _volumeOscillator;\n\n        private SimpleMovingAverage _priceSimpleMovingAverage;\n        private SimpleMovingAverage _volumeOscillatorSimpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _volumeOscillator = Indicators.VolumeOscillator(9, 21);\n\n            _volumeOscillatorSimpleMovingAverage = Indicators.SimpleMovingAverage(_volumeOscillator.Result, 14);\n\n            _priceSimpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_volumeOscillator.Result.Last(1) < _volumeOscillatorSimpleMovingAverage.Result.Last(1)) return;\n\n            if (Bars.ClosePrices.Last(1) > _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) <= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) >= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass VolumeOscillatorSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.volumeOscillator = api.Indicators.VolumeOscillator(9, 21)\n        self.volumeOscillatorSimpleMovingAverage = api.Indicators.SimpleMovingAverage(self.volumeOscillator.Result, 14)\n        self.priceSimpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n\n    def on_bar_closed(self):\n        if self.volumeOscillator.Result.Last(0) < self.volumeOscillatorSimpleMovingAverage.Result.Last(0):\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeOscillator/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeOscillator/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.VolumeOscillator.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.VolumeOscillator","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"volumeOscillator.Result: IndicatorDataSeries","summary":"Gets or sets the time series of the Volume Oscillator indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeOscillator = Indicators.VolumeOscillator(9, 21);\nif (volumeOscillator.Result.Last(1) > 0)\n    Print(\"Volume is rising, Volume Oscillator: {0}\", volumeOscillator.Result.Last(1));","python":"volumeOscillator = api.Indicators.VolumeOscillator(9, 21)\nif volumeOscillator.Result.Last(1) > 0:\n    api.Print(f\"Volume is rising, Volume Oscillator: {volumeOscillator.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeOscillator/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeOscillator/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.VolumeROC","kind":"interface","name":"VolumeROC","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface VolumeROC","python":"VolumeROC","summary":"The Volume Rate of Change indicator measures the Rate Of Change of the tick volume.","remarks":"It shows whether a volume trend is developing and can be used to confirm price moves or not.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private VolumeROC _volumeROC;\n\nprotected override void Initialize()\n{\n   _volumeROC = Indicators.VolumeROC(Period);\n}\npublic override void Calculate(int index)\n{\n   // Display Result of Indicator\n   Result[index] = _volumeROC.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.volumeROC = api.Indicators.VolumeROC(api.Period)\n\n    def calculate(self, index):\n        api.Result[index] = self.volumeROC.Result[index]","config":"{\n  \"Parameters\": [\n    {\n      \"Name\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 14\n    }\n  ],\n  \"LineOutputs\": [\n    {\n      \"Name\": \"Result\",\n      \"DisplayName\": \"Main\"\n    }\n  ]\n}"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Volume ROC indicator\n    public partial class VolumeROCSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private VolumeROC _volumeROC;\n\n        private SimpleMovingAverage _priceSimpleMovingAverage;\n        private SimpleMovingAverage _volumeROCSimpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _volumeROC = Indicators.VolumeROC(14);\n\n            _volumeROCSimpleMovingAverage = Indicators.SimpleMovingAverage(_volumeROC.Result, 14);\n\n            _priceSimpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_volumeROC.Result.Last(1) < _volumeROCSimpleMovingAverage.Result.Last(1)) return;\n\n            if (Bars.ClosePrices.Last(1) > _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) <= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _priceSimpleMovingAverage.Result.Last(1) && Bars.ClosePrices.Last(2) >= _priceSimpleMovingAverage.Result.Last(2))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass VolumeROCSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.volumeROC = api.Indicators.VolumeROC(14)\n        self.volumeROCSimpleMovingAverage = api.Indicators.SimpleMovingAverage(self.volumeROC.Result, 14)\n        self.priceSimpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n\n    def on_bar_closed(self):\n        if self.volumeROC.Result.Last(0) < self.volumeROCSimpleMovingAverage.Result.Last(0):\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) <= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.priceSimpleMovingAverage.Result.Last(0) and api.Bars.ClosePrices.Last(1) >= self.priceSimpleMovingAverage.Result.Last(1):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeROC/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeROC/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.VolumeROC.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.VolumeROC","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get; set;}","python":"volumeROC.Result: IndicatorDataSeries","summary":"Gets or sets the time series of the Volume ROC indicator.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var volumeROC = Indicators.VolumeROC(14);\nPrint(\"Volume Rate of Change of the last closed bar: {0}\", volumeROC.Result.Last(1));","python":"volumeROC = api.Indicators.VolumeROC(14)\napi.Print(f\"Volume Rate of Change of the last closed bar: {volumeROC.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeROC/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/VolumeROC/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Watchlist","kind":"interface","name":"Watchlist","type":null,"namespace":"cAlgo.API","group":"Watchlists","csharp":"public interface Watchlist","python":"Watchlist","summary":"Represents the Watchlist interface.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo\n{\n    // This sample shows how to use Automate API to monitor user platform Watchlists\n    public partial class Test : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.Added += OnWatchlistAdded;\n            Watchlists.Removed += OnWatchlistRemoved;\n            Watchlists.WatchlistRenamed += OnWatchlistRenamed;\n            Watchlists.WatchlistSymbolAdded += OnWatchlistSymbolAdded;\n            Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;\n\n            Print(\"Number of Watchlists: \", Watchlists.Count());\n\n            foreach (var watchlist in Watchlists)\n            {\n                Print(\"Watchlist Name: {0} | Symbols #: {1}\", watchlist.Name, watchlist.SymbolNames.Count);\n            }\n        }\n\n        private void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs obj)\n        {\n            Print(\"Symbol {0} Removed From Watchlist {1}\", obj.SymbolName, obj.Watchlist.Name);\n        }\n\n        private void OnWatchlistSymbolAdded(WatchlistSymbolAddedEventArgs obj)\n        {\n            Print(\"Symbol {0} Added to Watchlist {1}\", obj.SymbolName, obj.Watchlist.Name);\n        }\n\n        private void OnWatchlistRenamed(WatchlistRenamedEventArgs obj)\n        {\n            Print(\"Renamed Watchlist {0}\", obj.Watchlist.Name);\n        }\n\n        private void OnWatchlistRemoved(WatchlistRemovedEventArgs obj)\n        {\n            Print(\"Removed Watchlist {0}\", obj.Watchlist.Name);\n        }\n\n        private void OnWatchlistAdded(WatchlistAddedEventArgs obj)\n        {\n            Print(\"Added Watchlist {0}\", obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.Removed += self.on_watchlist_removed\n        api.Watchlists.WatchlistRenamed += self.on_watchlist_renamed\n        api.Watchlists.Added += self.on_watchlist_added\n        api.Watchlists.WatchlistSymbolAdded += self.on_watchlist_symbol_added\n        api.Watchlists.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed\n\n        api.Print(f\"Number of Watchlists: {len(list(api.Watchlists))}\")\n\n        for watchlist in api.Watchlists:\n            api.Print(f\"Watchlist Name: {watchlist.Name} | Symbols #: {watchlist.SymbolNames.Count}\")\n\n    def on_watchlist_added(self, args):\n        api.Print(f\"Watchlist '{args.Watchlist.Name}' has been added\")\n\n    def on_watchlist_renamed(self, args):\n        api.Print(f\"Watchlist renamed to {args.Watchlist.Name}\")\n\n    def on_watchlist_removed(self, args):\n        api.Print(f\"Watchlist '{args.Watchlist.Name}' has been removed\")\n\n    def on_watchlist_symbol_added(self, args):\n        api.Print(f\"Symbol {args.SymbolName} Added to Watchlist {args.Watchlist.Name}\")\n\n    def on_watchlist_symbol_removed(self, args):\n        api.Print(f\"Symbol {args.SymbolName} removed from watchlist {args.Watchlist.Name}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Watchlists, Watchlists.Item, WatchlistAddedEventArgs.Watchlist and more)."}]}
{"id":"P:cAlgo.API.Watchlist.Name","kind":"property","name":"Name","type":"T:cAlgo.API.Watchlist","namespace":"cAlgo.API","group":"Watchlists","csharp":"string Name {get;}","python":"watchlist.Name: str","summary":"Gets the watchlist name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var watchlist in Watchlists)\n    Print(\"Watchlist: {0}\", watchlist.Name);","python":"for watchlist in api.Watchlists:\n    api.Print(f\"Watchlist: {watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/Name/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/Name/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Watchlists, Watchlists.Item, WatchlistAddedEventArgs.Watchlist and more)."}]}
{"id":"P:cAlgo.API.Watchlist.SymbolNames","kind":"property","name":"SymbolNames","type":"T:cAlgo.API.Watchlist","namespace":"cAlgo.API","group":"Watchlists","csharp":"IReadonlyList<string> SymbolNames {get;}","python":"watchlist.SymbolNames: IReadonlyList[str]","summary":"Gets the names of the symbols in the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"IReadonlyList<string>","pythonType":"IReadonlyList[str]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"foreach (var watchlist in Watchlists)\n{\n    if (watchlist.SymbolNames.Contains(SymbolName))\n        Print(\"{0} is in watchlist {1} with {2} symbols\", SymbolName, watchlist.Name, watchlist.SymbolNames.Count);\n}","python":"for watchlist in api.Watchlists:\n    if api.SymbolName in list(watchlist.SymbolNames):\n        api.Print(f\"{api.SymbolName} is in watchlist {watchlist.Name} with {watchlist.SymbolNames.Count} symbols\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/SymbolNames/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlist/SymbolNames/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never available in the cloud: it is only returned by members that do not work there (Watchlists, Watchlists.Item, WatchlistAddedEventArgs.Watchlist and more)."}]}
{"id":"T:cAlgo.API.WatchlistAddedEventArgs","kind":"class","name":"WatchlistAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WatchlistAddedEventArgs","python":"WatchlistAddedEventArgs","summary":"Occurs when a new watchlist is added.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use WatchlistAddedEventArgs\n    public partial class WatchlistAddedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.Added += OnWatchlistsAdded;\n        }\n\n        private void OnWatchlistsAdded(WatchlistAddedEventArgs obj)\n        {\n            Print(\"Watchlist {0} hase been added\", obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.Added += self.on_watchlists_added\n\n    def on_watchlists_added(self, args):\n        print(f\"Watchlist {args.Watchlist.Name} hase been added\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.Added)."}]}
{"id":"P:cAlgo.API.WatchlistAddedEventArgs.Watchlist","kind":"property","name":"Watchlist","type":"T:cAlgo.API.WatchlistAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Watchlist Watchlist {get;}","python":"watchlistAddedEventArgs.Watchlist: Watchlist","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.Added += OnWatchlistsAdded;\n}\n\nprivate void OnWatchlistsAdded(WatchlistAddedEventArgs args)\n{\n    Print(\"Watchlist {0} added with {1} symbols\", args.Watchlist.Name, args.Watchlist.SymbolNames.Count);\n}","python":"def on_start(self):\n    api.Watchlists.Added += self.on_watchlists_added\n\ndef on_watchlists_added(self, args):\n    api.Print(f\"Watchlist {args.Watchlist.Name} added with {args.Watchlist.SymbolNames.Count} symbols\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistAddedEventArgs/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistAddedEventArgs/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.Added)."}]}
{"id":"T:cAlgo.API.WatchlistRemovedEventArgs","kind":"class","name":"WatchlistRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WatchlistRemovedEventArgs","python":"WatchlistRemovedEventArgs","summary":"Occurs when a watchlist is removed from the marketwatch.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use WatchlistRemovedEventArgs\n    public partial class WatchlistRemovedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.Removed += OnWatchlistsRemoved;\n        }\n\n        private void OnWatchlistsRemoved(WatchlistRemovedEventArgs obj)\n        {\n            Print(\"Watchlist {0} removed\", obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.Removed += self.on_watchlists_removed\n\n    def on_watchlists_removed(self, args):\n        print(f\"Watchlist {args.Watchlist.Name} removed\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.Removed)."}]}
{"id":"P:cAlgo.API.WatchlistRemovedEventArgs.Watchlist","kind":"property","name":"Watchlist","type":"T:cAlgo.API.WatchlistRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Watchlist Watchlist {get;}","python":"watchlistRemovedEventArgs.Watchlist: Watchlist","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.Removed += OnWatchlistsRemoved;\n}\n\nprivate void OnWatchlistsRemoved(WatchlistRemovedEventArgs args)\n{\n    Print(\"Watchlist {0} with {1} symbols was removed\", args.Watchlist.Name, args.Watchlist.SymbolNames.Count);\n}","python":"def on_start(self):\n    api.Watchlists.Removed += self.on_watchlists_removed\n\ndef on_watchlists_removed(self, args):\n    api.Print(f\"Watchlist {args.Watchlist.Name} with {args.Watchlist.SymbolNames.Count} symbols was removed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRemovedEventArgs/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRemovedEventArgs/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.Removed)."}]}
{"id":"T:cAlgo.API.WatchlistRenamedEventArgs","kind":"class","name":"WatchlistRenamedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WatchlistRenamedEventArgs","python":"WatchlistRenamedEventArgs","summary":"Occurs when the watchlist is renamed.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use WatchlistRenamedEventArgs\n    public partial class WatchlistRenamedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.WatchlistRenamed += OnWatchlistRenamed;\n        }\n\n        private void OnWatchlistRenamed(WatchlistRenamedEventArgs obj)\n        {\n            Print(\"Watchlist renamed to {0}\", obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.WatchlistRenamed += self.on_watchlist_renamed\n\n    def on_watchlist_renamed(self, args):\n        print(f\"Watchlist renamed to {args.Watchlist.Name}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRenamedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRenamedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistRenamed)."}]}
{"id":"P:cAlgo.API.WatchlistRenamedEventArgs.Watchlist","kind":"property","name":"Watchlist","type":"T:cAlgo.API.WatchlistRenamedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Watchlist Watchlist {get;}","python":"watchlistRenamedEventArgs.Watchlist: Watchlist","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistRenamed += OnWatchlistRenamed;\n}\n\nprivate void OnWatchlistRenamed(WatchlistRenamedEventArgs args)\n{\n    Print(\"Watchlist new name: {0}\", args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistRenamed += self.on_watchlist_renamed\n\ndef on_watchlist_renamed(self, args):\n    api.Print(f\"Watchlist new name: {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRenamedEventArgs/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistRenamedEventArgs/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistRenamed)."}]}
{"id":"T:cAlgo.API.WatchlistSymbolAddedEventArgs","kind":"class","name":"WatchlistSymbolAddedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WatchlistSymbolAddedEventArgs","python":"WatchlistSymbolAddedEventArgs","summary":"Occurs when a new symbol is added to the watchlist.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use WatchlistSymbolAddedEventArgs\n    public partial class WatchlistSymbolAddedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.WatchlistSymbolAdded += OnWatchlistSymbolAdded;\n        }\n\n        private void OnWatchlistSymbolAdded(WatchlistSymbolAddedEventArgs obj)\n        {\n            Print(\"Symbol {0} Added to Watchlist {1}\", obj.SymbolName, obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.WatchlistSymbolAdded += self.on_watchlist_symbol_added\n\n    def on_watchlist_symbol_added(self, args):\n        print(f\"Symbol {args.SymbolName} Added to Watchlist {args.Watchlist.Name}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolAdded)."}]}
{"id":"P:cAlgo.API.WatchlistSymbolAddedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.WatchlistSymbolAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"watchlistSymbolAddedEventArgs.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolAdded += OnWatchlistSymbolAdded;\n}\n\nprivate void OnWatchlistSymbolAdded(WatchlistSymbolAddedEventArgs args)\n{\n    var symbol = Symbols.GetSymbol(args.SymbolName);\n    if (symbol != null)\n        Print(\"{0} added to watchlist, bid: {1}\", args.SymbolName, symbol.Bid);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolAdded += self.on_watchlist_symbol_added\n\ndef on_watchlist_symbol_added(self, args):\n    symbol = api.Symbols.GetSymbol(args.SymbolName)\n    if symbol is not None:\n        api.Print(f\"{args.SymbolName} added to watchlist, bid: {symbol.Bid}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolAdded)."}]}
{"id":"P:cAlgo.API.WatchlistSymbolAddedEventArgs.Watchlist","kind":"property","name":"Watchlist","type":"T:cAlgo.API.WatchlistSymbolAddedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Watchlist Watchlist {get;}","python":"watchlistSymbolAddedEventArgs.Watchlist: Watchlist","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolAdded += OnWatchlistSymbolAdded;\n}\n\nprivate void OnWatchlistSymbolAdded(WatchlistSymbolAddedEventArgs args)\n{\n    Print(\"Watchlist {0} now has {1} symbols\", args.Watchlist.Name, args.Watchlist.SymbolNames.Count);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolAdded += self.on_watchlist_symbol_added\n\ndef on_watchlist_symbol_added(self, args):\n    api.Print(f\"Watchlist {args.Watchlist.Name} now has {args.Watchlist.SymbolNames.Count} symbols\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolAddedEventArgs/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolAdded)."}]}
{"id":"T:cAlgo.API.WatchlistSymbolRemovedEventArgs","kind":"class","name":"WatchlistSymbolRemovedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WatchlistSymbolRemovedEventArgs","python":"WatchlistSymbolRemovedEventArgs","summary":"Occurs when the symbol is removed from the watchlist.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use WatchlistSymbolRemovedEventArgs\n    public partial class WatchlistSymbolRemovedEventArgsSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;\n        }\n\n        private void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs obj)\n        {\n            Print(\"Symbol {0} removed from watchlist {1}\", obj.SymbolName, obj.Watchlist.Name);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        api.Watchlists.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed\n\n    def on_watchlist_symbol_removed(self, args):\n        print(f\"Symbol {args.SymbolName} removed from watchlist {args.Watchlist.Name}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolRemoved)."}]}
{"id":"P:cAlgo.API.WatchlistSymbolRemovedEventArgs.SymbolName","kind":"property","name":"SymbolName","type":"T:cAlgo.API.WatchlistSymbolRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string SymbolName {get;}","python":"watchlistSymbolRemovedEventArgs.SymbolName: str","summary":"Gets the symbol name.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;\n}\n\nprivate void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs args)\n{\n    if (args.SymbolName == SymbolName)\n        Print(\"The symbol of the cBot, {0}, was removed from watchlist {1}\", args.SymbolName, args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed\n\ndef on_watchlist_symbol_removed(self, args):\n    if args.SymbolName == api.SymbolName:\n        api.Print(f\"The symbol of the cBot, {args.SymbolName}, was removed from watchlist {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/SymbolName/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/SymbolName/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolRemoved)."}]}
{"id":"P:cAlgo.API.WatchlistSymbolRemovedEventArgs.Watchlist","kind":"property","name":"Watchlist","type":"T:cAlgo.API.WatchlistSymbolRemovedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Watchlist Watchlist {get;}","python":"watchlistSymbolRemovedEventArgs.Watchlist: Watchlist","summary":"Gets the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;\n}\n\nprivate void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs args)\n{\n    Print(\"Watchlist {0} has {1} symbols left\", args.Watchlist.Name, args.Watchlist.SymbolNames.Count);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed\n\ndef on_watchlist_symbol_removed(self, args):\n    api.Print(f\"Watchlist {args.Watchlist.Name} has {args.Watchlist.SymbolNames.Count} symbols left\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/Watchlist/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistSymbolRemovedEventArgs/Watchlist/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolRemoved)."}]}
{"id":"T:cAlgo.API.Watchlists","kind":"interface","name":"Watchlists","type":null,"namespace":"cAlgo.API","group":"Watchlists","csharp":"public interface Watchlists","python":"Watchlists","summary":"Represents the Watchlists interface - allows getting all the watchlists and symbols in them, and receiving the relevant events.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\nusing System.Linq;\n\nnamespace cAlgo\n{\n    public partial class WatchlistSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            Print(\"Number of Watchlists: \", Watchlists.Count());\n\n            foreach (var watchlist in Watchlists)\n            {\n                Print(\"Watchlist Name: {0} | Symbols #: {1}\", watchlist.Name, watchlist.SymbolNames.Count);\n            }\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        print(f\"Number of Watchlists: {len(list(api.Watchlists))}\")\n\n        for watchlist in api.Watchlists:\n            print(f\"Watchlist Name: {watchlist.Name} | Symbols #: {watchlist.SymbolNames.Count}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"P:cAlgo.API.Watchlists.Item(System.Int32)","kind":"property","name":"Item","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"Watchlist Item {get;}","python":"api.Watchlists[index: int] -> Watchlist","summary":"Gets the desired Watchlist.","remarks":null,"parameters":[{"name":"index","csharpType":"int","pythonType":"int","summary":""}],"returns":{"csharpType":"Watchlist","pythonType":"Watchlist","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"if (Watchlists.Any())\n{\n    var firstWatchlist = Watchlists[0];\n    Print(\"First watchlist: {0} ({1} symbols)\", firstWatchlist.Name, firstWatchlist.SymbolNames.Count);\n}","python":"if len(list(api.Watchlists)) > 0:\n    firstWatchlist = api.Watchlists[0]\n    api.Print(f\"First watchlist: {firstWatchlist.Name} ({firstWatchlist.SymbolNames.Count} symbols)\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Item/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Item/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"E:cAlgo.API.Watchlists.Added","kind":"event","name":"Added","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"event Action<WatchlistAddedEventArgs> Added;","python":"api.Watchlists.Added += handler  # handler(obj: WatchlistAddedEventArgs)","summary":"Occurs when a new watchlist is added.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WatchlistAddedEventArgs>","pythonType":"Callable[[WatchlistAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.Added += OnWatchlistAdded;\n}\n\nprivate void OnWatchlistAdded(WatchlistAddedEventArgs args)\n{\n    Print(\"Watchlist added: {0}\", args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.Added += self.on_watchlist_added\n\ndef on_watchlist_added(self, args):\n    api.Print(f\"Watchlist added: {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Added/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Added/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"E:cAlgo.API.Watchlists.Removed","kind":"event","name":"Removed","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"event Action<WatchlistRemovedEventArgs> Removed;","python":"api.Watchlists.Removed += handler  # handler(obj: WatchlistRemovedEventArgs)","summary":"Occurs when a watchlist is removed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WatchlistRemovedEventArgs>","pythonType":"Callable[[WatchlistRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.Removed += OnWatchlistRemoved;\n}\n\nprivate void OnWatchlistRemoved(WatchlistRemovedEventArgs args)\n{\n    Print(\"Watchlist removed: {0}\", args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.Removed += self.on_watchlist_removed\n\ndef on_watchlist_removed(self, args):\n    api.Print(f\"Watchlist removed: {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Removed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/Removed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"E:cAlgo.API.Watchlists.WatchlistRenamed","kind":"event","name":"WatchlistRenamed","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"event Action<WatchlistRenamedEventArgs> WatchlistRenamed;","python":"api.Watchlists.WatchlistRenamed += handler  # handler(obj: WatchlistRenamedEventArgs)","summary":"Occurs when the name of the watchlist is changed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WatchlistRenamedEventArgs>","pythonType":"Callable[[WatchlistRenamedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistRenamed += OnWatchlistRenamed;\n}\n\nprivate void OnWatchlistRenamed(WatchlistRenamedEventArgs args)\n{\n    Print(\"Watchlist renamed to {0}\", args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistRenamed += self.on_watchlist_renamed\n\ndef on_watchlist_renamed(self, args):\n    api.Print(f\"Watchlist renamed to {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistRenamed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistRenamed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"E:cAlgo.API.Watchlists.WatchlistSymbolAdded","kind":"event","name":"WatchlistSymbolAdded","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"event Action<WatchlistSymbolAddedEventArgs> WatchlistSymbolAdded;","python":"api.Watchlists.WatchlistSymbolAdded += handler  # handler(obj: WatchlistSymbolAddedEventArgs)","summary":"Occurs when a new symbol is added to the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WatchlistSymbolAddedEventArgs>","pythonType":"Callable[[WatchlistSymbolAddedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolAdded += OnWatchlistSymbolAdded;\n}\n\nprivate void OnWatchlistSymbolAdded(WatchlistSymbolAddedEventArgs args)\n{\n    Print(\"{0} added to watchlist {1}\", args.SymbolName, args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolAdded += self.on_watchlist_symbol_added\n\ndef on_watchlist_symbol_added(self, args):\n    api.Print(f\"{args.SymbolName} added to watchlist {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistSymbolAdded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistSymbolAdded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"E:cAlgo.API.Watchlists.WatchlistSymbolRemoved","kind":"event","name":"WatchlistSymbolRemoved","type":"T:cAlgo.API.Watchlists","namespace":"cAlgo.API","group":"Watchlists","csharp":"event Action<WatchlistSymbolRemovedEventArgs> WatchlistSymbolRemoved;","python":"api.Watchlists.WatchlistSymbolRemoved += handler  # handler(obj: WatchlistSymbolRemovedEventArgs)","summary":"Occurs when a symbol is removed from the watchlist.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WatchlistSymbolRemovedEventArgs>","pythonType":"Callable[[WatchlistSymbolRemovedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;\n}\n\nprivate void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs args)\n{\n    Print(\"{0} removed from watchlist {1}\", args.SymbolName, args.Watchlist.Name);\n}","python":"def on_start(self):\n    api.Watchlists.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed\n\ndef on_watchlist_symbol_removed(self, args):\n    api.Print(f\"{args.SymbolName} removed from watchlist {args.Watchlist.Name}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistSymbolRemoved/","markdown":"https://help.ctrader.com/ctrader-algo/references/Watchlists/Watchlists/WatchlistSymbolRemoved/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Always empty (Count 0). Added, Removed, WatchlistRenamed and symbol added/removed events are never raised."}]}
{"id":"T:cAlgo.API.WebSocketClient","kind":"class","name":"WebSocketClient","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClient","python":"WebSocketClient","summary":"Represents a web socket client.","remarks":"Algos can use WebSocketClient to establish a WebSocket connection with a local or remote host and send or receive data.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using System;\nusing System.Text;\nusing cAlgo.API;\n\nnamespace cAlgo.Robots;\n\npublic partial class Test : Robot\n{\n    protected override void OnStart()\n    {\n        var webSocket = new WebSocketClient();\n\n        webSocket.Connected += args => Print(\"Connected\");\n        webSocket.Disconnected += args => Print(\"Disconnected\");\n        webSocket.TextReceived += args => Print(\"Text Received: \", args.Text);\n        webSocket.BinaryReceived += args => Print(\"Binary Received: \", Encoding.UTF8.GetString(args.Data));\n\n        var panel = new StackPanel()\n        {\n            BackgroundColor = Color.BlueViolet,\n            Orientation = Orientation.Vertical,\n            HorizontalAlignment = HorizontalAlignment.Center,\n            VerticalAlignment = VerticalAlignment.Center\n        };\n\n        var connectButton = new Button\n        {\n            Text = \"Connect\"\n        };\n\n        connectButton.Click += args => webSocket.Connect(new Uri(Host));\n\n        var disconnectButton = new Button\n        {\n            Text = \"Disconnect\"\n        };\n\n        disconnectButton.Click += args => webSocket.Close(WebSocketClientCloseStatus.Empty, null);\n\n        var disposeButton = new Button\n        {\n            Text = \"Dispose\"\n        };\n\n        disposeButton.Click += args =>\n        {\n            webSocket.Dispose();\n\n            Print($\"WebSocket Disposed, state: {webSocket.State}\");\n        };\n\n        var textBox = new TextBox()\n        {\n            Text = \"Type your message...\",\n            Width = 100\n        };\n\n        var sendTextButton = new Button\n        {\n            Text = \"Send Text\"\n        };\n\n        var sendBinaryButton = new Button\n        {\n            Text = \"Send Binary\"\n        };\n\n        sendTextButton.Click += args => webSocket.Send(textBox.Text);\n        sendBinaryButton.Click += args => webSocket.Send(Encoding.UTF8.GetBytes(textBox.Text));\n\n        panel.AddChild(connectButton);\n        panel.AddChild(disconnectButton);\n        panel.AddChild(disposeButton);\n        panel.AddChild(textBox);\n        panel.AddChild(sendTextButton);\n        panel.AddChild(sendBinaryButton);\n\n        Chart.AddControl(panel);\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\nfrom System import Uri\nfrom System.Text import Encoding\n\nclass Test():\n    def on_start(self):\n        webSocket = WebSocketClient()\n        webSocket.Connected += lambda args: print(\"Connected\")\n        webSocket.Disconnected += lambda args: print(\"Disconnected\")\n        webSocket.TextReceived += lambda args: print(\"Text Received: \", args.Text)\n        webSocket.BinaryReceived += lambda args: print(\"Binary Received: \", Encoding.UTF8.GetString(args.Data))\n\n        panel = StackPanel()\n        panel.BackgroundColor = Color.BlueViolet\n        panel.Orientation = Orientation.Vertical\n        panel.HorizontalAlignment = HorizontalAlignment.Center\n        panel.VerticalAlignment = VerticalAlignment.Center\n\n        connectButton = Button()\n        connectButton.Text = \"Connect\"\n        connectButton.Click += lambda args: webSocket.Connect(Uri(api.Host))\n\n        disconnectButton = Button()\n        disconnectButton.Text = \"Disconnect\"\n        disconnectButton.Click += lambda args: webSocket.Close(WebSocketClientCloseStatus.Empty, None)\n\n        disposeButton = Button()\n        disposeButton.Text = \"Dispose\"\n\n        disposeButton.Click += lambda args: self.dispose_client(webSocket)\n\n        textBox = TextBox()\n        textBox.Text = \"Type your message...\"\n        textBox.Width = 100\n\n        sendTextButton = Button()\n        sendTextButton.Text = \"Send Text\"\n        sendTextButton.Click += lambda args: webSocket.Send(textBox.Text)\n\n        sendBinaryButton = Button()\n        sendBinaryButton.Text = \"Send Binary\"\n        sendBinaryButton.Click += lambda args: webSocket.Send(Encoding.UTF8.GetBytes(textBox.Text))\n\n        panel.AddChild(connectButton)\n        panel.AddChild(disconnectButton)\n        panel.AddChild(disposeButton)\n        panel.AddChild(textBox)\n        panel.AddChild(sendTextButton)\n        panel.AddChild(sendBinaryButton)\n\n        api.Chart.AddControl(panel)\n\n    def dispose_client(self, webSocketClient):\n        webSocketClient.Dispose()\n        print(f\"WebSocket Disposed, state: {webSocketClient.State}\")","config":"{\n  \"AccessRights\": \"None\",\n  \"Parameters\": [\n    {\n      \"Name\": \"Host\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"ws://localhost:1337\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.#ctor","kind":"constructor","name":"WebSocketClient","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient()","python":"WebSocketClient()","summary":"Creates a WebSocketClient with default options.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.TextReceived += args => Print(\"Received: {0}\", args.Text);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.TextReceived += lambda args: api.Print(f\"Received: {args.Text}\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.#ctor(cAlgo.API.WebSocketClientOptions)","kind":"constructor","name":"WebSocketClient","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient(WebSocketClientOptions options)","python":"WebSocketClient(options: WebSocketClientOptions)","summary":"Creates a WebSocketClient with passed options.","remarks":null,"parameters":[{"name":"options","csharpType":"WebSocketClientOptions","pythonType":"WebSocketClientOptions","summary":""}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions { KeepAliveInterval = TimeSpan.FromSeconds(10) };\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri, TimeSpan\n\noptions = WebSocketClientOptions()\noptions.KeepAliveInterval = TimeSpan.FromSeconds(10)\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.Close(cAlgo.API.WebSocketClientCloseStatus,System.String)","kind":"method","name":"Close","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public void Close(WebSocketClientCloseStatus closeStatus, string closeStatusDescription)","python":"webSocketClient.Close(closeStatus: WebSocketClientCloseStatus, closeStatusDescription: str) -> None","summary":"Disconnects WebSocketClient.","remarks":null,"parameters":[{"name":"closeStatus","csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"Close status / reason."},{"name":"closeStatusDescription","csharpType":"string","pythonType":"str","summary":"Close status / reason description."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprotected override void OnStop()\n{\n    _client.Close(WebSocketClientCloseStatus.NormalClosure, \"cBot stopped\");\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_stop(self):\n    self.client.Close(WebSocketClientCloseStatus.NormalClosure, \"cBot stopped\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.Connect(System.Uri)","kind":"method","name":"Connect","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public void Connect(Uri uri)","python":"webSocketClient.Connect(uri: Uri) -> None","summary":"Connects WebSocketClient to passed URI.","remarks":null,"parameters":[{"name":"uri","csharpType":"Uri","pythonType":"Uri","summary":"The server URI."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Connected += args => Print(\"Connected to the quotes stream\");\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Connected += lambda args: api.Print(\"Connected to the quotes stream\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Connect/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Connect/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.Dispose","kind":"method","name":"Dispose","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public void Dispose()","python":"webSocketClient.Dispose() -> None","summary":"Releases the unmanaged resources used by the WebSocketClient instance.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprotected override void OnStop()\n{\n    _client.Dispose();\n    Print(\"WebSocket disposed, state: {0}\", _client.State);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_stop(self):\n    self.client.Dispose()\n    api.Print(f\"WebSocket disposed, state: {self.client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Dispose/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Dispose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.Send(System.String)","kind":"method","name":"Send","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public void Send(string text)","python":"webSocketClient.Send(text: str) -> None","summary":"Sends passed text.","remarks":null,"parameters":[{"name":"text","csharpType":"string","pythonType":"str","summary":"Text to send."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Connected += args => args.Client.Send(\"subscribe \" + SymbolName);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Connected += lambda args: args.Client.Send(f\"subscribe {api.SymbolName}\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Send/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Send/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"M:cAlgo.API.WebSocketClient.Send(System.Byte[])","kind":"method","name":"Send","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public void Send(byte[] data)","python":"webSocketClient.Send(data: list[int]) -> None","summary":"Sends passed binary data.","remarks":null,"parameters":[{"name":"data","csharpType":"byte[]","pythonType":"list[int]","summary":"Data to send."}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Connected += args => args.Client.Send(Encoding.UTF8.GetBytes(\"ping\"));\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\nfrom System.Text import Encoding\n\nclient = WebSocketClient()\nclient.Connected += lambda args: args.Client.Send(Encoding.UTF8.GetBytes(\"ping\"))\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Send/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Send/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"P:cAlgo.API.WebSocketClient.CloseStatus","kind":"property","name":"CloseStatus","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClientCloseStatus? CloseStatus {get;}","python":"webSocketClient.CloseStatus: WebSocketClientCloseStatus | None","summary":"Gets close status / reason.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus?","pythonType":"WebSocketClientCloseStatus | None","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Disconnected += args =>\n{\n    if (args.Client.CloseStatus.HasValue)\n        Print(\"Connection closed with status {0}\", args.Client.CloseStatus.Value);\n};\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Disconnected += lambda args: api.Print(f\"Connection closed with status {args.Client.CloseStatus}\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/CloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/CloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"P:cAlgo.API.WebSocketClient.CloseStatusDescription","kind":"property","name":"CloseStatusDescription","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public string CloseStatusDescription {get;}","python":"webSocketClient.CloseStatusDescription: str","summary":"Gets a description of the reason why the instance was closed.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Disconnected += args => Print(\"Close reason: {0}\", args.Client.CloseStatusDescription);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Disconnected += lambda args: api.Print(f\"Close reason: {args.Client.CloseStatusDescription}\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/CloseStatusDescription/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/CloseStatusDescription/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"P:cAlgo.API.WebSocketClient.State","kind":"property","name":"State","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClientState State {get;}","python":"webSocketClient.State: WebSocketClientState","summary":"Gets current state of WebSocketClient instance.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));\nPrint(\"WebSocket state: {0}\", client.State);","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))\napi.Print(f\"WebSocket state: {client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/State/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/State/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"E:cAlgo.API.WebSocketClient.BinaryReceived","kind":"event","name":"BinaryReceived","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public event Action<WebSocketClientBinaryReceivedEventArgs> BinaryReceived;","python":"webSocketClient.BinaryReceived += handler  # handler(obj: WebSocketClientBinaryReceivedEventArgs)","summary":"Occurs when WebSocketClient receives binary data.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebSocketClientBinaryReceivedEventArgs>","pythonType":"Callable[[WebSocketClientBinaryReceivedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.BinaryReceived += OnBinaryReceived;\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprivate void OnBinaryReceived(WebSocketClientBinaryReceivedEventArgs args)\n{\n    Print(\"Received {0} bytes: {1}\", args.Data.Length, Encoding.UTF8.GetString(args.Data));\n}","python":"from System import Uri\nfrom System.Text import Encoding\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.BinaryReceived += self.on_binary_received\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_binary_received(self, args):\n    api.Print(f\"Received {args.Data.Length} bytes: {Encoding.UTF8.GetString(args.Data)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/BinaryReceived/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/BinaryReceived/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"E:cAlgo.API.WebSocketClient.Connected","kind":"event","name":"Connected","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public event Action<WebSocketClientConnectedEventArgs> Connected;","python":"webSocketClient.Connected += handler  # handler(obj: WebSocketClientConnectedEventArgs)","summary":"Occurs when WebSocketClient is connected.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebSocketClientConnectedEventArgs>","pythonType":"Callable[[WebSocketClientConnectedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.Connected += OnConnected;\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprivate void OnConnected(WebSocketClientConnectedEventArgs args)\n{\n    args.Client.Send(\"subscribe \" + SymbolName);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Connected += self.on_connected\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_connected(self, args):\n    args.Client.Send(f\"subscribe {api.SymbolName}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Connected/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Connected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"E:cAlgo.API.WebSocketClient.Disconnected","kind":"event","name":"Disconnected","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public event Action<WebSocketClientDisconnectEventArgs> Disconnected;","python":"webSocketClient.Disconnected += handler  # handler(obj: WebSocketClientDisconnectEventArgs)","summary":"Occurs when WebSocketClient is disconnected.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebSocketClientDisconnectEventArgs>","pythonType":"Callable[[WebSocketClientDisconnectEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.Disconnected += OnDisconnected;\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprivate void OnDisconnected(WebSocketClientDisconnectEventArgs args)\n{\n    Print(\"Disconnected: {0} {1}\", args.Client.CloseStatus, args.Client.CloseStatusDescription);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Disconnected += self.on_disconnected\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_disconnected(self, args):\n    api.Print(f\"Disconnected: {args.Client.CloseStatus} {args.Client.CloseStatusDescription}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Disconnected/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/Disconnected/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"E:cAlgo.API.WebSocketClient.TextReceived","kind":"event","name":"TextReceived","type":"T:cAlgo.API.WebSocketClient","namespace":"cAlgo.API","group":"WebSocket","csharp":"public event Action<WebSocketClientTextReceivedEventArgs> TextReceived;","python":"webSocketClient.TextReceived += handler  # handler(obj: WebSocketClientTextReceivedEventArgs)","summary":"Occurs when WebSocketClient receives text data.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebSocketClientTextReceivedEventArgs>","pythonType":"Callable[[WebSocketClientTextReceivedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client;\n\nprotected override void OnStart()\n{\n    _client = new WebSocketClient();\n    _client.TextReceived += OnTextReceived;\n    _client.Connect(new Uri(\"wss://stream.example.com/quotes\"));\n}\n\nprivate void OnTextReceived(WebSocketClientTextReceivedEventArgs args)\n{\n    Print(\"Received: {0}\", args.Text);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.TextReceived += self.on_text_received\n    self.client.Connect(Uri(\"wss://stream.example.com/quotes\"))\n\ndef on_text_received(self, args):\n    api.Print(f\"Received: {args.Text}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/TextReceived/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClient/TextReceived/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Connect, Send and Close do nothing: \"WebSocket is not supported in cloud environment.\" is written to the log, State stays None and no events are raised."}]}
{"id":"T:cAlgo.API.WebSocketClientBinaryReceivedEventArgs","kind":"class","name":"WebSocketClientBinaryReceivedEventArgs","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClientBinaryReceivedEventArgs","python":"WebSocketClientBinaryReceivedEventArgs","summary":"Provides data for WebSocketClient binary data received event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.BinaryReceived += OnBinaryReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnBinaryReceived(WebSocketClientBinaryReceivedEventArgs args)\n{\n    Print(\"Received {0} bytes, client state: {1}\", args.Data.Length, args.Client.State);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.BinaryReceived += self.on_binary_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_binary_received(self, args):\n    api.Print(f\"Received {len(args.Data)} bytes, client state: {args.Client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.BinaryReceived)."}]}
{"id":"P:cAlgo.API.WebSocketClientBinaryReceivedEventArgs.Client","kind":"property","name":"Client","type":"T:cAlgo.API.WebSocketClientBinaryReceivedEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient Client {get;}","python":"webSocketClientBinaryReceivedEventArgs.Client: WebSocketClient","summary":"Websocket client instance.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClient","pythonType":"WebSocketClient","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.BinaryReceived += OnBinaryReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnBinaryReceived(WebSocketClientBinaryReceivedEventArgs args)\n{\n    args.Client.Send(new byte[] { 1 });\n}","python":"from System import Uri, Array, Byte\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.BinaryReceived += self.on_binary_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_binary_received(self, args):\n    args.Client.Send(Array[Byte]([1]))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/Client/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/Client/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.BinaryReceived)."}]}
{"id":"P:cAlgo.API.WebSocketClientBinaryReceivedEventArgs.Data","kind":"property","name":"Data","type":"T:cAlgo.API.WebSocketClientBinaryReceivedEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public byte[] Data {get;}","python":"webSocketClientBinaryReceivedEventArgs.Data: list[int]","summary":"Received data.","remarks":null,"parameters":[],"returns":{"csharpType":"byte[]","pythonType":"list[int]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.BinaryReceived += OnBinaryReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnBinaryReceived(WebSocketClientBinaryReceivedEventArgs args)\n{\n    var message = Encoding.UTF8.GetString(args.Data);\n    Print(\"Decoded message: {0}\", message);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.BinaryReceived += self.on_binary_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_binary_received(self, args):\n    message = bytes(args.Data).decode(\"utf-8\")\n    api.Print(f\"Decoded message: {message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/Data/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientBinaryReceivedEventArgs/Data/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.BinaryReceived)."}]}
{"id":"T:cAlgo.API.WebSocketClientCloseStatus","kind":"enum","name":"WebSocketClientCloseStatus","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public enum WebSocketClientCloseStatus","python":"WebSocketClientCloseStatus","summary":"An enumeration of different Web socket client close states / reasons.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Disconnected += args => Print(\"Closed with status {0}: {1}\", args.Client.CloseStatus, args.Client.CloseStatusDescription);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));\nclient.Close(WebSocketClientCloseStatus.NormalClosure, \"cBot finished\");","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Disconnected += lambda args: api.Print(f\"Closed with status {args.Client.CloseStatus}: {args.Client.CloseStatusDescription}\")\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))\nclient.Close(WebSocketClientCloseStatus.NormalClosure, \"cBot finished\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.Empty","kind":"enum value","name":"Empty","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.Empty;","python":"WebSocketClientCloseStatus.Empty","summary":"No error specified.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.EndpointUnavailable","kind":"enum value","name":"EndpointUnavailable","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.EndpointUnavailable;","python":"WebSocketClientCloseStatus.EndpointUnavailable","summary":"(1001) Indicates an endpoint is being removed. Either the server or client will become unavailable.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.InternalServerError","kind":"enum value","name":"InternalServerError","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.InternalServerError;","python":"WebSocketClientCloseStatus.InternalServerError","summary":"(1011) The connection will be closed by the server because of an error on the server.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.InvalidMessageType","kind":"enum value","name":"InvalidMessageType","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.InvalidMessageType;","python":"WebSocketClientCloseStatus.InvalidMessageType","summary":"(1003) The client or server is terminating the connection because it cannot accept the data type it received.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.InvalidPayloadData","kind":"enum value","name":"InvalidPayloadData","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.InvalidPayloadData;","python":"WebSocketClientCloseStatus.InvalidPayloadData","summary":"(1007) The client or server is terminating the connection because it has received data inconsistent with the message type.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.MandatoryExtension","kind":"enum value","name":"MandatoryExtension","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.MandatoryExtension;","python":"WebSocketClientCloseStatus.MandatoryExtension","summary":"(1010) The client is terminating the connection because it expected the server to negotiate an extension.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.MessageTooBig","kind":"enum value","name":"MessageTooBig","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.MessageTooBig;","python":"WebSocketClientCloseStatus.MessageTooBig","summary":"(1009) The client or server is terminating the connection because it has received a message that is too big for it to process.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.NormalClosure","kind":"enum value","name":"NormalClosure","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.NormalClosure;","python":"WebSocketClientCloseStatus.NormalClosure","summary":"(1000) The connection has closed after the request was fulfilled.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.PolicyViolation","kind":"enum value","name":"PolicyViolation","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.PolicyViolation;","python":"WebSocketClientCloseStatus.PolicyViolation","summary":"(1008) The connection will be closed because an endpoint has received a message that violates its policy.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientCloseStatus.ProtocolError","kind":"enum value","name":"ProtocolError","type":"T:cAlgo.API.WebSocketClientCloseStatus","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientCloseStatus.ProtocolError;","python":"WebSocketClientCloseStatus.ProtocolError","summary":"(1008) The client or server is terminating the connection because of a protocol error.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientCloseStatus","pythonType":"WebSocketClientCloseStatus","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientCloseStatus/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.WebSocketClientConnectedEventArgs","kind":"class","name":"WebSocketClientConnectedEventArgs","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClientConnectedEventArgs","python":"WebSocketClientConnectedEventArgs","summary":"Provides data for Websocket client connected event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.Connected += OnConnected;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnConnected(WebSocketClientConnectedEventArgs args)\n{\n    Print(\"Connected, client state: {0}\", args.Client.State);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Connected += self.on_connected\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_connected(self, args):\n    api.Print(f\"Connected, client state: {args.Client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientConnectedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientConnectedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.Connected)."}]}
{"id":"P:cAlgo.API.WebSocketClientConnectedEventArgs.Client","kind":"property","name":"Client","type":"T:cAlgo.API.WebSocketClientConnectedEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient Client {get;}","python":"webSocketClientConnectedEventArgs.Client: WebSocketClient","summary":"Connected websocket client instance.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClient","pythonType":"WebSocketClient","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.Connected += OnConnected;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnConnected(WebSocketClientConnectedEventArgs args)\n{\n    args.Client.Send(\"{\\\"action\\\": \\\"subscribe\\\", \\\"symbol\\\": \\\"EURUSD\\\"}\");\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Connected += self.on_connected\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_connected(self, args):\n    args.Client.Send('{\"action\": \"subscribe\", \"symbol\": \"EURUSD\"}')"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientConnectedEventArgs/Client/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientConnectedEventArgs/Client/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.Connected)."}]}
{"id":"T:cAlgo.API.WebSocketClientDisconnectEventArgs","kind":"class","name":"WebSocketClientDisconnectEventArgs","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClientDisconnectEventArgs","python":"WebSocketClientDisconnectEventArgs","summary":"Provides data for Websocket client disconnected event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.Disconnected += OnDisconnected;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnDisconnected(WebSocketClientDisconnectEventArgs args)\n{\n    Print(\"Disconnected, close status: {0}, description: {1}\", args.Client.CloseStatus, args.Client.CloseStatusDescription);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Disconnected += self.on_disconnected\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_disconnected(self, args):\n    api.Print(f\"Disconnected, close status: {args.Client.CloseStatus}, description: {args.Client.CloseStatusDescription}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientDisconnectEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientDisconnectEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.Disconnected)."}]}
{"id":"P:cAlgo.API.WebSocketClientDisconnectEventArgs.Client","kind":"property","name":"Client","type":"T:cAlgo.API.WebSocketClientDisconnectEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient Client {get;}","python":"webSocketClientDisconnectEventArgs.Client: WebSocketClient","summary":"Disconnected websocket client instance.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClient","pythonType":"WebSocketClient","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.Disconnected += OnDisconnected;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnDisconnected(WebSocketClientDisconnectEventArgs args)\n{\n    Print(\"Connection lost, reconnecting\");\n    args.Client.Connect(new Uri(\"wss://example.com/stream\"));\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.Disconnected += self.on_disconnected\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_disconnected(self, args):\n    api.Print(\"Connection lost, reconnecting\")\n    args.Client.Connect(Uri(\"wss://example.com/stream\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientDisconnectEventArgs/Client/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientDisconnectEventArgs/Client/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.Disconnected)."}]}
{"id":"T:cAlgo.API.WebSocketClientOptions","kind":"class","name":"WebSocketClientOptions","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClientOptions","python":"WebSocketClientOptions","summary":"Websocket client options.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions\n{\n    KeepAliveInterval = TimeSpan.FromSeconds(10),\n    Timeout = TimeSpan.FromSeconds(30),\n    SubProtocols = new[] { \"json\" }\n};\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri, TimeSpan, Array, String\n\noptions = WebSocketClientOptions()\noptions.KeepAliveInterval = TimeSpan.FromSeconds(10)\noptions.Timeout = TimeSpan.FromSeconds(30)\noptions.SubProtocols = Array[String]([\"json\"])\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"M:cAlgo.API.WebSocketClientOptions.#ctor","kind":"constructor","name":"WebSocketClientOptions","type":"T:cAlgo.API.WebSocketClientOptions","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClientOptions()","python":"WebSocketClientOptions()","summary":"Creates WebSocketClientOptions with default values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions();\nPrint(\"Default timeout: {0} | Keep alive: {1}\", options.Timeout, options.KeepAliveInterval);","python":"options = WebSocketClientOptions()\napi.Print(f\"Default timeout: {options.Timeout} | Keep alive: {options.KeepAliveInterval}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.WebSocketClientOptions.KeepAliveInterval","kind":"property","name":"KeepAliveInterval","type":"T:cAlgo.API.WebSocketClientOptions","namespace":"cAlgo.API","group":"WebSocket","csharp":"public TimeSpan KeepAliveInterval {get; set;}","python":"webSocketClientOptions.KeepAliveInterval: TimeSpan","summary":"Gets or sets the WebSocket protocol keep-alive interval. Default value is set to 30 seconds.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions { KeepAliveInterval = TimeSpan.FromSeconds(5) };\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri, TimeSpan\n\noptions = WebSocketClientOptions()\noptions.KeepAliveInterval = TimeSpan.FromSeconds(5)\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/KeepAliveInterval/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/KeepAliveInterval/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.WebSocketClientOptions.SubProtocols","kind":"property","name":"SubProtocols","type":"T:cAlgo.API.WebSocketClientOptions","namespace":"cAlgo.API","group":"WebSocket","csharp":"public IEnumerable<string> SubProtocols {get; set;}","python":"webSocketClientOptions.SubProtocols: Iterable[str]","summary":"Gets or sets sub-protocols to be negotiated during the WebSocket connection handshake.","remarks":null,"parameters":[],"returns":{"csharpType":"IEnumerable<string>","pythonType":"Iterable[str]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions { SubProtocols = new[] { \"json\", \"v2.quotes\" } };\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri, Array, String\n\noptions = WebSocketClientOptions()\noptions.SubProtocols = Array[String]([\"json\", \"v2.quotes\"])\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/SubProtocols/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/SubProtocols/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.WebSocketClientOptions.Timeout","kind":"property","name":"Timeout","type":"T:cAlgo.API.WebSocketClientOptions","namespace":"cAlgo.API","group":"WebSocket","csharp":"public TimeSpan Timeout {get; set;}","python":"webSocketClientOptions.Timeout: TimeSpan","summary":"Gets or sets the operation timeout. Default value is set to 60 seconds.","remarks":null,"parameters":[],"returns":{"csharpType":"TimeSpan","pythonType":"TimeSpan","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions { Timeout = TimeSpan.FromSeconds(15) };\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));","python":"from System import Uri, TimeSpan\n\noptions = WebSocketClientOptions()\noptions.Timeout = TimeSpan.FromSeconds(15)\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/Timeout/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/Timeout/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.WebSocketClientOptions.UseDefaultCredentials","kind":"property","name":"UseDefaultCredentials","type":"T:cAlgo.API.WebSocketClientOptions","namespace":"cAlgo.API","group":"WebSocket","csharp":"public bool UseDefaultCredentials {get; set;}","python":"webSocketClientOptions.UseDefaultCredentials: bool","summary":"Gets or sets a Boolean value that indicates if default credentials should be used during WebSocket handshake. Default value is false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var options = new WebSocketClientOptions { UseDefaultCredentials = true };\nvar client = new WebSocketClient(options);\nclient.Connect(new Uri(\"wss://intranet.example.com/signals\"));","python":"from System import Uri\n\noptions = WebSocketClientOptions()\noptions.UseDefaultCredentials = True\nclient = WebSocketClient(options)\nclient.Connect(Uri(\"wss://intranet.example.com/signals\"))"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/UseDefaultCredentials/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientOptions/UseDefaultCredentials/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.WebSocketClientState","kind":"enum","name":"WebSocketClientState","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public enum WebSocketClientState","python":"WebSocketClientState","summary":"An enumeration of different Web socket client states.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var client = new WebSocketClient();\nclient.Connect(new Uri(\"wss://stream.example.com/quotes\"));\nif (client.State == WebSocketClientState.Open)\n    client.Send(\"subscribe EURUSD\");\nelse\n    Print(\"WebSocket state: {0}\", client.State);","python":"from System import Uri\n\nclient = WebSocketClient()\nclient.Connect(Uri(\"wss://stream.example.com/quotes\"))\nif client.State == WebSocketClientState.Open:\n    client.Send(\"subscribe EURUSD\")\nelse:\n    api.Print(f\"WebSocket state: {client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.None","kind":"enum value","name":"None","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.None;","python":"WebSocketClientState.None","summary":"Reserved for future use.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.Connecting","kind":"enum value","name":"Connecting","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.Connecting;","python":"WebSocketClientState.Connecting","summary":"The connection is negotiating the handshake with the remote endpoint.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.Open","kind":"enum value","name":"Open","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.Open;","python":"WebSocketClientState.Open","summary":"The initial state after the HTTP handshake has been completed.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.CloseSent","kind":"enum value","name":"CloseSent","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.CloseSent;","python":"WebSocketClientState.CloseSent","summary":"A close message was sent to the remote endpoint.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.CloseReceived","kind":"enum value","name":"CloseReceived","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.CloseReceived;","python":"WebSocketClientState.CloseReceived","summary":"A close message was received from the remote endpoint.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.Closed","kind":"enum value","name":"Closed","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.Closed;","python":"WebSocketClientState.Closed","summary":"Indicates the WebSocket close handshake completed gracefully.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WebSocketClientState.Aborted","kind":"enum value","name":"Aborted","type":"T:cAlgo.API.WebSocketClientState","namespace":"cAlgo.API","group":"WebSocket","csharp":"WebSocketClientState.Aborted;","python":"WebSocketClientState.Aborted","summary":"Indicates that the WebSocket has been aborted.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClientState","pythonType":"WebSocketClientState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.WebSocketClientTextReceivedEventArgs","kind":"class","name":"WebSocketClientTextReceivedEventArgs","type":null,"namespace":"cAlgo.API","group":"WebSocket","csharp":"public class WebSocketClientTextReceivedEventArgs","python":"WebSocketClientTextReceivedEventArgs","summary":"Provides data for WebSocketClient text data received event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.TextReceived += OnTextReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnTextReceived(WebSocketClientTextReceivedEventArgs args)\n{\n    Print(\"Received: {0}, client state: {1}\", args.Text, args.Client.State);\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.TextReceived += self.on_text_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_text_received(self, args):\n    api.Print(f\"Received: {args.Text}, client state: {args.Client.State}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.TextReceived)."}]}
{"id":"P:cAlgo.API.WebSocketClientTextReceivedEventArgs.Client","kind":"property","name":"Client","type":"T:cAlgo.API.WebSocketClientTextReceivedEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public WebSocketClient Client {get;}","python":"webSocketClientTextReceivedEventArgs.Client: WebSocketClient","summary":"Websocket client instance.","remarks":null,"parameters":[],"returns":{"csharpType":"WebSocketClient","pythonType":"WebSocketClient","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.TextReceived += OnTextReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnTextReceived(WebSocketClientTextReceivedEventArgs args)\n{\n    if (args.Text == \"ping\")\n        args.Client.Send(\"pong\");\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.TextReceived += self.on_text_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_text_received(self, args):\n    if args.Text == \"ping\":\n        args.Client.Send(\"pong\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/Client/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/Client/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.TextReceived)."}]}
{"id":"P:cAlgo.API.WebSocketClientTextReceivedEventArgs.Text","kind":"property","name":"Text","type":"T:cAlgo.API.WebSocketClientTextReceivedEventArgs","namespace":"cAlgo.API","group":"WebSocket","csharp":"public string Text {get;}","python":"webSocketClientTextReceivedEventArgs.Text: str","summary":"Received text.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WebSocketClient _client = new WebSocketClient();\n\nprotected override void OnStart()\n{\n    _client.TextReceived += OnTextReceived;\n    _client.Connect(new Uri(\"wss://example.com/stream\"));\n}\n\nprivate void OnTextReceived(WebSocketClientTextReceivedEventArgs args)\n{\n    if (args.Text.Contains(\"BUY\"))\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"signal\");\n}","python":"from System import Uri\n\ndef on_start(self):\n    self.client = WebSocketClient()\n    self.client.TextReceived += self.on_text_received\n    self.client.Connect(Uri(\"wss://example.com/stream\"))\n\ndef on_text_received(self, args):\n    if \"BUY\" in args.Text:\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"signal\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/Text/","markdown":"https://help.ctrader.com/ctrader-algo/references/WebSocket/WebSocketClientTextReceivedEventArgs/Text/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebSocketClient.TextReceived)."}]}
{"id":"T:cAlgo.API.WebView","kind":"class","name":"WebView","type":null,"namespace":"cAlgo.API","group":"Controls","csharp":"public class WebView : ControlBase","python":"WebView","summary":"Represents the web view control.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    public partial class WebViewOnChart : Robot\n    {\n        private WebView _webView;\n\n        private TextBox _addressTextBox;\n\n        private TextBox _scriptTextBox;\n\n        private Button _executeScriptButton;\n\n        protected override void OnStart()\n        {\n            var goBackButton = new Button\n            {\n                Text = \"←\",\n                Margin = 3\n            };\n\n            goBackButton.Click += OnGoBackButtonClick;\n\n            var goForwardButton = new Button\n            {\n                Text = \"→\",\n                Margin = 3\n            };\n\n            goForwardButton.Click += OnGoForwardButtonClick;\n\n            _addressTextBox = new TextBox\n            {\n                Text = \"https://ctrader.com/\",\n                Margin = 3,\n                Width = 150,\n                MinWidth = 150,\n                MaxWidth = 150\n            };\n\n            var goButton = new Button\n            {\n                Text = \"→\",\n                Margin = 3\n            };\n\n            goButton.Click += OnGoButtonClick;\n\n            var reloadButton = new Button\n            {\n                Text = \"Reload\",\n                Margin = 3\n            };\n\n            reloadButton.Click += OnReloadButtonClick;\n\n            var stopButton = new Button\n            {\n                Text = \"x\",\n                Margin = 3\n            };\n\n            stopButton.Click += OnStopButtonClick;\n\n            _scriptTextBox = new TextBox\n            {\n                Text = \"alert('Hi');\",\n                Margin = 3,\n                Width = 150,\n                MinWidth = 150,\n                MaxWidth = 150,\n                IsEnabled = false\n            };\n\n            _executeScriptButton = new Button\n            {\n                Text = \"Execute Script\",\n                Margin = 3,\n                IsEnabled = false\n            };\n\n            _executeScriptButton.Click += OnExecuteScriptButtonClick;\n\n            var addressBarPanel = new StackPanel\n            {\n                MaxHeight = 50,\n                VerticalAlignment = VerticalAlignment.Top,\n                BackgroundColor = Color.Black,\n                Orientation = Orientation.Horizontal\n            };\n\n            addressBarPanel.AddChild(goBackButton);\n            addressBarPanel.AddChild(goForwardButton);\n            addressBarPanel.AddChild(_addressTextBox);\n            addressBarPanel.AddChild(goButton);\n            addressBarPanel.AddChild(reloadButton);\n            addressBarPanel.AddChild(stopButton);\n            addressBarPanel.AddChild(_scriptTextBox);\n            addressBarPanel.AddChild(_executeScriptButton);\n\n            _webView = new WebView\n            {\n                DefaultBackgroundColor = Color.Red\n            };\n\n            _webView.NavigationCompleted += OnWebViewNavigationCompleted;\n            _webView.WebMessageReceived += OnWebViewWebMessageReceived;\n            _webView.Loaded += OnWebViewLoaded;\n            _webView.Unloaded += OnWebViewUnloaded;\n\n            var mainGrid = new Grid(2, 1);\n\n            mainGrid.Rows[0].SetHeightToAuto();\n            mainGrid.Rows[1].SetHeightInStars(1);\n\n            mainGrid.AddChild(addressBarPanel, 0, 0);\n            mainGrid.AddChild(_webView, 1, 0);\n\n            Chart.AddControl(mainGrid);\n\n            _webView.NavigateAsync(_addressTextBox.Text);\n        }\n\n        private void OnWebViewLoaded(WebViewLoadedEventArgs args)\n        {\n            Print($\"Webview loaded, IsLoaded: {args.WebView.IsLoaded}\");\n        }\n\n        private void OnWebViewUnloaded(WebViewUnloadedEventArgs args)\n        {\n            Print($\"Webview unloaded, IsLoaded: {args.WebView.IsLoaded}\");\n        }\n\n        private void OnStopButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.StopAsync();\n        }\n\n        private void OnExecuteScriptButtonClick(ButtonClickEventArgs args)\n        {\n            var result = _webView.ExecuteScript(_scriptTextBox.Text);\n\n            Print($\"IsSuccessful: {result.IsSuccessful} | Json: {result.Json}\");\n        }\n\n        private void OnReloadButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.ReloadAsync();\n        }\n\n        private void OnGoForwardButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.GoForwardAsync();\n        }\n\n        private void OnGoBackButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.GoBackAsync();\n        }\n\n        private void OnGoButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.NavigateAsync(_addressTextBox.Text);\n        }\n\n        private void OnWebViewWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n        {\n            Print($\"Source: {args.Source} | Message: {args.Message}\");\n        }\n\n        private void OnWebViewNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n        {\n            Print($\"{args.HttpStatusCode} | {args.IsSuccessful} | {args.Url}\");\n\n            _addressTextBox.Text = args.Url;\n            _scriptTextBox.IsEnabled = true;\n            _executeScriptButton.IsEnabled = true;\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_go_back_button_clicked(self, args):\n        self.webView.GoBackAsync()\n\n    def on_go_forward_button_clicked(self, args):\n        self.webView.GoForwardAsync()\n\n    def on_go_button_clicked(self, args):\n        self.webView.NavigateAsync(self.addressTextBox.Text)\n\n    def on_reload_button_clicked(self, args):\n        self.webView.ReloadAsync()\n\n    def on_stop_button_clicked(self, args):\n        self.webView.StopAsync()\n\n    def on_execute_script_button_clicked(self, args):\n        result = self.webView.ExecuteScript(self.scriptTextBox.Text)\n        api.Print(f\"IsSuccessful: {result.IsSuccessful} | Json: {result.Json}\")\n\n    def on_web_view_navigation_completed(self, args):\n        api.Print(f\"{args.HttpStatusCode} | {args.IsSuccessful} | {args.Url}\")\n        self.addressTextBox.Text = args.Url\n        self.scriptTextBox.IsEnabled = True\n        self.executeScriptButton.IsEnabled = True\n\n    def on_start(self):\n        goBackButton = Button()\n        goBackButton.Text = \"←\"\n        goBackButton.Margin = Thickness(3)\n        goBackButton.Click += self.on_go_back_button_clicked\n\n        goForwardButton = Button()\n        goForwardButton.Text = \"→\"\n        goForwardButton.Margin = Thickness(3)\n        goForwardButton.Click += self.on_go_forward_button_clicked\n\n        self.addressTextBox = TextBox()\n        self.addressTextBox.Text = \"https://ctrader.com/\"\n        self.addressTextBox.Margin = Thickness(3)\n        self.addressTextBox.Width = 150\n        self.addressTextBox.MinWidth = 150\n        self.addressTextBox.MaxWidth = 150\n\n        goButton = Button()\n        goButton.Text = \"→\"\n        goButton.Margin = Thickness(3)\n        goButton.Click += self.on_go_button_clicked\n\n        reloadButton = Button()\n        reloadButton.Text = \"Reload\"\n        reloadButton.Margin = Thickness(3)\n        reloadButton.Click += self.on_reload_button_clicked\n\n        stopButton = Button()\n        stopButton.Text = \"x\"\n        stopButton.Margin = Thickness(3)\n        stopButton.Click += self.on_stop_button_clicked\n\n        self.scriptTextBox = TextBox()\n        self.scriptTextBox.Text = \"alert('Hi')\"\n        self.scriptTextBox.Margin = Thickness(3)\n        self.scriptTextBox.Width = 150\n        self.scriptTextBox.MinWidth = 150\n        self.scriptTextBox.MaxWidth = 150\n        self.scriptTextBox.IsEnabled = False\n\n        self.executeScriptButton = Button()\n        self.executeScriptButton.Text = \"Execute Script\"\n        self.executeScriptButton.Margin = Thickness(3)\n        self.executeScriptButton.IsEnabled = False\n        self.executeScriptButton.Click += self.on_execute_script_button_clicked\n\n        addressBarPanel = StackPanel()\n        addressBarPanel.MaxHeight = 50\n        addressBarPanel.VerticalAlignment = VerticalAlignment.Top\n        addressBarPanel.BackgroundColor = Color.Black\n        addressBarPanel.Orientation = Orientation.Horizontal\n\n        addressBarPanel.AddChild(goBackButton)\n        addressBarPanel.AddChild(goForwardButton)\n        addressBarPanel.AddChild(self.addressTextBox)\n        addressBarPanel.AddChild(goButton)\n        addressBarPanel.AddChild(reloadButton)\n        addressBarPanel.AddChild(stopButton)\n        addressBarPanel.AddChild(self.scriptTextBox)\n        addressBarPanel.AddChild(self.executeScriptButton)\n\n        self.webView = WebView()\n        self.webView.DefaultBackgroundColor = Color.Red\n        self.webView.NavigationCompleted += self.on_web_view_navigation_completed\n        self.webView.WebMessageReceived += lambda args: api.Print(f\"Source: {args.Source} | Message: {args.Message}\")\n        self.webView.Loaded += lambda args: api.Print(f\"Webview loaded, IsLoaded: {args.WebView.IsLoaded}\")\n        self.webView.Unloaded += lambda args: api.Print(f\"Webview unloaded, IsLoaded: {args.WebView.IsLoaded}\")\n\n        self.webView.NavigateAsync(self.addressTextBox.Text)\n\n        mainGrid = Grid(2, 1)\n\n        mainGrid.Rows[0].SetHeightToAuto()\n        mainGrid.Rows[1].SetHeightInStars(1)\n\n        mainGrid.AddChild(addressBarPanel, 0, 0)\n        mainGrid.AddChild(self.webView, 1, 0)\n\n        api.Chart.AddControl(mainGrid)","config":"{\n  \"AccessRights\": \"None\"\n}"},{"csharp":"using cAlgo.API;\n\nnamespace cAlgo.Robots\n{\n    public partial class WebViewOnWindow : Robot\n    {\n        private WebView _webView;\n\n        private TextBox _addressTextBox;\n\n        private TextBox _scriptTextbox;\n\n        private Button _executeScriptButton;\n\n        protected override void OnStart()\n        {\n            var goBackButton = new Button\n            {\n                Text = \"←\",\n                Margin = 3\n            };\n\n            goBackButton.Click += OnGoBackButtonClick;\n\n            var goForwardButton = new Button\n            {\n                Text = \"→\",\n                Margin = 3\n            };\n\n            goForwardButton.Click += OnGoForwardButtonClick;\n\n            _addressTextBox = new TextBox\n            {\n                Text = \"https://ctrader.com/\",\n                Margin = 3,\n                Width = 150,\n                MinWidth = 150,\n                MaxWidth = 150\n            };\n\n            var goButton = new Button\n            {\n                Text = \"→\",\n                Margin = 3\n            };\n\n            goButton.Click += OnGoButtonClick;\n\n            var reloadButton = new Button\n            {\n                Text = \"Reload\",\n                Margin = 3\n            };\n\n            reloadButton.Click += OnReloadButtonClick;\n\n            var stopButton = new Button\n            {\n                Text = \"x\",\n                Margin = 3\n            };\n\n            stopButton.Click += OnStopButtonClick;\n\n            _scriptTextbox = new TextBox\n            {\n                Text = \"alert('Hi');\",\n                Margin = 3,\n                Width = 150,\n                MinWidth = 150,\n                MaxWidth = 150,\n                IsEnabled = false\n            };\n\n            _executeScriptButton = new Button\n            {\n                Text = \"Execute Script\",\n                Margin = 3,\n                IsEnabled = false\n            };\n\n            _executeScriptButton.Click += OnExecuteScriptButtonClick;\n\n            var addressBarPanel = new StackPanel\n            {\n                MaxHeight = 50,\n                VerticalAlignment = VerticalAlignment.Top,\n                BackgroundColor = Color.Black,\n                Orientation = Orientation.Horizontal\n            };\n\n            addressBarPanel.AddChild(goBackButton);\n            addressBarPanel.AddChild(goForwardButton);\n            addressBarPanel.AddChild(_addressTextBox);\n            addressBarPanel.AddChild(goButton);\n            addressBarPanel.AddChild(reloadButton);\n            addressBarPanel.AddChild(stopButton);\n            addressBarPanel.AddChild(_scriptTextbox);\n            addressBarPanel.AddChild(_executeScriptButton);\n\n            _webView = new WebView\n            {\n                DefaultBackgroundColor = Color.Red\n            };\n\n            _webView.NavigationCompleted += OnWebViewNavigationCompleted;\n            _webView.WebMessageReceived += OnWebViewWebMessageReceived;\n            _webView.Loaded += OnWebViewLoaded;\n            _webView.Unloaded += OnWebViewUnloaded;\n\n            var mainGrid = new Grid(2, 1);\n\n            mainGrid.Rows[0].SetHeightToAuto();\n            mainGrid.Rows[1].SetHeightInStars(1);\n\n            mainGrid.AddChild(addressBarPanel, 0, 0);\n            mainGrid.AddChild(_webView, 1, 0);\n\n            var window = new Window\n            {\n                Child = mainGrid\n            };\n\n            window.Show();\n\n            _webView.NavigateAsync(_addressTextBox.Text);\n        }\n\n        private void OnWebViewLoaded(WebViewLoadedEventArgs args)\n        {\n            Print($\"Webview loaded, IsLoaded: {args.WebView.IsLoaded}\");\n        }\n\n        private void OnWebViewUnloaded(WebViewUnloadedEventArgs args)\n        {\n            Print($\"Webview unloaded, IsLoaded: {args.WebView.IsLoaded}\");\n        }\n\n        private void OnStopButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.StopAsync();\n        }\n\n        private void OnExecuteScriptButtonClick(ButtonClickEventArgs args)\n        {\n            var result = _webView.ExecuteScript(_scriptTextbox.Text);\n\n            Print($\"IsSuccessful: {result.IsSuccessful} | Json: {result.Json}\");\n        }\n\n        private void OnReloadButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.ReloadAsync();\n        }\n\n        private void OnGoForwardButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.GoForwardAsync();\n        }\n\n        private void OnGoBackButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.GoBackAsync();\n        }\n\n        private void OnGoButtonClick(ButtonClickEventArgs args)\n        {\n            _webView.NavigateAsync(_addressTextBox.Text);\n        }\n\n        private void OnWebViewWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n        {\n            Print($\"Source: {args.Source} | Message: {args.Message}\");\n        }\n\n        private void OnWebViewNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n        {\n            Print($\"{args.HttpStatusCode} | {args.IsSuccessful} | {args.Url}\");\n\n            _addressTextBox.Text = args.Url;\n            _scriptTextbox.IsEnabled = true;\n            _executeScriptButton.IsEnabled = true;\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass Test():\n    def on_go_back_button_clicked(self, args):\n        self.webView.GoBackAsync()\n\n    def on_go_forward_button_clicked(self, args):\n        self.webView.GoForwardAsync()\n\n    def on_go_button_clicked(self, args):\n        self.webView.NavigateAsync(self.addressTextBox.Text)\n\n    def on_reload_button_clicked(self, args):\n        self.webView.ReloadAsync()\n\n    def on_stop_button_clicked(self, args):\n        self.webView.StopAsync()\n\n    def on_execute_script_button_clicked(self, args):\n        result = self.webView.ExecuteScript(self.scriptTextBox.Text)\n        api.Print(f\"IsSuccessful: {result.IsSuccessful} | Json: {result.Json}\")\n\n    def on_web_view_navigation_completed(self, args):\n        api.Print(f\"{args.HttpStatusCode} | {args.IsSuccessful} | {args.Url}\")\n        self.addressTextBox.Text = args.Url\n        self.scriptTextBox.IsEnabled = True\n        self.executeScriptButton.IsEnabled = True\n\n    def on_start(self):\n        goBackButton = Button()\n        goBackButton.Text = \"←\"\n        goBackButton.Margin = Thickness(3)\n        goBackButton.Click += self.on_go_back_button_clicked\n\n        goForwardButton = Button()\n        goForwardButton.Text = \"→\"\n        goForwardButton.Margin = Thickness(3)\n        goForwardButton.Click += self.on_go_forward_button_clicked\n\n        self.addressTextBox = TextBox()\n        self.addressTextBox.Text = \"https://ctrader.com/\"\n        self.addressTextBox.Margin = Thickness(3)\n        self.addressTextBox.Width = 150\n        self.addressTextBox.MinWidth = 150\n        self.addressTextBox.MaxWidth = 150\n\n        goButton = Button()\n        goButton.Text = \"→\"\n        goButton.Margin = Thickness(3)\n        goButton.Click += self.on_go_button_clicked\n\n        reloadButton = Button()\n        reloadButton.Text = \"Reload\"\n        reloadButton.Margin = Thickness(3)\n        reloadButton.Click += self.on_reload_button_clicked\n\n        stopButton = Button()\n        stopButton.Text = \"x\"\n        stopButton.Margin = Thickness(3)\n        stopButton.Click += self.on_stop_button_clicked\n\n        self.scriptTextBox = TextBox()\n        self.scriptTextBox.Text = \"alert('Hi')\"\n        self.scriptTextBox.Margin = Thickness(3)\n        self.scriptTextBox.Width = 150\n        self.scriptTextBox.MinWidth = 150\n        self.scriptTextBox.MaxWidth = 150\n        self.scriptTextBox.IsEnabled = False\n\n        self.executeScriptButton = Button()\n        self.executeScriptButton.Text = \"Execute Script\"\n        self.executeScriptButton.Margin = Thickness(3)\n        self.executeScriptButton.IsEnabled = False\n        self.executeScriptButton.Click += self.on_execute_script_button_clicked\n\n        addressBarPanel = StackPanel()\n        addressBarPanel.MaxHeight = 50\n        addressBarPanel.VerticalAlignment = VerticalAlignment.Top\n        addressBarPanel.BackgroundColor = Color.Black\n        addressBarPanel.Orientation = Orientation.Horizontal\n\n        addressBarPanel.AddChild(goBackButton)\n        addressBarPanel.AddChild(goForwardButton)\n        addressBarPanel.AddChild(self.addressTextBox)\n        addressBarPanel.AddChild(goButton)\n        addressBarPanel.AddChild(reloadButton)\n        addressBarPanel.AddChild(stopButton)\n        addressBarPanel.AddChild(self.scriptTextBox)\n        addressBarPanel.AddChild(self.executeScriptButton)\n\n        self.webView = WebView()\n        self.webView.DefaultBackgroundColor = Color.Red\n        self.webView.NavigationCompleted += self.on_web_view_navigation_completed\n        self.webView.WebMessageReceived += lambda args: api.Print(f\"Source: {args.Source} | Message: {args.Message}\")\n        self.webView.Loaded += lambda args: api.Print(f\"Webview loaded, IsLoaded: {args.WebView.IsLoaded}\")\n        self.webView.Unloaded += lambda args: api.Print(f\"Webview unloaded, IsLoaded: {args.WebView.IsLoaded}\")\n\n        self.webView.NavigateAsync(self.addressTextBox.Text)\n\n        mainGrid = Grid(2, 1)\n\n        mainGrid.Rows[0].SetHeightToAuto()\n        mainGrid.Rows[1].SetHeightInStars(1)\n\n        mainGrid.AddChild(addressBarPanel, 0, 0)\n        mainGrid.AddChild(self.webView, 1, 0)\n\n        window = Window()\n        window.Child = mainGrid\n        window.Show()","config":"{\n  \"AccessRights\": \"None\"\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.#ctor","kind":"constructor","name":"WebView","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public WebView()","python":"WebView()","summary":"Initializes a new instance of the WebView class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 400, Height = 300 };\nwebView.Loaded += args => webView.NavigateAsync(\"https://ctrader.com/\");\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Width = 400\nwebView.Height = 300\nwebView.Loaded += lambda args: webView.NavigateAsync(\"https://ctrader.com/\")\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.ExecuteScript(System.String)","kind":"method","name":"ExecuteScript","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public ExecuteScriptResult ExecuteScript(string javaScript)","python":"webView.ExecuteScript(javaScript: str) -> ExecuteScriptResult","summary":"Executes JavaScript code from the javaScript parameter in the current top level document rendered in the WebView and returns the result. You can only use this method after control is fully loaded and navigation is completed.","remarks":null,"parameters":[{"name":"javaScript","csharpType":"string","pythonType":"str","summary":"JavaScript code"}],"returns":{"csharpType":"ExecuteScriptResult","pythonType":"ExecuteScriptResult","summary":"ExecuteScriptResult","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body>Spread monitor</body></html>\");\nwebView.NavigationCompleted += args =>\n{\n    var result = webView.ExecuteScript(\"document.title = 'EURUSD'; document.body.innerText\");\n    if (result != null && result.IsSuccessful)\n        Print(\"Script result: {0}\", result.Json);\n};\nChart.AddControl(webView);","python":"def on_start(self):\n    self.webView = WebView()\n    self.webView.NavigateToStringAsync(\"<html><body>Spread monitor</body></html>\")\n    self.webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(self.webView)\n\ndef on_navigation_completed(self, args):\n    result = self.webView.ExecuteScript(\"document.body.innerText\")\n    if result is not None and result.IsSuccessful:\n        api.Print(f\"Script result: {result.Json}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScript/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScript/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.ExecuteScriptAsync(System.String)","kind":"method","name":"ExecuteScriptAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void ExecuteScriptAsync(string javaScript)","python":"webView.ExecuteScriptAsync(javaScript: str) -> None","summary":"Executes JavaScript code from the javaScript parameter in the current top level document rendered in the WebView. You can only use this method after control is fully loaded and navigation is completed.","remarks":null,"parameters":[{"name":"javaScript","csharpType":"string","pythonType":"str","summary":"JavaScript code"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body id='price'></body></html>\");\nwebView.NavigationCompleted += args => webView.ExecuteScriptAsync(\"document.getElementById('price').innerText = '\" + Symbol.Bid + \"'\");\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Width = 300\nwebView.Height = 100\nwebView.NavigateToStringAsync(\"<html><body id='price'></body></html>\")\nwebView.NavigationCompleted += lambda args: webView.ExecuteScriptAsync(f\"document.getElementById('price').innerText = '{api.Symbol.Bid}'\")\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScriptAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScriptAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.ExecuteScriptAsync(System.String,System.Action{cAlgo.API.ExecuteScriptResult})","kind":"method","name":"ExecuteScriptAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void ExecuteScriptAsync(string javaScript, Action<ExecuteScriptResult> callback)","python":"webView.ExecuteScriptAsync(javaScript: str, callback: Callable[[ExecuteScriptResult], None]) -> None","summary":"Executes asynchronously JavaScript code from the javaScript parameter in the current top level document rendered in the WebView. You can only use this method after control is fully loaded and navigation is completed.","remarks":null,"parameters":[{"name":"javaScript","csharpType":"string","pythonType":"str","summary":"JavaScript code"},{"name":"callback","csharpType":"Action<ExecuteScriptResult>","pythonType":"Callable[[ExecuteScriptResult], None]","summary":"The callback that will be called after execution finished"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\");\nwebView.NavigationCompleted += args => webView.ExecuteScriptAsync(\"document.body.innerText\", result => Print(\"Successful: {0}, JSON: {1}\", result.IsSuccessful, result.Json));\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Width = 300\nwebView.Height = 100\nwebView.NavigateToStringAsync(\"<html><body>Hello</body></html>\")\nwebView.NavigationCompleted += lambda args: webView.ExecuteScriptAsync(\"document.body.innerText\", lambda result: api.Print(f\"Successful: {result.IsSuccessful}, JSON: {result.Json}\"))\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScriptAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ExecuteScriptAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.GoBackAsync","kind":"method","name":"GoBackAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void GoBackAsync()","python":"webView.GoBackAsync() -> None","summary":"Navigates asynchronously the WebView to the previous page in the navigation history.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nvar backButton = new Button { Text = \"Back\" };\nbackButton.Click += args => webView.GoBackAsync();\nvar panel = new StackPanel();\npanel.AddChild(backButton);\npanel.AddChild(webView);\nChart.AddControl(panel);","python":"webView = WebView()\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\nbackButton = Button()\nbackButton.Text = \"Back\"\nbackButton.Click += lambda args: webView.GoBackAsync()\npanel = StackPanel()\npanel.AddChild(backButton)\npanel.AddChild(webView)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/GoBackAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/GoBackAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.GoForwardAsync","kind":"method","name":"GoForwardAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void GoForwardAsync()","python":"webView.GoForwardAsync() -> None","summary":"Navigates asynchronously the WebView to the next page in the navigation history.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nvar forwardButton = new Button { Text = \"Forward\" };\nforwardButton.Click += args => webView.GoForwardAsync();\nvar panel = new StackPanel();\npanel.AddChild(forwardButton);\npanel.AddChild(webView);\nChart.AddControl(panel);","python":"webView = WebView()\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\nforwardButton = Button()\nforwardButton.Text = \"Forward\"\nforwardButton.Click += lambda args: webView.GoForwardAsync()\npanel = StackPanel()\npanel.AddChild(forwardButton)\npanel.AddChild(webView)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/GoForwardAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/GoForwardAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.NavigateAsync(System.String)","kind":"method","name":"NavigateAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void NavigateAsync(string url)","python":"webView.NavigateAsync(url: str) -> None","summary":"Navigate asynchronously to another URL.","remarks":null,"parameters":[{"name":"url","csharpType":"string","pythonType":"str","summary":"Target URL"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 500, Height = 400 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Width = 500\nwebView.Height = 400\nwebView.NavigateAsync(\"https://ctrader.com/\")\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigateAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigateAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.NavigateToStringAsync(System.String)","kind":"method","name":"NavigateToStringAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void NavigateToStringAsync(string html)","python":"webView.NavigateToStringAsync(html: str) -> None","summary":"Initiates a navigation asynchronously to html content as source HTML of a new document.","remarks":null,"parameters":[{"name":"html","csharpType":"string","pythonType":"str","summary":"HTML content"}],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 120 };\nwebView.NavigateToStringAsync(\"<html><body><h3>\" + SymbolName + \" bid: \" + Symbol.Bid + \"</h3></body></html>\");\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.Width = 300\nwebView.Height = 120\nwebView.NavigateToStringAsync(f\"<html><body><h3>{api.SymbolName} bid: {api.Symbol.Bid}</h3></body></html>\")\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigateToStringAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigateToStringAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.OpenDevToolsWindow","kind":"method","name":"OpenDevToolsWindow","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void OpenDevToolsWindow()","python":"webView.OpenDevToolsWindow() -> None","summary":"Opens the DevTools window for the current WebView.","remarks":"Does nothing if run when the DevTools window is already open.","parameters":[],"returns":null,"exceptions":[],"since":"5.6","deprecated":null,"examples":[{"csharp":"var webView = new WebView { Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nvar devToolsButton = new Button { Text = \"Dev tools\" };\ndevToolsButton.Click += args => webView.OpenDevToolsWindow();\nvar panel = new StackPanel();\npanel.AddChild(devToolsButton);\npanel.AddChild(webView);\nChart.AddControl(panel);","python":"webView = WebView()\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\ndevToolsButton = Button()\ndevToolsButton.Text = \"Dev tools\"\ndevToolsButton.Click += lambda args: webView.OpenDevToolsWindow()\npanel = StackPanel()\npanel.AddChild(devToolsButton)\npanel.AddChild(webView)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/OpenDevToolsWindow/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/OpenDevToolsWindow/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.ReloadAsync","kind":"method","name":"ReloadAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void ReloadAsync()","python":"webView.ReloadAsync() -> None","summary":"Reloads asynchronously the current page.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nvar reloadButton = new Button { Text = \"Reload\" };\nreloadButton.Click += args => webView.ReloadAsync();\nvar panel = new StackPanel();\npanel.AddChild(reloadButton);\npanel.AddChild(webView);\nChart.AddControl(panel);","python":"webView = WebView()\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\nreloadButton = Button()\nreloadButton.Text = \"Reload\"\nreloadButton.Click += lambda args: webView.ReloadAsync()\npanel = StackPanel()\npanel.AddChild(reloadButton)\npanel.AddChild(webView)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ReloadAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/ReloadAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WebView.StopAsync","kind":"method","name":"StopAsync","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public void StopAsync()","python":"webView.StopAsync() -> None","summary":"Stops asynchronously all navigations and pending resource fetches.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nvar stopButton = new Button { Text = \"Stop loading\" };\nstopButton.Click += args => webView.StopAsync();\nvar panel = new StackPanel();\npanel.AddChild(stopButton);\npanel.AddChild(webView);\nChart.AddControl(panel);","python":"webView = WebView()\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\nstopButton = Button()\nstopButton.Text = \"Stop loading\"\nstopButton.Click += lambda args: webView.StopAsync()\npanel = StackPanel()\npanel.AddChild(stopButton)\npanel.AddChild(webView)\napi.Chart.AddControl(panel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/StopAsync/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/StopAsync/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.WebView.DefaultBackgroundColor","kind":"property","name":"DefaultBackgroundColor","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public Color DefaultBackgroundColor {get; set;}","python":"webView.DefaultBackgroundColor: Color","summary":"Default background color of WebView.","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { DefaultBackgroundColor = Color.Black, Width = 400, Height = 300 };\nwebView.NavigateAsync(\"https://ctrader.com/\");\nChart.AddControl(webView);","python":"webView = WebView()\nwebView.DefaultBackgroundColor = Color.Black\nwebView.Width = 400\nwebView.Height = 300\nwebView.NavigateAsync(\"https://ctrader.com/\")\napi.Chart.AddControl(webView)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/DefaultBackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/DefaultBackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.WebView.IsLoaded","kind":"property","name":"IsLoaded","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public bool IsLoaded {get;}","python":"webView.IsLoaded: bool","summary":"Returns True if WebView is loaded otherwise False.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 400, Height = 300 };\nwebView.Loaded += args => Print(\"Web view loaded: {0}\", args.WebView.IsLoaded);\nChart.AddControl(webView);\nPrint(\"Loaded right after adding: {0}\", webView.IsLoaded);","python":"webView = WebView()\nwebView.Width = 400\nwebView.Height = 300\nwebView.Loaded += lambda args: api.Print(f\"Web view loaded: {args.WebView.IsLoaded}\")\napi.Chart.AddControl(webView)\napi.Print(f\"Loaded right after adding: {webView.IsLoaded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/IsLoaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/IsLoaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.WebView.Loaded","kind":"event","name":"Loaded","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<WebViewLoadedEventArgs> Loaded;","python":"webView.Loaded += handler  # handler(obj: WebViewLoadedEventArgs)","summary":"Occurs after web view is loaded","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebViewLoadedEventArgs>","pythonType":"Callable[[WebViewLoadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 400, Height = 300 };\nwebView.Loaded += args =>\n{\n    Print(\"Web view loaded: {0}\", args.WebView.IsLoaded);\n    args.WebView.NavigateAsync(\"https://ctrader.com/\");\n};\nChart.AddControl(webView);","python":"def on_start(self):\n    webView = WebView()\n    webView.Loaded += self.on_web_view_loaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_loaded(self, args):\n    api.Print(f\"Web view loaded: {args.WebView.IsLoaded}\")\n    args.WebView.NavigateAsync(\"https://ctrader.com/\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Loaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Loaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.WebView.NavigationCompleted","kind":"event","name":"NavigationCompleted","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<WebViewNavigationCompletedEventArgs> NavigationCompleted;","python":"webView.NavigationCompleted += handler  # handler(obj: WebViewNavigationCompletedEventArgs)","summary":"Occurs when navigation of a page is completed.","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebViewNavigationCompletedEventArgs>","pythonType":"Callable[[WebViewNavigationCompletedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 400, Height = 300 };\nwebView.NavigationCompleted += args => Print(\"Navigated to {0}, status {1}, successful: {2}\", args.Url, args.HttpStatusCode, args.IsSuccessful);\nwebView.NavigateAsync(\"https://ctrader.com/\");\nChart.AddControl(webView);","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    webView.NavigateAsync(\"https://ctrader.com/\")\n    api.Chart.AddControl(webView)\n\ndef on_navigation_completed(self, args):\n    api.Print(f\"Navigated to {args.Url}, status {args.HttpStatusCode}, successful: {args.IsSuccessful}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigationCompleted/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigationCompleted/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.WebView.Unloaded","kind":"event","name":"Unloaded","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<WebViewUnloadedEventArgs> Unloaded;","python":"webView.Unloaded += handler  # handler(obj: WebViewUnloadedEventArgs)","summary":"Occurs after web view is unloaded","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebViewUnloadedEventArgs>","pythonType":"Callable[[WebViewUnloadedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 400, Height = 300 };\nwebView.Unloaded += args => Print(\"Web view unloaded, loaded: {0}\", args.WebView.IsLoaded);\nChart.AddControl(webView);\nChart.RemoveControl(webView);","python":"def on_start(self):\n    webView = WebView()\n    webView.Unloaded += self.on_web_view_unloaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_unloaded(self, args):\n    api.Print(f\"Web view unloaded, loaded: {args.WebView.IsLoaded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Unloaded/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Unloaded/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"E:cAlgo.API.WebView.WebMessageReceived","kind":"event","name":"WebMessageReceived","type":"T:cAlgo.API.WebView","namespace":"cAlgo.API","group":"Controls","csharp":"public event Action<WebViewWebMessageReceivedEventArgs> WebMessageReceived;","python":"webView.WebMessageReceived += handler  # handler(obj: WebViewWebMessageReceivedEventArgs)","summary":"Occurs after web content sends a message","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WebViewWebMessageReceivedEventArgs>","pythonType":"Callable[[WebViewWebMessageReceivedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var webView = new WebView { Width = 300, Height = 100 };\nwebView.NavigateToStringAsync(\"<html><body><button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button></body></html>\");\nwebView.WebMessageReceived += args =>\n{\n    if (args.Message.Contains(\"buy\"))\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.QuantityToVolumeInUnits(0.01));\n};\nChart.AddControl(webView);","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigateToStringAsync(\"<html><body><button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button></body></html>\")\n    webView.WebMessageReceived += self.on_web_message_received\n    api.Chart.AddControl(webView)\n\ndef on_web_message_received(self, args):\n    api.Print(f\"Message from {args.Source}: {args.Message}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/WebMessageReceived/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/WebView/WebMessageReceived/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"T:cAlgo.API.WebViewLoadedEventArgs","kind":"class","name":"WebViewLoadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WebViewLoadedEventArgs","python":"WebViewLoadedEventArgs","summary":"Provides data for the WebView control Loaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.Loaded += OnWebViewLoaded;\n    Chart.AddControl(webView);\n}\n\nprivate void OnWebViewLoaded(WebViewLoadedEventArgs args)\n{\n    Print(\"Web view loaded: {0}\", args.WebView.IsLoaded);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.Loaded += self.on_web_view_loaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_loaded(self, args):\n    api.Print(f\"Web view loaded: {args.WebView.IsLoaded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewLoadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewLoadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.Loaded)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.Loaded)."}]}
{"id":"P:cAlgo.API.WebViewLoadedEventArgs.WebView","kind":"property","name":"WebView","type":"T:cAlgo.API.WebViewLoadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public WebView WebView {get;}","python":"webViewLoadedEventArgs.WebView: WebView","summary":"The WebView control.","remarks":null,"parameters":[],"returns":{"csharpType":"WebView","pythonType":"WebView","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.Loaded += OnWebViewLoaded;\n    Chart.AddControl(webView);\n}\n\nprivate void OnWebViewLoaded(WebViewLoadedEventArgs args)\n{\n    args.WebView.NavigateAsync(\"https://ctrader.com/\");\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.Loaded += self.on_web_view_loaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_loaded(self, args):\n    args.WebView.NavigateAsync(\"https://ctrader.com/\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewLoadedEventArgs/WebView/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewLoadedEventArgs/WebView/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.Loaded)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.Loaded)."}]}
{"id":"T:cAlgo.API.WebViewNavigationCompletedEventArgs","kind":"class","name":"WebViewNavigationCompletedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WebViewNavigationCompletedEventArgs","python":"WebViewNavigationCompletedEventArgs","summary":"Provides data for the WebView control NavigationCompleted event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.NavigationCompleted += OnNavigationCompleted;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n{\n    Print(\"Navigation to {0} completed | Successful: {1} | HTTP status: {2}\", args.Url, args.IsSuccessful, args.HttpStatusCode);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_navigation_completed(self, args):\n    api.Print(f\"Navigation to {args.Url} completed | Successful: {args.IsSuccessful} | HTTP status: {args.HttpStatusCode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted)."}]}
{"id":"P:cAlgo.API.WebViewNavigationCompletedEventArgs.HttpStatusCode","kind":"property","name":"HttpStatusCode","type":"T:cAlgo.API.WebViewNavigationCompletedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public int HttpStatusCode {get;}","python":"webViewNavigationCompletedEventArgs.HttpStatusCode: int","summary":"Response HTTP status code.","remarks":null,"parameters":[],"returns":{"csharpType":"int","pythonType":"int","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.NavigationCompleted += OnNavigationCompleted;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n{\n    if (args.HttpStatusCode == 404)\n        Print(\"Page not found: {0}\", args.Url);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_navigation_completed(self, args):\n    if args.HttpStatusCode == 404:\n        api.Print(f\"Page not found: {args.Url}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/HttpStatusCode/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/HttpStatusCode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted)."}]}
{"id":"P:cAlgo.API.WebViewNavigationCompletedEventArgs.IsSuccessful","kind":"property","name":"IsSuccessful","type":"T:cAlgo.API.WebViewNavigationCompletedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool IsSuccessful {get;}","python":"webViewNavigationCompletedEventArgs.IsSuccessful: bool","summary":"True if navigation was successful otherwise false.","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.NavigationCompleted += OnNavigationCompleted;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n{\n    if (!args.IsSuccessful)\n        args.WebView.NavigateToStringAsync(\"<h1>Page could not be loaded</h1>\");\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_navigation_completed(self, args):\n    if not args.IsSuccessful:\n        args.WebView.NavigateToStringAsync(\"<h1>Page could not be loaded</h1>\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/IsSuccessful/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/IsSuccessful/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted)."}]}
{"id":"P:cAlgo.API.WebViewNavigationCompletedEventArgs.Url","kind":"property","name":"Url","type":"T:cAlgo.API.WebViewNavigationCompletedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string Url {get;}","python":"webViewNavigationCompletedEventArgs.Url: str","summary":"URL from WebView Source property at the moment of NavigationCompleted in big process.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.NavigationCompleted += OnNavigationCompleted;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n{\n    Print(\"Current page: {0}\", args.Url);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_navigation_completed(self, args):\n    api.Print(f\"Current page: {args.Url}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/Url/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/Url/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted)."}]}
{"id":"P:cAlgo.API.WebViewNavigationCompletedEventArgs.WebView","kind":"property","name":"WebView","type":"T:cAlgo.API.WebViewNavigationCompletedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public WebView WebView {get;}","python":"webViewNavigationCompletedEventArgs.WebView: WebView","summary":"The WebView control.","remarks":null,"parameters":[],"returns":{"csharpType":"WebView","pythonType":"WebView","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.NavigationCompleted += OnNavigationCompleted;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)\n{\n    args.WebView.ExecuteScriptAsync(\"document.body.style.zoom = '80%'\");\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.NavigationCompleted += self.on_navigation_completed\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_navigation_completed(self, args):\n    args.WebView.ExecuteScriptAsync(\"document.body.style.zoom = '80%'\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/WebView/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewNavigationCompletedEventArgs/WebView/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted)."}]}
{"id":"T:cAlgo.API.WebViewUnloadedEventArgs","kind":"class","name":"WebViewUnloadedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WebViewUnloadedEventArgs","python":"WebViewUnloadedEventArgs","summary":"Provides data for the WebView control Unloaded event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.Unloaded += OnWebViewUnloaded;\n    Chart.AddControl(webView);\n}\n\nprivate void OnWebViewUnloaded(WebViewUnloadedEventArgs args)\n{\n    Print(\"Web view unloaded, is loaded: {0}\", args.WebView.IsLoaded);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.Unloaded += self.on_web_view_unloaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_unloaded(self, args):\n    api.Print(f\"Web view unloaded, is loaded: {args.WebView.IsLoaded}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewUnloadedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewUnloadedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.Unloaded)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.Unloaded)."}]}
{"id":"P:cAlgo.API.WebViewUnloadedEventArgs.WebView","kind":"property","name":"WebView","type":"T:cAlgo.API.WebViewUnloadedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public WebView WebView {get;}","python":"webViewUnloadedEventArgs.WebView: WebView","summary":"The WebView control.","remarks":null,"parameters":[],"returns":{"csharpType":"WebView","pythonType":"WebView","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.Unloaded += OnWebViewUnloaded;\n    Chart.AddControl(webView);\n}\n\nprivate void OnWebViewUnloaded(WebViewUnloadedEventArgs args)\n{\n    args.WebView.StopAsync();\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.Unloaded += self.on_web_view_unloaded\n    api.Chart.AddControl(webView)\n\ndef on_web_view_unloaded(self, args):\n    args.WebView.StopAsync()"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewUnloadedEventArgs/WebView/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewUnloadedEventArgs/WebView/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.Unloaded)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.Unloaded)."}]}
{"id":"T:cAlgo.API.WebViewWebMessageReceivedEventArgs","kind":"class","name":"WebViewWebMessageReceivedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WebViewWebMessageReceivedEventArgs","python":"WebViewWebMessageReceivedEventArgs","summary":"Provides data for the WebView control WebMessageReceived event.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.WebMessageReceived += OnWebMessageReceived;\n    Chart.AddControl(webView);\n    webView.NavigateToStringAsync(\"<button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button>\");\n}\n\nprivate void OnWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n{\n    Print(\"Message {0} received from {1}\", args.Message, args.Source);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.WebMessageReceived += self.on_web_message_received\n    api.Chart.AddControl(webView)\n    webView.NavigateToStringAsync(\"<button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button>\")\n\ndef on_web_message_received(self, args):\n    api.Print(f\"Message {args.Message} received from {args.Source}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.WebMessageReceived)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.WebMessageReceived)."}]}
{"id":"P:cAlgo.API.WebViewWebMessageReceivedEventArgs.Message","kind":"property","name":"Message","type":"T:cAlgo.API.WebViewWebMessageReceivedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string Message {get;}","python":"webViewWebMessageReceivedEventArgs.Message: str","summary":"The message that was received.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.WebMessageReceived += OnWebMessageReceived;\n    Chart.AddControl(webView);\n    webView.NavigateToStringAsync(\"<button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button>\");\n}\n\nprivate void OnWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n{\n    if (args.Message.Contains(\"buy\"))\n        ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, \"webView\");\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.WebMessageReceived += self.on_web_message_received\n    api.Chart.AddControl(webView)\n    webView.NavigateToStringAsync(\"<button onclick=\\\"window.chrome.webview.postMessage('buy')\\\">Buy</button>\")\n\ndef on_web_message_received(self, args):\n    if \"buy\" in args.Message:\n        api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, \"webView\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/Message/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/Message/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.WebMessageReceived)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.WebMessageReceived)."}]}
{"id":"P:cAlgo.API.WebViewWebMessageReceivedEventArgs.Source","kind":"property","name":"Source","type":"T:cAlgo.API.WebViewWebMessageReceivedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public string Source {get;}","python":"webViewWebMessageReceivedEventArgs.Source: str","summary":"Gets the URI of the document that sent this web message.","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.WebMessageReceived += OnWebMessageReceived;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n{\n    if (!args.Source.StartsWith(\"https://ctrader.com\"))\n        Print(\"Ignoring message from untrusted source {0}\", args.Source);\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.WebMessageReceived += self.on_web_message_received\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_web_message_received(self, args):\n    if not args.Source.startswith(\"https://ctrader.com\"):\n        api.Print(f\"Ignoring message from untrusted source {args.Source}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/Source/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/Source/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.WebMessageReceived)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.WebMessageReceived)."}]}
{"id":"P:cAlgo.API.WebViewWebMessageReceivedEventArgs.WebView","kind":"property","name":"WebView","type":"T:cAlgo.API.WebViewWebMessageReceivedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public WebView WebView {get;}","python":"webViewWebMessageReceivedEventArgs.WebView: WebView","summary":"WebView Control.","remarks":null,"parameters":[],"returns":{"csharpType":"WebView","pythonType":"WebView","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var webView = new WebView();\n    webView.WebMessageReceived += OnWebMessageReceived;\n    Chart.AddControl(webView);\n    webView.NavigateAsync(\"https://ctrader.com/\");\n}\n\nprivate void OnWebMessageReceived(WebViewWebMessageReceivedEventArgs args)\n{\n    args.WebView.ExecuteScriptAsync(\"console.log('message received')\");\n}","python":"def on_start(self):\n    webView = WebView()\n    webView.WebMessageReceived += self.on_web_message_received\n    api.Chart.AddControl(webView)\n    webView.NavigateAsync(\"https://ctrader.com/\")\n\ndef on_web_message_received(self, args):\n    args.WebView.ExecuteScriptAsync(\"console.log('message received')\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/WebView/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WebViewWebMessageReceivedEventArgs/WebView/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (WebView.WebMessageReceived)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (WebView.WebMessageReceived)."}]}
{"id":"T:cAlgo.API.Indicators.WeightedClose","kind":"interface","name":"WeightedClose","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface WeightedClose","python":"WeightedClose","summary":"Weighted Close is an average of high, low and close prices where close has greater weight.","remarks":"Like a Typical price indicator weighted Close gives a simplified view of all prices for a period as a single series.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"//...\nprivate WeightedClose _weightedClose;\n//...\nprotected override void Initialize()\n{\n    _weightedClose = Indicators.WeightedClose();\n    //...\n}\npublic override void Calculate(int index)\n{\n    double weightedCloseValue = _weightedClose.Result[index];\n    //...\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.weightedClose = api.Indicators.WeightedClose()\n\n    def calculate(self, index):\n        weightedCloseValue = self.weightedClose.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Weighted Close indicator\n    public partial class WeightedCloseSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private WeightedClose _weightedClose;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _weightedClose = Indicators.WeightedClose();\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(_weightedClose.Result, 14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_weightedClose.Result.HasCrossedAbove(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_weightedClose.Result.HasCrossedBelow(_simpleMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass WeightedCloseSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.weightedClose = api.Indicators.WeightedClose()\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(self.weightedClose.Result, 14)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.weightedClose.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.weightedClose.Result, self.simpleMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedClose/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedClose/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.WeightedClose.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.WeightedClose","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"weightedClose.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Weighted Close indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var weightedClose = Indicators.WeightedClose();\nPrint(\"Weighted Close of the last closed bar: {0}\", weightedClose.Result.Last(1));","python":"weightedClose = api.Indicators.WeightedClose()\napi.Print(f\"Weighted Close of the last closed bar: {weightedClose.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedClose/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedClose/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.WeightedMovingAverage","kind":"interface","name":"WeightedMovingAverage","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface WeightedMovingAverage","python":"WeightedMovingAverage","summary":"The Weighted Moving Average is a moving average that gives more weith to the latest values.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WeightedMovingAverage _weightedMovingAverage;\n\nprotected override void OnStart()\n{\n    _weightedMovingAverage = Indicators.WeightedMovingAverage(Bars.ClosePrices, 14);\n}\n\nprotected override void OnTick()\n{\n    if (Symbol.Bid > _weightedMovingAverage.Result.LastValue)\n        Print(\"Bid {0} is above the Weighted Moving Average {1}\", Symbol.Bid, _weightedMovingAverage.Result.LastValue);\n}","python":"def on_start(self):\n    self.weightedMovingAverage = api.Indicators.WeightedMovingAverage(api.Bars.ClosePrices, 14)\n\ndef on_tick(self):\n    if api.Symbol.Bid > self.weightedMovingAverage.Result.LastValue:\n        api.Print(f\"Bid {api.Symbol.Bid} is above the Weighted Moving Average {self.weightedMovingAverage.Result.LastValue}\")"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Weighted Moving Average indicator\n    public partial class WeightedMovingAverageSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private WeightedMovingAverage _fastWeightedMovingAverage;\n\n        private WeightedMovingAverage _slowWeightedMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastWeightedMovingAverage = Indicators.WeightedMovingAverage(FastMaSource, FastMaPeriod);\n            _slowWeightedMovingAverage = Indicators.WeightedMovingAverage(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastWeightedMovingAverage.Result.HasCrossedAbove(_slowWeightedMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastWeightedMovingAverage.Result.HasCrossedBelow(_slowWeightedMovingAverage.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass WeightedMovingAverageSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastWeightedMovingAverage = api.Indicators.WeightedMovingAverage(api.FastMaSource, api.FastMaPeriod)\n        self.slowWeightedMovingAverage = api.Indicators.WeightedMovingAverage(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastWeightedMovingAverage.Result, self.slowWeightedMovingAverage.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastWeightedMovingAverage.Result, self.slowWeightedMovingAverage.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedMovingAverage/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedMovingAverage/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.WeightedMovingAverage.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.WeightedMovingAverage","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"weightedMovingAverage.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Weighted Moving Average indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var weightedMovingAverage = Indicators.WeightedMovingAverage(Bars.ClosePrices, 14);\nPrint(\"Weighted Moving Average of the last closed bar: {0}\", weightedMovingAverage.Result.Last(1));","python":"weightedMovingAverage = api.Indicators.WeightedMovingAverage(api.Bars.ClosePrices, 14)\napi.Print(f\"Weighted Moving Average of the last closed bar: {weightedMovingAverage.Result.Last(1)}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedMovingAverage/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WeightedMovingAverage/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.WellesWilderSmoothing","kind":"interface","name":"WellesWilderSmoothing","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface WellesWilderSmoothing","python":"WellesWilderSmoothing","summary":"The Welles Wilder's Smoothing indicator is an exponential moving average, but it has different alpha ration. As a result it responds to price changes slower.","remarks":"Usage is the same as EMA usage. Please mind the different in alpha ration.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WellesWilderSmoothing _wellesWilderSmoothing;\nprotected override void Initialize()\n{\n    _wellesWilderSmoothing = Indicators.WellesWilderSmoothing(Bars.ClosePrices, 14);\n}\npublic override void Calculate(int index)\n{\n    double result = _wellesWilderSmoothing.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.wellesWilderSmoothing = api.Indicators.WellesWilderSmoothing(api.Bars.ClosePrices, 14)\n\n    def calculate(self, index):\n        result = self.wellesWilderSmoothing.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Welles Wilder Smoothing indicator\n    public partial class WellesWilderSmoothingSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private WellesWilderSmoothing _fastWellesWilderSmoothing;\n\n        private WellesWilderSmoothing _slowWellesWilderSmoothing;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _fastWellesWilderSmoothing = Indicators.WellesWilderSmoothing(FastMaSource, FastMaPeriod);\n            _slowWellesWilderSmoothing = Indicators.WellesWilderSmoothing(SlowMaSource, SlowMaPeriod);\n        }\n\n        protected override void OnBar()\n        {\n            if (_fastWellesWilderSmoothing.Result.HasCrossedAbove(_slowWellesWilderSmoothing.Result, 0))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_fastWellesWilderSmoothing.Result.HasCrossedBelow(_slowWellesWilderSmoothing.Result, 0))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass WellesWilderSmoothingSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.fastWellesWilderSmoothing = api.Indicators.WellesWilderSmoothing(api.FastMaSource, api.FastMaPeriod)\n        self.slowWellesWilderSmoothing = api.Indicators.WellesWilderSmoothing(api.SlowMaSource, api.SlowMaPeriod)\n\n    def on_bar_closed(self):\n        if Functions.HasCrossedAbove(self.fastWellesWilderSmoothing.Result, self.slowWellesWilderSmoothing.Result, 0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif Functions.HasCrossedBelow(self.fastWellesWilderSmoothing.Result, self.slowWellesWilderSmoothing.Result, 0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"FastMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"FastMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 9,\n      \"Group\": \"Fast MA\"\n    },\n    {\n      \"Name\": \"SlowMaSource\",\n      \"DisplayName\": \"Source\",\n      \"Type\": \"DataSeries\",\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"SlowMaPeriod\",\n      \"DisplayName\": \"Period\",\n      \"Type\": \"Integer\",\n      \"DefaultValue\": 20,\n      \"Group\": \"Slow MA\"\n    },\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WellesWilderSmoothing/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WellesWilderSmoothing/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.WilliamsAccumulationDistribution","kind":"interface","name":"WilliamsAccumulationDistribution","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface WilliamsAccumulationDistribution","python":"WilliamsAccumulationDistribution","summary":"William's Accumulation Distribution is an oscillator that can identify if the market is driven by buyers (accumulation) or by sellers (distribution)","remarks":"The divergence between price and the William's Accumulation Distribution. When price is falling and WAD is rising, it is a buying opportunity","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WilliamsAccumulationDistribution _williamsAccumulationDistribution;\nprotected override void Initialize()\n{\n    _williamsAccumulationDistribution = Indicators.WilliamsAccumulationDistribution();\n}\npublic override void Calculate(int index)\n{\n    double result = _williamsAccumulationDistribution.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.williamsAccumulationDistribution = api.Indicators.WilliamsAccumulationDistribution()\n\n    def calculate(self, index):\n        result = self.williamsAccumulationDistribution.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\nusing System;\nusing System.Linq;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Williams Accumulation Distribution indicator\n    public partial class WilliamsAccumulationDistributionSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private WilliamsAccumulationDistribution _williamsAccumulationDistribution;\n\n        private SimpleMovingAverage _simpleMovingAverage;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _williamsAccumulationDistribution = Indicators.WilliamsAccumulationDistribution();\n\n            _simpleMovingAverage = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);\n        }\n\n        protected override void OnBar()\n        {\n            var correlation = GetCorrelation(14);\n\n            if (correlation > 0.85) return;\n\n            if (Bars.ClosePrices.Last(1) > _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (Bars.ClosePrices.Last(1) < _simpleMovingAverage.Result.Last(1))\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n\n        private double GetCorrelation(int period)\n        {\n            var x = _williamsAccumulationDistribution.Result.Skip(_williamsAccumulationDistribution.Result.Count - period).ToArray();\n            var y = Bars.ClosePrices.Skip(Bars.ClosePrices.Count - period).ToArray();\n\n            if (!x.Any() || !y.Any())\n            {\n                return double.NaN;\n            }\n\n            var xSum = x.Sum();\n            var ySum = y.Sum();\n\n            var xSumSquared = Math.Pow(xSum, 2);\n            var ySumSquared = Math.Pow(ySum, 2);\n\n            var xSquaredSum = x.Select(value => Math.Pow(value, 2)).Sum();\n            var ySquaredSum = y.Select(value => Math.Pow(value, 2)).Sum();\n\n            var xAndyProductSum = x.Zip(y, (value1, value2) => value1 * value2).Sum();\n\n            double n = x.Count();\n\n            return (n * xAndyProductSum - xSum * ySum) / Math.Sqrt((n * xSquaredSum - xSumSquared) * (n * ySquaredSum - ySumSquared));\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\nimport math\n\nclass WilliamsAccumulationDistributionSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.williamsAccumulationDistribution = api.Indicators.WilliamsAccumulationDistribution()\n        self.simpleMovingAverage = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 14)\n\n    def on_bar_closed(self):\n        correlation = self.get_correlation(14)\n\n        if correlation > 0.85:\n            return\n\n        if api.Bars.ClosePrices.Last(0) > self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif api.Bars.ClosePrices.Last(0) < self.simpleMovingAverage.Result.Last(0):\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)\n\n    def get_correlation(self, periods):\n        x = [self.williamsAccumulationDistribution.Result[self.williamsAccumulationDistribution.Result.Count - 1 - v] for v in reversed(range(periods))]\n        y = [api.Bars.ClosePrices[api.Bars.ClosePrices.Count - 1 - v] for v in reversed(range(periods))]\n\n        if len(x) == 0 or len(y) == 0:\n            return float(\"nan\")\n\n        xSum = sum(x)\n        ySum = sum(y)\n\n        xSumSquared = pow(xSum, 2)\n        ySumSquared = pow(ySum, 2)\n\n        xSquaredSum = sum([pow(v, 2) for v in x])\n        ySquaredSum = sum([pow(v, 2) for v in y])\n\n        xAndyProductSum = sum([x[i] * y[i] for i in range(len(x))])\n\n        n = len(x)\n\n        return (n * xAndyProductSum - xSum * ySum) / math.sqrt((n * xSquaredSum - xSumSquared) * (n * ySquaredSum - ySumSquared))","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10,\n      \"Group\": \"Trade\"\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\",\n      \"Group\": \"Trade\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsAccumulationDistribution/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsAccumulationDistribution/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.WilliamsAccumulationDistribution.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.WilliamsAccumulationDistribution","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"williamsAccumulationDistribution.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Williams Accumulation Distribution indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WilliamsAccumulationDistribution _result;\nprotected override void Initialize()\n{\n    _result = Indicators.WilliamsAccumulationDistribution();\n}\npublic override void Calculate(int index)\n{\n    double result = _result.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.williamsAccumulationDistribution = api.Indicators.WilliamsAccumulationDistribution()\n\n    def calculate(self, index):\n        result = self.williamsAccumulationDistribution.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsAccumulationDistribution/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsAccumulationDistribution/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Indicators.WilliamsPctR","kind":"interface","name":"WilliamsPctR","type":null,"namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"public interface WilliamsPctR","python":"WilliamsPctR","summary":"Williams %R is an effective momentum oscillator and was described by Larry Williams for the first time in 1973.","remarks":"It shows the relationship of the close relative to the high-low range over a set period of time.","parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WilliamsPctR _williamsPctR;\nprotected override void Initialize()\n{\n    _williamsPctR = Indicators.WilliamsPctR(14);\n}\npublic override void Calculate(int index)\n{\n    double result = _williamsPctR.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.williamsPctR = api.Indicators.WilliamsPctR(14)\n\n    def calculate(self, index):\n        result = self.williamsPctR.Result[index]"},{"csharp":"using cAlgo.API;\nusing cAlgo.API.Indicators;\n\nnamespace cAlgo.Robots\n{\n    // This sample cBot shows how to use the Williams % R indicator\n    public partial class WilliamsPctRSample : Robot\n    {\n        private double _volumeInUnits;\n\n        private WilliamsPctR _williamsPctR;\n\n        public Position[] BotPositions\n        {\n            get\n            {\n                return Positions.FindAll(Label);\n            }\n        }\n\n        protected override void OnStart()\n        {\n            _volumeInUnits = Symbol.QuantityToVolumeInUnits(VolumeInLots);\n\n            _williamsPctR = Indicators.WilliamsPctR(14);\n        }\n\n        protected override void OnBar()\n        {\n            if (_williamsPctR.Result.Last(1) > -20 && _williamsPctR.Result.Last(2) < -20)\n            {\n                ClosePositions(TradeType.Buy);\n\n                ExecuteMarketOrder(TradeType.Sell, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n            else if (_williamsPctR.Result.Last(1) < -80 && _williamsPctR.Result.Last(2) > -80)\n            {\n                ClosePositions(TradeType.Sell);\n\n                ExecuteMarketOrder(TradeType.Buy, SymbolName, _volumeInUnits, Label, StopLossInPips, TakeProfitInPips);\n            }\n        }\n\n        private void ClosePositions(TradeType tradeType)\n        {\n            foreach (var position in BotPositions)\n            {\n                if (position.TradeType != tradeType) continue;\n\n                ClosePosition(position);\n            }\n        }\n    }\n}","python":"import clr\n\nclr.AddReference(\"cAlgo.API\")\n\n# Import cAlgo API types\nfrom cAlgo.API import *\n\n# Import trading wrapper functions\nfrom robot_wrapper import *\n\nclass WilliamsPctRSample():\n    def on_start(self):\n        self.volumeInUnits = api.Symbol.QuantityToVolumeInUnits(api.VolumeInLots)\n        self.williamsPctR = api.Indicators.WilliamsPctR(14)\n\n    def on_bar_closed(self):\n        if self.williamsPctR.Result.Last(0) > -20 and self.williamsPctR.Result.Last(1) < -20:\n            self.close_positions(TradeType.Buy)\n            api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n        elif self.williamsPctR.Result.Last(0) < -80 and self.williamsPctR.Result.Last(1) > -80:\n            self.close_positions(TradeType.Sell)\n            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, self.volumeInUnits, api.Label, api.StopLossInPips, api.TakeProfitInPips)\n\n    def get_bot_positions(self):\n        return api.Positions.FindAll(api.Label)\n\n    def close_positions(self, tradeType):\n        for position in self.get_bot_positions():\n            if position.TradeType != tradeType:\n                continue\n            api.ClosePosition(position)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"Parameters\": [\n    {\n      \"Name\": \"VolumeInLots\",\n      \"DisplayName\": \"Volume (Lots)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 0.01\n    },\n    {\n      \"Name\": \"StopLossInPips\",\n      \"DisplayName\": \"Stop Loss (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"TakeProfitInPips\",\n      \"DisplayName\": \"Take Profit (Pips)\",\n      \"Type\": \"Double\",\n      \"DefaultValue\": 10\n    },\n    {\n      \"Name\": \"Label\",\n      \"Type\": \"String\",\n      \"DefaultValue\": \"Sample\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsPctR/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsPctR/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"P:cAlgo.API.Indicators.WilliamsPctR.Result","kind":"property","name":"Result","type":"T:cAlgo.API.Indicators.WilliamsPctR","namespace":"cAlgo.API.Indicators","group":"Indicators","csharp":"IndicatorDataSeries Result {get;}","python":"williamsPctR.Result: IndicatorDataSeries","summary":"Gets the resulting time series of the Williams PctR indicator calculation.","remarks":null,"parameters":[],"returns":{"csharpType":"IndicatorDataSeries","pythonType":"IndicatorDataSeries","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"private WilliamsPctR _williamsPctR;\nprotected override void Initialize()\n{\n    _williamsPctR = Indicators.WilliamsPctR(14);\n}\npublic override void Calculate(int index)\n{\n    double result = _williamsPctR.Result[index];\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        self.williamsPctR = api.Indicators.WilliamsPctR(14)\n\n    def calculate(self, index):\n        result = self.williamsPctR.Result[index]"}],"url":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsPctR/Result/","markdown":"https://help.ctrader.com/ctrader-algo/references/Indicators/WilliamsPctR/Result/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.Window","kind":"class","name":"Window","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public sealed class Window","python":"Window","summary":"The window class, you can use it to show a window that can contain other chart controls","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { Margin = 10 };\npanel.AddChild(new TextBlock { Text = \"Balance: \" + Account.Balance });\nvar closeButton = new Button { Text = \"Close\", Margin = new Thickness(0, 10, 0, 0) };\npanel.AddChild(closeButton);\nvar window = new Window\n{\n    Title = \"Account summary\",\n    Width = 250,\n    Height = 150,\n    WindowStartupLocation = WindowStartupLocation.CenterOwner,\n    Child = panel\n};\ncloseButton.Click += args => window.Close();\nwindow.Closed += args => Print(\"Window closed\");\nwindow.Show();","python":"panel = StackPanel()\nbalance = TextBlock()\nbalance.Text = f\"Balance: {api.Account.Balance}\"\npanel.AddChild(balance)\ncloseButton = Button()\ncloseButton.Text = \"Close\"\npanel.AddChild(closeButton)\nwindow = Window()\nwindow.Title = \"Account summary\"\nwindow.Width = 250\nwindow.Height = 150\nwindow.WindowStartupLocation = WindowStartupLocation.CenterOwner\nwindow.Child = panel\ncloseButton.Click += lambda args: window.Close()\nwindow.Closed += lambda args: api.Print(\"Window closed\")\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"M:cAlgo.API.Window.#ctor","kind":"constructor","name":"Window","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public Window()","python":"Window()","summary":"Creates an empty window with default settings","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Trade panel\", Width = 300, Height = 200 };\nwindow.Child = new TextBlock { Text = SymbolName + \" \" + Symbol.Bid };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Trade panel\"\nwindow.Width = 300\nwindow.Height = 200\ntextBlock = TextBlock()\ntextBlock.Text = f\"{api.SymbolName} {api.Symbol.Bid}\"\nwindow.Child = textBlock\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"M:cAlgo.API.Window.Close","kind":"method","name":"Close","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public void Close()","python":"window.Close() -> None","summary":"Closes the window","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Confirm\", Width = 250, Height = 120 };\nvar okButton = new Button { Text = \"OK\" };\nokButton.Click += args => window.Close();\nwindow.Child = okButton;\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Confirm\"\nwindow.Width = 250\nwindow.Height = 120\nokButton = Button()\nokButton.Text = \"OK\"\nokButton.Click += lambda args: window.Close()\nwindow.Child = okButton\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Close/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Close/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"M:cAlgo.API.Window.Hide","kind":"method","name":"Hide","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public void Hide()","python":"window.Hide() -> None","summary":"Hides the window","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Temporary\", Width = 250, Height = 120 };\nvar hideButton = new Button { Text = \"Hide\" };\nhideButton.Click += args => window.Hide();\nwindow.Child = hideButton;\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Temporary\"\nwindow.Width = 250\nwindow.Height = 120\nhideButton = Button()\nhideButton.Text = \"Hide\"\nhideButton.Click += lambda args: window.Hide()\nwindow.Child = hideButton\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Hide/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Hide/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"M:cAlgo.API.Window.Show","kind":"method","name":"Show","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public void Show()","python":"window.Show() -> None","summary":"Shows the window","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Trade summary\", Width = 300, Height = 150 };\nwindow.Child = new TextBlock { Text = \"Open positions: \" + Positions.Count, Margin = 10 };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Trade summary\"\nwindow.Width = 300\nwindow.Height = 150\ntextBlock = TextBlock()\ntextBlock.Text = f\"Open positions: {api.Positions.Count}\"\nwindow.Child = textBlock\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Show/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Show/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.BackgroundColor","kind":"property","name":"BackgroundColor","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public Color BackgroundColor {get; set;}","python":"window.BackgroundColor: Color","summary":"Get / Set the window background color","remarks":null,"parameters":[],"returns":{"csharpType":"Color","pythonType":"Color","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Dark window\", Width = 300, Height = 200, BackgroundColor = Color.FromHex(\"#1E1E1E\") };\nwindow.Child = new TextBlock { Text = \"Spread: \" + Symbol.Spread / Symbol.PipSize, ForegroundColor = Color.White };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Dark window\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.BackgroundColor = Color.FromHex(\"#1E1E1E\")\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/BackgroundColor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/BackgroundColor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Child","kind":"property","name":"Child","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public ControlBase Child {get; set;}","python":"window.Child: ControlBase","summary":"Get / Set the main content control of window","remarks":null,"parameters":[],"returns":{"csharpType":"ControlBase","pythonType":"ControlBase","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var panel = new StackPanel { Margin = 10 };\npanel.AddChild(new Button { Text = \"Buy\" });\npanel.AddChild(new Button { Text = \"Sell\" });\nvar window = new Window { Title = \"Orders\", Child = panel };\nwindow.Show();","python":"panel = StackPanel()\nfor text in [\"Buy\", \"Sell\"]:\n    button = Button()\n    button.Text = text\n    panel.AddChild(button)\nwindow = Window()\nwindow.Title = \"Orders\"\nwindow.Child = panel\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Child/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Child/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Height","kind":"property","name":"Height","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double Height {get; set;}","python":"window.Height: float","summary":"Get / Set height of the Window","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Tall window\", Width = 250, Height = 500 };\nwindow.Show();\nPrint(\"Height: {0}\", window.Height);","python":"window = Window()\nwindow.Title = \"Tall window\"\nwindow.Width = 250\nwindow.Height = 500\nwindow.Show()\napi.Print(f\"Height: {window.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Height/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Height/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.IsActive","kind":"property","name":"IsActive","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public bool IsActive {get;}","python":"window.IsActive: bool","summary":"Get / Set the window active / de-active flag, if Yes then the window will be active","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Status\", Width = 250, Height = 120 };\nwindow.Activated += args => Print(\"Active: {0}\", args.Window.IsActive);\nwindow.Show();\nPrint(\"Is active: {0}\", window.IsActive);","python":"window = Window()\nwindow.Title = \"Status\"\nwindow.Width = 250\nwindow.Height = 120\nwindow.Activated += lambda args: api.Print(f\"Active: {args.Window.IsActive}\")\nwindow.Show()\napi.Print(f\"Is active: {window.IsActive}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsActive/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsActive/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.IsVisible","kind":"property","name":"IsVisible","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public bool IsVisible {get;}","python":"window.IsVisible: bool","summary":"Get / Set the window visibility flag, if Yes then the window will be shown otherwise it will be hidden","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Toggle me\", Width = 250, Height = 120 };\nwindow.Show();\nvar toggleButton = new Button { Text = \"Show / hide window\" };\ntoggleButton.Click += args =>\n{\n    if (window.IsVisible)\n        window.Hide();\n    else\n        window.Show();\n};\nChart.AddControl(toggleButton);","python":"window = Window()\nwindow.Title = \"Toggle me\"\nwindow.Width = 250\nwindow.Height = 120\nwindow.Show()\ntoggleButton = Button()\ntoggleButton.Text = \"Show / hide window\"\ntoggleButton.Click += lambda args: window.Hide() if window.IsVisible else window.Show()\napi.Chart.AddControl(toggleButton)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisible/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisible/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Left","kind":"property","name":"Left","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double Left {get; set;}","python":"window.Left: float","summary":"Get / Set window left margin (X)","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Positioned window\", Width = 250, Height = 150, Left = 100, Top = 100 };\nwindow.Show();\nPrint(\"Left: {0}\", window.Left);","python":"window = Window()\nwindow.Title = \"Positioned window\"\nwindow.Width = 250\nwindow.Height = 150\nwindow.Left = 100\nwindow.Top = 100\nwindow.Show()\napi.Print(f\"Left: {window.Left}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Left/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Left/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.MaxHeight","kind":"property","name":"MaxHeight","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double MaxHeight {get; set;}","python":"window.MaxHeight: float","summary":"Get / Set the window maximum height","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Resizable\", Width = 300, Height = 250, MaxHeight = 600 };\nwindow.Show();\nPrint(\"Maximum height: {0}\", window.MaxHeight);","python":"window = Window()\nwindow.Title = \"Resizable\"\nwindow.Width = 300\nwindow.Height = 250\nwindow.MaxHeight = 600\nwindow.Show()\napi.Print(f\"Maximum height: {window.MaxHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MaxHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MaxHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.MaxWidth","kind":"property","name":"MaxWidth","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double MaxWidth {get; set;}","python":"window.MaxWidth: float","summary":"Get / Set the window maximum width","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Resizable\", Width = 300, Height = 250, MaxWidth = 800 };\nwindow.Show();\nPrint(\"Maximum width: {0}\", window.MaxWidth);","python":"window = Window()\nwindow.Title = \"Resizable\"\nwindow.Width = 300\nwindow.Height = 250\nwindow.MaxWidth = 800\nwindow.Show()\napi.Print(f\"Maximum width: {window.MaxWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MaxWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MaxWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.MinHeight","kind":"property","name":"MinHeight","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double MinHeight {get; set;}","python":"window.MinHeight: float","summary":"Get / Set the window minimum height","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Resizable\", Width = 300, Height = 250, MinHeight = 150 };\nwindow.Show();\nPrint(\"Minimum height: {0}\", window.MinHeight);","python":"window = Window()\nwindow.Title = \"Resizable\"\nwindow.Width = 300\nwindow.Height = 250\nwindow.MinHeight = 150\nwindow.Show()\napi.Print(f\"Minimum height: {window.MinHeight}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MinHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MinHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.MinWidth","kind":"property","name":"MinWidth","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double MinWidth {get; set;}","python":"window.MinWidth: float","summary":"Get / Set the window minimum width","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Resizable\", Width = 300, Height = 250, MinWidth = 200 };\nwindow.Show();\nPrint(\"Minimum width: {0}\", window.MinWidth);","python":"window = Window()\nwindow.Title = \"Resizable\"\nwindow.Width = 300\nwindow.Height = 250\nwindow.MinWidth = 200\nwindow.Show()\napi.Print(f\"Minimum width: {window.MinWidth}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MinWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/MinWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.OwnerType","kind":"property","name":"OwnerType","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public OwnerType OwnerType {get; set;}","python":"window.OwnerType: OwnerType","summary":"Get / Set the window owner","remarks":null,"parameters":[],"returns":{"csharpType":"OwnerType","pythonType":"OwnerType","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Independent window\", Width = 300, Height = 200, OwnerType = OwnerType.None };\nwindow.Show();\nPrint(\"Owner type: {0}\", window.OwnerType);","python":"window = Window()\nwindow.Title = \"Independent window\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.OwnerType = getattr(OwnerType, \"None\")\nwindow.Show()\napi.Print(f\"Owner type: {window.OwnerType}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/OwnerType/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/OwnerType/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Padding","kind":"property","name":"Padding","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public Thickness Padding {get; set;}","python":"window.Padding: Thickness","summary":"Get / Set the window padding","remarks":null,"parameters":[],"returns":{"csharpType":"Thickness","pythonType":"Thickness","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Padded\", Width = 300, Height = 200, Padding = new Thickness(15) };\nwindow.Child = new TextBlock { Text = \"Content with 15 px padding\" };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Padded\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.Padding = Thickness(15)\ntextBlock = TextBlock()\ntextBlock.Text = \"Content with 15 px padding\"\nwindow.Child = textBlock\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Padding/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Padding/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.ResizeMode","kind":"property","name":"ResizeMode","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public ResizeMode ResizeMode {get; set;}","python":"window.ResizeMode: ResizeMode","summary":"Get / Set the window resize mode","remarks":null,"parameters":[],"returns":{"csharpType":"ResizeMode","pythonType":"ResizeMode","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Grip resize\", Width = 300, Height = 200, ResizeMode = ResizeMode.CanResizeWithGrip };\nwindow.Show();\nPrint(\"Resize mode: {0}\", window.ResizeMode);","python":"window = Window()\nwindow.Title = \"Grip resize\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.ResizeMode = ResizeMode.CanResizeWithGrip\nwindow.Show()\napi.Print(f\"Resize mode: {window.ResizeMode}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/ResizeMode/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/ResizeMode/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Title","kind":"property","name":"Title","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public string Title {get; set;}","python":"window.Title: str","summary":"Get / Set the window title","remarks":null,"parameters":[],"returns":{"csharpType":"string","pythonType":"str","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = SymbolName + \" order panel\", Width = 300, Height = 200 };\nwindow.Show();\nPrint(\"Window title: {0}\", window.Title);","python":"window = Window()\nwindow.Title = f\"{api.SymbolName} order panel\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.Show()\napi.Print(f\"Window title: {window.Title}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Title/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Title/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Top","kind":"property","name":"Top","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double Top {get; set;}","python":"window.Top: float","summary":"Get / Set window top margin (Y)","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Alerts\", Width = 250, Height = 150, Left = 50, Top = 300 };\nwindow.Show();\nPrint(\"Top: {0}\", window.Top);","python":"window = Window()\nwindow.Title = \"Alerts\"\nwindow.Width = 250\nwindow.Height = 150\nwindow.Left = 50\nwindow.Top = 300\nwindow.Show()\napi.Print(f\"Top: {window.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Top/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Top/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Topmost","kind":"property","name":"Topmost","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public bool Topmost {get; set;}","python":"window.Topmost: bool","summary":"Get / Set the window topmost flag, if True then the window will appear on top of all other windows","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Always on top\", Width = 250, Height = 120, Topmost = true };\nwindow.Child = new TextBlock { Text = SymbolName + \" \" + Symbol.Bid };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Always on top\"\nwindow.Width = 250\nwindow.Height = 120\nwindow.Topmost = True\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Topmost/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Topmost/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.Width","kind":"property","name":"Width","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public double Width {get; set;}","python":"window.Width: float","summary":"Get / Set width of the window","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Wide window\", Width = 600, Height = 200 };\nwindow.Show();\nPrint(\"Width: {0}\", window.Width);","python":"window = Window()\nwindow.Title = \"Wide window\"\nwindow.Width = 600\nwindow.Height = 200\nwindow.Show()\napi.Print(f\"Width: {window.Width}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Width/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Width/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.WindowStartupLocation","kind":"property","name":"WindowStartupLocation","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public WindowStartupLocation WindowStartupLocation {get; set;}","python":"window.WindowStartupLocation: WindowStartupLocation","summary":"Get / Set the window startup location","remarks":null,"parameters":[],"returns":{"csharpType":"WindowStartupLocation","pythonType":"WindowStartupLocation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Centered on chart\", Width = 300, Height = 200, WindowStartupLocation = WindowStartupLocation.CenterOwner };\nwindow.Show();","python":"window = Window()\nwindow.Title = \"Centered on chart\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.WindowStartupLocation = WindowStartupLocation.CenterOwner\nwindow.Show()"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"P:cAlgo.API.Window.WindowState","kind":"property","name":"WindowState","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public WindowState WindowState {get; set;}","python":"window.WindowState: WindowState","summary":"Get / Set the window state","remarks":null,"parameters":[],"returns":{"csharpType":"WindowState","pythonType":"WindowState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Log\", Width = 400, Height = 300 };\nwindow.Show();\nwindow.WindowState = WindowState.Minimized;\nPrint(\"Window state: {0}\", window.WindowState);","python":"window = Window()\nwindow.Title = \"Log\"\nwindow.Width = 400\nwindow.Height = 300\nwindow.Show()\nwindow.WindowState = WindowState.Minimized\napi.Print(f\"Window state: {window.WindowState}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/WindowState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/WindowState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.Activated","kind":"event","name":"Activated","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowActivatedEventArgs> Activated;","python":"window.Activated += handler  # handler(obj: WindowActivatedEventArgs)","summary":"This event gets triggered when window is activated","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowActivatedEventArgs>","pythonType":"Callable[[WindowActivatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Order entry\", Width = 300, Height = 200 };\nwindow.Activated += args => Print(\"Window '{0}' activated\", args.Window.Title);\nwindow.Show();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Order entry\"\n    window.Activated += self.on_window_activated\n    window.Show()\n\ndef on_window_activated(self, args):\n    api.Print(f\"Window '{args.Window.Title}' activated\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Activated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Activated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.Closed","kind":"event","name":"Closed","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowClosedEventArgs> Closed;","python":"window.Closed += handler  # handler(obj: WindowClosedEventArgs)","summary":"This event gets triggered when window is closed","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowClosedEventArgs>","pythonType":"Callable[[WindowClosedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Settings\", Width = 300, Height = 200 };\nwindow.Closed += args => Print(\"Window '{0}' closed\", args.Window.Title);\nwindow.Show();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Settings\"\n    window.Closed += self.on_window_closed\n    window.Show()\n\ndef on_window_closed(self, args):\n    api.Print(f\"Window '{args.Window.Title}' closed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Closed/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Closed/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.Deactivated","kind":"event","name":"Deactivated","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowDeactivatedEventArgs> Deactivated;","python":"window.Deactivated += handler  # handler(obj: WindowDeactivatedEventArgs)","summary":"This event gets triggered when window is deactivated","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowDeactivatedEventArgs>","pythonType":"Callable[[WindowDeactivatedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Order entry\", Width = 300, Height = 200 };\nwindow.Deactivated += args => Print(\"Window '{0}' deactivated\", args.Window.Title);\nwindow.Show();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Order entry\"\n    window.Deactivated += self.on_window_deactivated\n    window.Show()\n\ndef on_window_deactivated(self, args):\n    api.Print(f\"Window '{args.Window.Title}' deactivated\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Deactivated/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/Deactivated/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.IsVisibleChanged","kind":"event","name":"IsVisibleChanged","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowIsVisibleChangedEventArgs> IsVisibleChanged;","python":"window.IsVisibleChanged += handler  # handler(obj: WindowIsVisibleChangedEventArgs)","summary":"This event gets triggered when window visibility changes","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowIsVisibleChangedEventArgs>","pythonType":"Callable[[WindowIsVisibleChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Watch list\", Width = 300, Height = 200 };\nwindow.IsVisibleChanged += args => Print(\"Visibility changed from {0} to {1}\", args.OldValue, args.NewValue);\nwindow.Show();\nwindow.Hide();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Watch list\"\n    window.IsVisibleChanged += self.on_is_visible_changed\n    window.Show()\n\ndef on_is_visible_changed(self, args):\n    api.Print(f\"Visibility changed from {args.OldValue} to {args.NewValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisibleChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisibleChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.LocationChanged","kind":"event","name":"LocationChanged","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowLocationChangedEventArgs> LocationChanged;","python":"window.LocationChanged += handler  # handler(obj: WindowLocationChangedEventArgs)","summary":"This event gets triggered when window location changes","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowLocationChangedEventArgs>","pythonType":"Callable[[WindowLocationChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Movable\", Width = 300, Height = 200 };\nwindow.LocationChanged += args => Print(\"Window moved to {0}, {1}\", args.Window.Left, args.Window.Top);\nwindow.Show();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Movable\"\n    window.LocationChanged += self.on_location_changed\n    window.Show()\n\ndef on_location_changed(self, args):\n    api.Print(f\"Window moved to {args.Window.Left}, {args.Window.Top}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/LocationChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/LocationChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"E:cAlgo.API.Window.SizeChanged","kind":"event","name":"SizeChanged","type":"T:cAlgo.API.Window","namespace":"cAlgo.API","group":"Windows","csharp":"public event Action<WindowSizeChangedEventArgs> SizeChanged;","python":"window.SizeChanged += handler  # handler(obj: WindowSizeChangedEventArgs)","summary":"This event gets triggered when window is size changes","remarks":null,"parameters":[],"returns":{"csharpType":"Action<WindowSizeChangedEventArgs>","pythonType":"Callable[[WindowSizeChangedEventArgs], None]","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Resizable\", Width = 300, Height = 200 };\nwindow.SizeChanged += args => Print(\"Window size: {0}x{1}\", args.Window.Width, args.Window.Height);\nwindow.Show();","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Resizable\"\n    window.SizeChanged += self.on_size_changed\n    window.Show()\n\ndef on_size_changed(self, args):\n    api.Print(f\"Window size: {args.Window.Width}x{args.Window.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/SizeChanged/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/SizeChanged/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."},{"name":"Cloud","support":"None","behaviour":"Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire."}]}
{"id":"T:cAlgo.API.WindowActivatedEventArgs","kind":"class","name":"WindowActivatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowActivatedEventArgs","python":"WindowActivatedEventArgs","summary":"Provides data for WindowActivated event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.Activated += OnWindowActivated;\n    window.Show();\n}\n\nprivate void OnWindowActivated(WindowActivatedEventArgs args)\n{\n    Print(\"Window {0} activated\", args.Window.Title);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.Activated += self.on_window_activated\n    window.Show()\n\ndef on_window_activated(self, args):\n    api.Print(f\"Window {args.Window.Title} activated\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowActivatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowActivatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Activated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Activated)."}]}
{"id":"P:cAlgo.API.WindowActivatedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowActivatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowActivatedEventArgs.Window: Window","summary":"The Window that got activated","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.Activated += OnWindowActivated;\n    window.Show();\n}\n\nprivate void OnWindowActivated(WindowActivatedEventArgs args)\n{\n    Print(\"Window is active: {0}, state: {1}\", args.Window.IsActive, args.Window.WindowState);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Activated += self.on_window_activated\n    window.Show()\n\ndef on_window_activated(self, args):\n    api.Print(f\"Window is active: {args.Window.IsActive}, state: {args.Window.WindowState}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowActivatedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowActivatedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Activated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Activated)."}]}
{"id":"T:cAlgo.API.WindowClosedEventArgs","kind":"class","name":"WindowClosedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowClosedEventArgs","python":"WindowClosedEventArgs","summary":"Provides data for WindowClosed event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.Closed += OnWindowClosed;\n    window.Show();\n}\n\nprivate void OnWindowClosed(WindowClosedEventArgs args)\n{\n    Print(\"Window {0} closed\", args.Window.Title);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.Closed += self.on_window_closed\n    window.Show()\n\ndef on_window_closed(self, args):\n    api.Print(f\"Window {args.Window.Title} closed\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowClosedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowClosedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Closed)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Closed)."}]}
{"id":"P:cAlgo.API.WindowClosedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowClosedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowClosedEventArgs.Window: Window","summary":"The window the got closed","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.Closed += OnWindowClosed;\n    window.Show();\n}\n\nprivate void OnWindowClosed(WindowClosedEventArgs args)\n{\n    Print(\"Window {0} closed at position ({1}, {2}), stopping\", args.Window.Title, args.Window.Left, args.Window.Top);\n    Stop();\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Closed += self.on_window_closed\n    window.Show()\n\ndef on_window_closed(self, args):\n    api.Print(f\"Window {args.Window.Title} closed at position ({args.Window.Left}, {args.Window.Top}), stopping\")\n    api.Stop()"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowClosedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowClosedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Closed)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Closed)."}]}
{"id":"T:cAlgo.API.WindowDeactivatedEventArgs","kind":"class","name":"WindowDeactivatedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowDeactivatedEventArgs","python":"WindowDeactivatedEventArgs","summary":"Provides data for WindowDeactivated event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.Deactivated += OnWindowDeactivated;\n    window.Show();\n}\n\nprivate void OnWindowDeactivated(WindowDeactivatedEventArgs args)\n{\n    Print(\"Window {0} deactivated\", args.Window.Title);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.Deactivated += self.on_window_deactivated\n    window.Show()\n\ndef on_window_deactivated(self, args):\n    api.Print(f\"Window {args.Window.Title} deactivated\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowDeactivatedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowDeactivatedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Deactivated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Deactivated)."}]}
{"id":"P:cAlgo.API.WindowDeactivatedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowDeactivatedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowDeactivatedEventArgs.Window: Window","summary":"The window that got deactivated","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.Deactivated += OnWindowDeactivated;\n    window.Show();\n}\n\nprivate void OnWindowDeactivated(WindowDeactivatedEventArgs args)\n{\n    args.Window.Topmost = true;\n    Print(\"Window is active: {0}, kept on top\", args.Window.IsActive);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Deactivated += self.on_window_deactivated\n    window.Show()\n\ndef on_window_deactivated(self, args):\n    args.Window.Topmost = True\n    api.Print(f\"Window is active: {args.Window.IsActive}, kept on top\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowDeactivatedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowDeactivatedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.Deactivated)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.Deactivated)."}]}
{"id":"T:cAlgo.API.WindowIsVisibleChangedEventArgs","kind":"class","name":"WindowIsVisibleChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowIsVisibleChangedEventArgs","python":"WindowIsVisibleChangedEventArgs","summary":"Provides data for WindowIsVisibleChanged event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.IsVisibleChanged += OnWindowIsVisibleChanged;\n    window.Show();\n}\n\nprivate void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)\n{\n    Print(\"Window {0} visibility changed from {1} to {2}\", args.Window.Title, args.OldValue, args.NewValue);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.IsVisibleChanged += self.on_window_is_visible_changed\n    window.Show()\n\ndef on_window_is_visible_changed(self, args):\n    api.Print(f\"Window {args.Window.Title} visibility changed from {args.OldValue} to {args.NewValue}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.IsVisibleChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.IsVisibleChanged)."}]}
{"id":"P:cAlgo.API.WindowIsVisibleChangedEventArgs.NewValue","kind":"property","name":"NewValue","type":"T:cAlgo.API.WindowIsVisibleChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool NewValue {get;}","python":"windowIsVisibleChangedEventArgs.NewValue: bool","summary":"The value of window IsVisible property after got changed","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.IsVisibleChanged += OnWindowIsVisibleChanged;\n    window.Show();\n}\n\nprivate void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)\n{\n    if (args.NewValue)\n        Print(\"Window {0} is shown\", args.Window.Title);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.IsVisibleChanged += self.on_window_is_visible_changed\n    window.Show()\n\ndef on_window_is_visible_changed(self, args):\n    if args.NewValue:\n        api.Print(f\"Window {args.Window.Title} is shown\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/NewValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/NewValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.IsVisibleChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.IsVisibleChanged)."}]}
{"id":"P:cAlgo.API.WindowIsVisibleChangedEventArgs.OldValue","kind":"property","name":"OldValue","type":"T:cAlgo.API.WindowIsVisibleChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public bool OldValue {get;}","python":"windowIsVisibleChangedEventArgs.OldValue: bool","summary":"The value of window IsVisible property before got changed","remarks":null,"parameters":[],"returns":{"csharpType":"bool","pythonType":"bool","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.IsVisibleChanged += OnWindowIsVisibleChanged;\n    window.Show();\n}\n\nprivate void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)\n{\n    if (args.OldValue)\n        Print(\"Window {0} was hidden\", args.Window.Title);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.IsVisibleChanged += self.on_window_is_visible_changed\n    window.Show()\n\ndef on_window_is_visible_changed(self, args):\n    if args.OldValue:\n        api.Print(f\"Window {args.Window.Title} was hidden\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/OldValue/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/OldValue/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.IsVisibleChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.IsVisibleChanged)."}]}
{"id":"P:cAlgo.API.WindowIsVisibleChangedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowIsVisibleChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowIsVisibleChangedEventArgs.Window: Window","summary":"The window which it is IsVisible property got changed","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.IsVisibleChanged += OnWindowIsVisibleChanged;\n    window.Show();\n}\n\nprivate void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)\n{\n    Print(\"Window {0} is visible: {1}\", args.Window.Title, args.Window.IsVisible);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.IsVisibleChanged += self.on_window_is_visible_changed\n    window.Show()\n\ndef on_window_is_visible_changed(self, args):\n    api.Print(f\"Window {args.Window.Title} is visible: {args.Window.IsVisible}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.IsVisibleChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.IsVisibleChanged)."}]}
{"id":"T:cAlgo.API.WindowLocationChangedEventArgs","kind":"class","name":"WindowLocationChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowLocationChangedEventArgs","python":"WindowLocationChangedEventArgs","summary":"Provides data for WindowLocationChanged event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.LocationChanged += OnWindowLocationChanged;\n    window.Show();\n}\n\nprivate void OnWindowLocationChanged(WindowLocationChangedEventArgs args)\n{\n    Print(\"Window {0} moved to ({1}, {2})\", args.Window.Title, args.Window.Left, args.Window.Top);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.LocationChanged += self.on_window_location_changed\n    window.Show()\n\ndef on_window_location_changed(self, args):\n    api.Print(f\"Window {args.Window.Title} moved to ({args.Window.Left}, {args.Window.Top})\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowLocationChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowLocationChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.LocationChanged)."}]}
{"id":"P:cAlgo.API.WindowLocationChangedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowLocationChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowLocationChangedEventArgs.Window: Window","summary":"The window which it is location changed","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.LocationChanged += OnWindowLocationChanged;\n    window.Show();\n}\n\nprivate void OnWindowLocationChanged(WindowLocationChangedEventArgs args)\n{\n    if (args.Window.Left < 0)\n        args.Window.Left = 0;\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.LocationChanged += self.on_window_location_changed\n    window.Show()\n\ndef on_window_location_changed(self, args):\n    if args.Window.Left < 0:\n        args.Window.Left = 0"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowLocationChangedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowLocationChangedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.LocationChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.LocationChanged)."}]}
{"id":"T:cAlgo.API.WindowSizeChangedEventArgs","kind":"class","name":"WindowSizeChangedEventArgs","type":null,"namespace":"cAlgo.API","group":"EventArgs","csharp":"public class WindowSizeChangedEventArgs","python":"WindowSizeChangedEventArgs","summary":"Provides data for WindowSizeChanged event handlers","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200, Child = new TextBlock { Text = \"Hello\" } };\n    window.SizeChanged += OnWindowSizeChanged;\n    window.Show();\n}\n\nprivate void OnWindowSizeChanged(WindowSizeChangedEventArgs args)\n{\n    Print(\"Window {0} resized to {1} x {2}\", args.Window.Title, args.Window.Width, args.Window.Height);\n}","python":"def on_start(self):\n    text_block = TextBlock()\n    text_block.Text = \"Hello\"\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.Child = text_block\n    window.SizeChanged += self.on_window_size_changed\n    window.Show()\n\ndef on_window_size_changed(self, args):\n    api.Print(f\"Window {args.Window.Title} resized to {args.Window.Width} x {args.Window.Height}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowSizeChangedEventArgs/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowSizeChangedEventArgs/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.SizeChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.SizeChanged)."}]}
{"id":"P:cAlgo.API.WindowSizeChangedEventArgs.Window","kind":"property","name":"Window","type":"T:cAlgo.API.WindowSizeChangedEventArgs","namespace":"cAlgo.API","group":"EventArgs","csharp":"public Window Window {get;}","python":"windowSizeChangedEventArgs.Window: Window","summary":"The window which it is size changed","remarks":null,"parameters":[],"returns":{"csharpType":"Window","pythonType":"Window","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"protected override void OnStart()\n{\n    var window = new Window { Title = \"Trade Panel\", Width = 300, Height = 200 };\n    window.SizeChanged += OnWindowSizeChanged;\n    window.Show();\n}\n\nprivate void OnWindowSizeChanged(WindowSizeChangedEventArgs args)\n{\n    if (args.Window.WindowState == WindowState.Maximized)\n        Print(\"Window {0} maximized\", args.Window.Title);\n}","python":"def on_start(self):\n    window = Window()\n    window.Title = \"Trade Panel\"\n    window.Width = 300\n    window.Height = 200\n    window.SizeChanged += self.on_window_size_changed\n    window.Show()\n\ndef on_window_size_changed(self, args):\n    if args.Window.WindowState == WindowState.Maximized:\n        api.Print(f\"Window {args.Window.Title} maximized\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowSizeChangedEventArgs/Window/","markdown":"https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowSizeChangedEventArgs/Window/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Never raised in the CLI: the events that pass it never fire there (Window.SizeChanged)."},{"name":"Cloud","support":"None","behaviour":"Never raised in the cloud: the events that pass it never fire there (Window.SizeChanged)."}]}
{"id":"T:cAlgo.API.WindowStartupLocation","kind":"enum","name":"WindowStartupLocation","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum WindowStartupLocation","python":"WindowStartupLocation","summary":"Types of startup locations that you can use for windows","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Centered\", Width = 300, Height = 200, WindowStartupLocation = WindowStartupLocation.CenterScreen };\nwindow.Show();\nPrint(\"Startup location: {0}\", window.WindowStartupLocation);","python":"window = Window()\nwindow.Title = \"Centered\"\nwindow.Width = 300\nwindow.Height = 200\nwindow.WindowStartupLocation = WindowStartupLocation.CenterScreen\nwindow.Show()\napi.Print(f\"Startup location: {window.WindowStartupLocation}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowStartupLocation.Manual","kind":"enum value","name":"Manual","type":"T:cAlgo.API.WindowStartupLocation","namespace":"cAlgo.API","group":"Windows","csharp":"WindowStartupLocation.Manual;","python":"WindowStartupLocation.Manual","summary":"Default window startup location value. The startup location of a Window is set from code, or defers to the default Windows location.","remarks":null,"parameters":[],"returns":{"csharpType":"WindowStartupLocation","pythonType":"WindowStartupLocation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowStartupLocation.CenterScreen","kind":"enum value","name":"CenterScreen","type":"T:cAlgo.API.WindowStartupLocation","namespace":"cAlgo.API","group":"Windows","csharp":"WindowStartupLocation.CenterScreen;","python":"WindowStartupLocation.CenterScreen","summary":"Window is placed at the center of the screen.","remarks":null,"parameters":[],"returns":{"csharpType":"WindowStartupLocation","pythonType":"WindowStartupLocation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowStartupLocation.CenterOwner","kind":"enum value","name":"CenterOwner","type":"T:cAlgo.API.WindowStartupLocation","namespace":"cAlgo.API","group":"Windows","csharp":"WindowStartupLocation.CenterOwner;","python":"WindowStartupLocation.CenterOwner","summary":"Window is placed at the center of it is owner.","remarks":null,"parameters":[],"returns":{"csharpType":"WindowStartupLocation","pythonType":"WindowStartupLocation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowStartupLocation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.WindowState","kind":"enum","name":"WindowState","type":null,"namespace":"cAlgo.API","group":"Windows","csharp":"public enum WindowState","python":"WindowState","summary":"Types of states for windows","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var window = new Window { Title = \"Report\", WindowState = WindowState.Maximized };\nwindow.Show();\nPrint(\"Window state: {0}\", window.WindowState);","python":"window = Window()\nwindow.Title = \"Report\"\nwindow.WindowState = WindowState.Maximized\nwindow.Show()\napi.Print(f\"Window state: {window.WindowState}\")"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowState.Normal","kind":"enum value","name":"Normal","type":"T:cAlgo.API.WindowState","namespace":"cAlgo.API","group":"Windows","csharp":"WindowState.Normal;","python":"WindowState.Normal","summary":"The default state of window","remarks":null,"parameters":[],"returns":{"csharpType":"WindowState","pythonType":"WindowState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowState.Minimized","kind":"enum value","name":"Minimized","type":"T:cAlgo.API.WindowState","namespace":"cAlgo.API","group":"Windows","csharp":"WindowState.Minimized;","python":"WindowState.Minimized","summary":"Window is minimized to the task bar","remarks":null,"parameters":[],"returns":{"csharpType":"WindowState","pythonType":"WindowState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"F:cAlgo.API.WindowState.Maximized","kind":"enum value","name":"Maximized","type":"T:cAlgo.API.WindowState","namespace":"cAlgo.API","group":"Windows","csharp":"WindowState.Maximized;","python":"WindowState.Maximized","summary":"Window is maximized","remarks":null,"parameters":[],"returns":{"csharpType":"WindowState","pythonType":"WindowState","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Windows/WindowState/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"Full","behaviour":null},{"name":"Cloud","support":"Full","behaviour":null}]}
{"id":"T:cAlgo.API.WrapPanel","kind":"class","name":"WrapPanel","type":null,"namespace":"cAlgo.API","group":"Layout","csharp":"public class WrapPanel : Panel","python":"WrapPanel","summary":"Positions the child elements in sequential position from left to right, breaking content to the next line at the end of the containing box, from top to bottom, or from right to left.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"using cAlgo.API;\n\nnamespace cAlgo\n{\n    // This sample shows how to use the WrapPanel\n    public partial class WrapPanelSample : Indicator\n    {\n        protected override void Initialize()\n        {\n            var wrapPanel = new WrapPanel\n            {\n                BackgroundColor = Color.Gold,\n                HorizontalAlignment = HorizontalAlignment.Center,\n                VerticalAlignment = VerticalAlignment.Center,\n                Orientation = PanelOrientation,\n                Width = 150,\n                Height = 150\n            };\n\n            for (int i = 0; i < 10; i++)\n            {\n                wrapPanel.AddChild(new TextBlock\n                {\n                    Text = \"Text\",\n                    Margin = 5,\n                    ForegroundColor = Color.Black,\n                    FontWeight = FontWeight.ExtraBold\n                });\n            }\n\n            Chart.AddControl(wrapPanel);\n        }\n\n        public override void Calculate(int index)\n        {\n        }\n    }\n}","python":"import clr\nclr.AddReference(\"cAlgo.API\")\n\nfrom cAlgo.API import *\n\nclass Test():\n    def initialize(self):\n        wrapPanel = WrapPanel()\n        wrapPanel.BackgroundColor = Color.Gold\n        wrapPanel.HorizontalAlignment = HorizontalAlignment.Center\n        wrapPanel.VerticalAlignment = VerticalAlignment.Center\n        wrapPanel.Orientation = api.PanelOrientation\n\n        for i in range(10):\n            textBlock = TextBlock()\n            textBlock.Text = \"Text\"\n            textBlock.Margin = Thickness(5)\n            textBlock.ForegroundColor = Color.Black\n            textBlock.FontWeight = FontWeight.ExtraBold\n\n            wrapPanel.AddChild(textBlock)\n\n        api.Chart.AddControl(wrapPanel)","config":"{\n  \"AccessRights\": \"None\",\n  \"TimeZone\": \"UTC\",\n  \"IsOverlay\": true,\n  \"Parameters\": [\n    {\n      \"Name\": \"PanelOrientation\",\n      \"DisplayName\": \"Panel Orientation\",\n      \"Type\": \"Enum\",\n      \"EnumTypeFullName\": \"cAlgo.API.Orientation\",\n      \"DefaultValue\": \"Vertical\"\n    }\n  ]\n}"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"M:cAlgo.API.WrapPanel.#ctor","kind":"constructor","name":"WrapPanel","type":"T:cAlgo.API.WrapPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public WrapPanel()","python":"WrapPanel()","summary":"Initializes a new instance of the WrapPanel class.","remarks":null,"parameters":[],"returns":null,"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wrapPanel = new WrapPanel { Width = 200 };\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\", \"AUDUSD\", \"USDCHF\" })\n    wrapPanel.AddChild(new Button { Text = symbolName, Margin = 2 });\nChart.AddControl(wrapPanel);","python":"wrapPanel = WrapPanel()\nwrapPanel.Width = 200\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\", \"AUDUSD\", \"USDCHF\"]:\n    button = Button()\n    button.Text = symbolName\n    button.Margin = Thickness(2)\n    wrapPanel.AddChild(button)\napi.Chart.AddControl(wrapPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/Constructor/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/Constructor/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.WrapPanel.ItemHeight","kind":"property","name":"ItemHeight","type":"T:cAlgo.API.WrapPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public double ItemHeight {get; set;}","python":"wrapPanel.ItemHeight: float","summary":"Gets or sets the height of the item.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wrapPanel = new WrapPanel { Width = 240, ItemHeight = 30 };\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\", \"XAUUSD\" })\n    wrapPanel.AddChild(new Button { Text = symbolName });\nChart.AddControl(wrapPanel);","python":"wrapPanel = WrapPanel()\nwrapPanel.Width = 240\nwrapPanel.ItemHeight = 30\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\", \"XAUUSD\"]:\n    button = Button()\n    button.Text = symbolName\n    wrapPanel.AddChild(button)\napi.Chart.AddControl(wrapPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/ItemHeight/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/ItemHeight/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.WrapPanel.ItemWidth","kind":"property","name":"ItemWidth","type":"T:cAlgo.API.WrapPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public double ItemWidth {get; set;}","python":"wrapPanel.ItemWidth: float","summary":"Gets or sets the width of the item.","remarks":null,"parameters":[],"returns":{"csharpType":"double","pythonType":"float","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wrapPanel = new WrapPanel { Width = 240, ItemWidth = 80 };\nforeach (var symbolName in new[] { \"EURUSD\", \"GBPUSD\", \"USDJPY\", \"XAUUSD\" })\n    wrapPanel.AddChild(new Button { Text = symbolName });\nChart.AddControl(wrapPanel);","python":"wrapPanel = WrapPanel()\nwrapPanel.Width = 240\nwrapPanel.ItemWidth = 80\nfor symbolName in [\"EURUSD\", \"GBPUSD\", \"USDJPY\", \"XAUUSD\"]:\n    button = Button()\n    button.Text = symbolName\n    wrapPanel.AddChild(button)\napi.Chart.AddControl(wrapPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/ItemWidth/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/ItemWidth/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
{"id":"P:cAlgo.API.WrapPanel.Orientation","kind":"property","name":"Orientation","type":"T:cAlgo.API.WrapPanel","namespace":"cAlgo.API","group":"Layout","csharp":"public Orientation Orientation {get; set;}","python":"wrapPanel.Orientation: Orientation","summary":"Gets or sets the orientation of the child element.","remarks":null,"parameters":[],"returns":{"csharpType":"Orientation","pythonType":"Orientation","summary":"","nullable":false},"exceptions":[],"since":null,"deprecated":null,"examples":[{"csharp":"var wrapPanel = new WrapPanel { Orientation = Orientation.Vertical, Height = 100 };\nfor (var i = 1; i <= 8; i++)\n    wrapPanel.AddChild(new TextBlock { Text = \"Level \" + i, Margin = 2 });\nChart.AddControl(wrapPanel);","python":"wrapPanel = WrapPanel()\nwrapPanel.Orientation = Orientation.Vertical\nwrapPanel.Height = 100\nfor i in range(1, 9):\n    textBlock = TextBlock()\n    textBlock.Text = f\"Level {i}\"\n    wrapPanel.AddChild(textBlock)\napi.Chart.AddControl(wrapPanel)"}],"url":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/Orientation/","markdown":"https://help.ctrader.com/ctrader-algo/references/Controls/Layout/WrapPanel/Orientation/index.md","environments":[{"name":"Desktop","support":"Full","behaviour":null},{"name":"CLI","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."},{"name":"Cloud","support":"None","behaviour":"Accepted without error but never displayed, so control events such as Click are never raised."}]}
